To see the problem I have prepared a small example project.
The debug version seems to run properly, however the release resets after reaching the above mentioned EEPROM partition function.
Probably there is some simple points which I miss but noticed the following strange thing:
1. The S32K144.h file generated by S32K Design Studio has no such defines as MSCM_OCMDR_OCM0_... or MSCM_OCMDR_OCM2_... which are needed by the partition function. What is the reason behind this? The older version seems to have the these defines.
2. In the initial part of bl_init_internal_eeprom function after each line like:
MSCM->OCMDR[0u] |= MSCM_OCMDR_OCM0(0xFu) | MSCM_OCMDR_OCM1(0xFu) | MSCM_OCMDR_OCM2(0xFu);
i put a dummy delay as without a delay even in debug mode the board reaches some undefined behavior.
I use Segger J-flash Lite to program either debug or release S19 files generated during the build. When using debugger (of course for the debug executable) the example seems to be working.
Thanks for any help.