Question
Access Null pointer - M4 vs M33
Hello,
Code that was compiled for stm32F407 ( core M4) has an bug that accesses null pointer. The assembly code is as follows:
STRB r1, [r0, #0x01]
Where r0=0 and r1=0.
Although MCU accesses null pointer, it does not enter hard-fault.
But, the same code on stm32U585 (core M33, w/o trust zone), runs into hard-fault.
Is there a way to make the stm32U585 to behave as the stm32F407, in this aspect.
This code cannot get changed and it must run on both MCUs.
Any Ideas?
Thank you,
Ari
