We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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) } }
Maybe: (just guessing)
Image$$region_name$$Length -> Execution region length in bytes excluding ZI length.
+
Image$$region_name$$ZI$$Length -> Length of the ZI output section in bytes.
www.keil.com/.../armlink_chdcgbjd.htm