Unhandled exception when enabling compiler optimization (-O2) on SPC58NH92 multicore project
Hi everyone,
I’m working on a project using the SPC58NH92 MCU with SPC5 LLD (RLA) drivers.
The setup runs FreeRTOS on Core2 and bare-metal code on Core0.
Both cores share data through a dedicated RAM region, with synchronization handled by SEMA4 for access control and cache invalidate/flush operations to maintain data coherence.
The application works perfectly when compiled without optimization (-O0). However, when I build with optimization level -O2, the system throws an unhandled exception during runtime.
I’m using FreeGCC as the compiler (SPC5Studio environment).
Has anyone faced a similar issue on SPC58 multicore systems?
Are there any additional recommendations or known considerations regarding shared memory, cache management, or compiler optimization in this setup?
Thanks in advance for any help or insights!
