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

C_LIB_CODE, getting its memory size in C

In my 'User Sections' I placed to following lines:
?C_LIB_CODE%FCODE (0x100000)[0x10200]

In this way the C_LIB_CODE that is compiled and stored at 0x10200 (FLASH memory), will be executed at 0x100000 (RAM memory).

At startup I copy the FLASH memory block to RAM (0x10200 => 0x100000)
The problem is that the size of this block can vary (depending on the use of C_LIB_CODE functions) and for now I read the size of the C_LIB_CODE block in the listing of my project file (????.m66).

Is there a way to get this size from the linker in my C-code as is it possible with self created classes using:
SROM_PS (<USERCLASS>)
SROM_PS_TRG(<USERCLASS>),SROM_PS_SRC(<USERCLASS>),SROM_PS_LEN(<USERCLASS>)

Thanks in advance

0