You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HELP] Optimization Level -O2 issue for NXP's S32K148 #17170
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?
@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_s the clock for the port you use is turned off.
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
@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.
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.
Activity
acassis commentedon Oct 8, 2025
@PetervdPerk since you worked on this port, do you have some idea why is he facing this issue?
PetervdPerk-NXP commentedon Oct 10, 2025
@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.keykur111 commentedon Oct 14, 2025
Hello @PetervdPerk-NXP
I am working on the same issue along with @harishn6
Board is S32K148 evolution board
keykur111 commentedon Oct 14, 2025
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)
keykur111 commentedon Oct 14, 2025
Hi @PetervdPerk-NXP for
peripheral_clock_config_sdo you have any control register or memory to read or some way to check if it is enabled or not.