2023-12-21 08:47 AM
Hello,
I wonder if someone has knowledge about any difference in how variables are initialized and handled when launching an application from CubeIde vs starting up the MCU.
My case: I use a STM32H7 and the application runs regularly when I launch it from CubeIde, no matter whether it is normal or debug mode. I can even reset the MCU, it restarts regularly.
However, after I power cycle it, the application gets stuck somewhere and don't know how to debug that because obviously connection to debugger is lost. Resetting doesn't help. I suspect a memory leakage or incorrect use of uninitialized variable.
Any suggestion? Thanks!
Solved! Go to Solution.
2023-12-21 09:10 AM - edited 2023-12-21 09:10 AM
Variables are initialized the same way, shouldn't be differences there.
The vector table pointer could be incorrect. Uncommenting the #define USER_VECT_TAB_ADDRESS line in the system file can fix this.
You can attach the debugger to an already-running instance. This can be helpful to determine where the processor is at. To do so, edit your debug configuration and select:
After this, when you launch the debugger, it will connect without resetting or downloading.
2023-12-21 09:10 AM - edited 2023-12-21 09:10 AM
Variables are initialized the same way, shouldn't be differences there.
The vector table pointer could be incorrect. Uncommenting the #define USER_VECT_TAB_ADDRESS line in the system file can fix this.
You can attach the debugger to an already-running instance. This can be helpful to determine where the processor is at. To do so, edit your debug configuration and select:
After this, when you launch the debugger, it will connect without resetting or downloading.