Sometimes we need to define a variable in a specified address,but how to do this?The MCU is S32K144 and IDE is S32DS V2.0. I have tried to use the following method :1.unsigned char temp_A@0x00. 2.u8 sram[200] __attribute__((at(0x20002000))); ,but it did not work!So dose anyone have any idea about this problem,thanks very much!
Hi,
you need to create custom section in linker file and add your variable like this:
__attribute__ ((section(".your_section"))) unsigned char your_variable;
You can look at this thread - https://community.nxp.com/message/971236
Jiri
Hi Jiri,thanks!