Hello,
When I change the optimization for a project to NO_OPTIMIZATIONS or DEBUG_OPTIMIZATIONS in the configuration (prj.conf), I always go in the hard fault handler (with NO_OPTIMIZATIONS, it fails direclty).
I can reproduce this with the sample "ncs\v1.8.0\zephyr\samples\bluetooth\peripheral", without any modification except the optimization.
I use nrf connect SDK 1.8.0 and SES V5.68 with nrf5340.
Can you help me on that ?
Regards.