how can I put a variable on s32k eeprom?
__eeprom unint32_t MyVariable. doesnt work.
Hi,The EEPROM is accessible in FlexRAM so you can use a pointer on a location in FlexRAM.
What is the compiler directive to put a variable/Array on Flexram then?
you can use PE Micro partition feature and add your data into FlexRAM section (already partitioned by PE Micro as emulated eeprom) by __attribute__ specifier. You can find partition option in debug configurations -> Advanced Options
You can find more details about EEESIZE and DEPART in reference manual.
Modify your linker file and add flexram section - like this:
And add your variable in .eeeprom section - for example in your main.c:
Here is an example related to this topic - Example: S32K144 EEEPROM usage
Hope it helps.
Retrieving data ...