EXAMPLE: S32K144 .noinit section usage

File uploaded by Jiri Kral Employee on Nov 22, 2018Last modified by Jiri Kral Employee on Apr 22, 2020
Version 4Show Document
  • View in full screen mode

Example introduction:


After startup - uninitialized RAM is set to 0 by startup code (startup_S32K144.S). If you need access to data stored in the RAM after reset is performed, you can  add these variables into .noinit section. You need to update your linker file and add .noinit section aligned to 1024 bytes before _RAM_START is defined: 



In code assign your variable into .noinit section: 


Example usage: 

Import attached example into S32DS for ARM, build in and start debug session. Resume target


and suspend program execution: 


In semihosting debug console you can see that noinit_data are set to 0. The board is in state after power ON:


Reset board and let's check if data remains in RAM memory: 


After resume, you can see in semihosting console (or expressions view), that data remains unchanged: