Skip to main content
SSorr.1
Associate II
December 21, 2023
Solved

Launching the application from CubeIde vs autonomously

  • December 21, 2023
  • 1 reply
  • 914 views

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!

This topic has been closed for replies.
Best answer by TDK

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:

  • Debugger Tab -> Reset Behavior -> Type -> None
  • Startup Tab -> Load Images and Symbols -> Edit and select Download: false

After this, when you launch the debugger, it will connect without resetting or downloading.

1 reply

TDK
TDKBest answer
December 21, 2023

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:

  • Debugger Tab -> Reset Behavior -> Type -> None
  • Startup Tab -> Load Images and Symbols -> Edit and select Download: false

After this, when you launch the debugger, it will connect without resetting or downloading.

"If you feel a post has answered your question, please click ""Accept as Solution""."