hi i would like to get an information about storing code size along with code. in lpc3250 (arm 9) there is a macro SIZE_EXT_INFO to store code size. same way, is it possible to store code size in lpc17xx (cortex m3) ? thanks.
Hi,
try this
extern unsigned int Load$$LR$$load_region_name$$Length; const unsigned int * const code_size = &Load$$LR$$load_region_name$$Length;
It'll be wherever you put it.
Suggest you might place it in an unused vector, at the end of the vector table, with a label you can see in the .MAP file, or using a marker/magic number you can find with a search in a hex editor or such.
hi, thanks for the replies. i am not able locate the address of the size stored. which location is it? thanks.
Done things like this here in startup.s vectors to compute code+static initializers
... IMPORT ||Image$$ER_IROM1$$RO$$Length|| IMPORT ||Image$$RW_IRAM1$$RW$$Length|| ... DCD ||Image$$ER_IROM1$$RO$$Length||+\ ||Image$$RW_IRAM1$$RW$$Length|| ...
Load$$LR$$load_region_name$$Length Length of the load region.
www.keil.com/.../armlink_pge1362065953823.htm
View all questions in Keil forum