2022-05-18 03:12 AM
2022-05-18 05:12 AM
Many different reasons possible, no silver bullet.
Try to switch gradually from Debug to Release, file by file or setting by setting.
hth
KnarfB
2022-05-18 05:31 AM
Custom board?
BOOT0 pulled LOW?
You should be able to use debugger on either image, does it get stuck in some while (1) loop?
Instrument Error_Handler and HardFault_Handler properly so you can see those failures.
Watch poor coding that can cause the optimizer to remove chunks of code.
2022-05-18 06:08 AM
Also check for any code that's disabled in Release - eg, side-effects in debug prints, asserts, etc ...
2022-05-18 08:39 AM
SW4STM32 is very obsolete. Try using CubeIDE, Keil or IAR, something with an audience and support of STM32L4 parts.
If a simple project toggling PC10 try showing or attaching code.
stm32l496retg custom board, per prior post history. A schematic of what you've built/wired would provide context.
2022-05-18 01:11 PM
Mostly such issues mean that the code is broken and the issues just doesn't show up or goes unnoticed in debug configuration.