This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to determine size of RAM present in controller

The Realview MDK toolchain provides a number of $$ linker generated variables with the base, limit and size of sections.

What I need is such a variable that holds the total amount of ram present in an entire region but I can not seem to find this.

To be more specific, the generated scatter file is as shown below and what I need is a $$ linker generated variable returning the second numeric value of this line:

RW_IRAM1 0x10000000 0x00008000

So 0x00008000

; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
;
*************************************************************

LR_IROM1 0x00000000 0x00080000  {    ; load region
size_region
  ER_IROM1 0x00000000 0x00080000  {  ; load address =
execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }
  RW_IRAM1 0x10000000 0x00008000  {  ; RW data
   .ANY (+RW +ZI)
  }
}