Skip to main content
Explorer
December 21, 2023
Solved

Launching the application from CubeIde vs autonomously

  • December 21, 2023
  • 1 reply
  • 889 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

    TDKAnswer
    Super User
    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.