Hi,
It seems that that two codes are all for Keil. So if you want to use this in MCUXpresso, i think you
can try this, i have tried this under the GCC, sorry for that i do not have the MCUXpresso installed, but i think that this can work:
put this in your link file:
address (RW) : ORIGIN = the absolute address(such as 0x20000000), LENGTH = array_size(such as100)
.noninit (NOLOAD):
{
*(.noninit)
} > address
and in your main code, define the variable like this:
__attribute__((section(".noninit"))) __attribute__((used)) int noninit_var[100];
After that, the noninit_var will be placed into the address you just want, and under noiniting. So the way is to define a section which has only your variable, and then place it at the address.
Regards,
Crist