Customer reported that they forgot to specify the space for .SpecialFuncs in the CMD, and found it was assigned to the remaining space of RAML0123 by the complier. In the initiated CMD, RAML0123 was used to run the critical functions, and FLASHBCDEFGH was used for .text.
They wanted to understand why .SpecialFuncs was assigned to the remaining space of RAML0123, instead of FLASHBCDEFGH. And is there any method to report such error when some section was not specified with the related space?
#pragma CODE_SECTION(".SpecialFuncs") void Funcs1(woid) { … }
MEMORY { PAGE 0: /* Program Memory */ /* on-chip SRAM block L0~L3 16KW Secure Zone */ RAML0123 : origin = 0x8000, length = 0x3FD0 /* on-chip Flash sector B~H 112KW Secure Zone */ FLASHBCDEFGH : origin = 0x320000, length = 0x1BFFC /* Normal Routine size ~56KW */ ... PAGE 1: /* Data Memory */ ... } SECTIONS { .RTCriticalFuncs : LOAD = FLASHBCDEFGH, RUN = RAML0123 LOAD_START(_RTCriticalFuncsLoadStart), LOAD_END(_RTCriticalFuncsLoadEnd), RUN_START(_RTCriticalFuncsRunStart), PAGE = 0 .text : > FLASHBCDEFGH PAGE = 0 ... }