cancel
Showing results for 
Search instead for 
Did you mean: 

Launching the application from CubeIde vs autonomously

SSorr.1
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

1 REPLY 1
TDK
Guru

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".