AnsweredAssumed Answered

Designating RAM Subroutines in IAR IDE/Compiler environment

Question asked by Circuitcode on Feb 2, 2012
Latest reply on Feb 3, 2012 by MMA

In the IAR 'C' Compiler environment, the object attribute, "__ramfunc, placed leftmost in the same line that declares the start of a subroutine makes that subroutine load into SRAM.

 

In the RAM_CODE folder on the ADuC702x Starter Kit CD in the ADuC702xV1.3\ADuC702xV1.3\code\IAR Code Examples path, the blink.c routine designates subroutines that are to be loaded into SRAM with what it calls a RAM attribute that is implemented as follows:

                              void subroutine_name(void)// __ram

                              {

                              }

 

Is the RAM attribute telling us to modify the subroutine line to read as follows (?):

                              __ramfunc void subroutine_name(void)

                              {

                              }

 

Also:

 

Will the linker warn us if SRAM code-size plus stack space exceeds the ADuC7026 8KB SRAM limit or do we have to glean that from the Load Map?

Outcomes