[HELP] Optimization Level -O2 issue for NXP's S32K148
Description
Hi,
Iam trying to run few examples or Applications on NXP's S32K148 hardware by using NuttX RTOS. These Applications or examples mainly for Performance related, So i configured optimization options as below. CONFIG_DEBUG_CUSTOMOPT=y CONFIG_DEBUG_OPTLEVEL="-O2"
with this configuration if i generate binary and flash on S32K148 during pin configuration or uart configuration triggering exception_common handler. Please check attached screenshot for more details.
Could you please let me know how to configure optimization level O2 properly or is it a known issue?
Thanks, Harish Nayineni
Verification
- [x] I have verified before submitting the report.
@PetervdPerk since you worked on this port, do you have some idea why is he facing this issue?
@harishn6 which board are you using?
If possible could switch frame to the s32K1xx_pinconfig function and see if you can get the port and the pin numbers where the crash occurs?
Most likely it could that for your board the peripheral_clock_config_s the clock for the port you use is turned off.
@harishn6 which board are you using? If possible could switch frame to the s32K1xx_pinconfig function and see if you can get the port and the pin numbers where the crash occurs? Most likely it could that for your board the
peripheral_clock_config_sthe clock for the port you use is turned off.
Hello @PetervdPerk-NXP I am working on the same issue along with @harishn6 Board is S32K148 evolution board
please find the s32K1xx_pinconfig Here i doubt regval, does is suppose to be 0?. (values are visible in watch window)
I traced memory for putreg32 try to update the port control registers as per my understanding. I can observed no memory location is getting updated. I kept the screenshot for both configuration runtime at the same point. Note: to solve above optimization of regval i have made it volatile for -O2 case
with Os configuration (default)
with O2 configuration (optimized)
@harishn6 which board are you using? If possible could switch frame to the s32K1xx_pinconfig function and see if you can get the port and the pin numbers where the crash occurs? Most likely it could that for your board the
peripheral_clock_config_sthe clock for the port you use is turned off.
Hi @PetervdPerk-NXP for peripheral_clock_config_s do you have any control register or memory to read or some way to check if it is enabled or not.