Can I stop STMCubeIDE from opening startup .s file on microcontroller reset (debug)?
Asked Answered
V

1

8

When I'm debugging STM32CubeIDE opens startup_stm32f722xx.s file when microcontroller resets (when I start debugging or when I reset microcontroller.

It looks like the debugger has some "hidden" breakpoints and it hits them, and then continues, but the file remains open.

It is not useful for me right now. What can I do about this?

I'm using STM32CubeIDE 1.6.1 with STM Nucleo-F722ZE (STLink 3v on board).

Vivica answered 21/5, 2021 at 16:57 Comment(0)
F
0

By default, a breakpoint is placed at main when debugging. When a breakpoint is hit, an editor is opened with the cursor at the relevant line. This may be why your startup code is opened. As far as I know, STM32CubeIDE has no option to prevent opening editors on breakpoints.

You can disable this "hidden" breakpoint in the Debug Configuration, accessible through the Run menu. Select your configuration in the left column and go to the Startup tab on the right. Towards the bottom, deselect the checkbox before "Set breakpoint at: main".

If this doesn't help, and assuming you have no normal breakpoints active, you could check STLink's documentation for similar options. I have no experience with that specific debugger.

Screenshot of STM32CubeIDE's Debug Config. dialog, with "breakpoint at main" circled in red

Edit below. Thanks, oromoiluig, for clarifying the issue further in your comment.

There is also a known bug in the IDE that might affect you. An ST employee comfirmed that it "Sounds like unexpected behavior" and suggests to:

  1. Start a new workspace
  2. Create a new test project
  3. Use the "Run" button to download code.

One user reported that it helped. Many more report the issue persists, even today in version 1.9.0.

To answer your question directly: No. You likely cannot stop STMCubeIDE from opening startup.s or other rource files in this situation. It is up to ST to fix their IDE.

Frydman answered 9/5, 2022 at 15:43 Comment(2)
Unfortunately this doesn't solve the issue. The breakpoint at main() is normally in main.c. I am experiencing a similar issue as the OP where STM32CubeIDE opens files seemingly at random when starting, pausing or restarting a program in debug mode. My guess is it opens the file/line that is being executed at that very moment, but it's really useless unless it's when pausing the program, in which it could be OK.Apostolate
Well, it looks like this is how debugging in Cube works in 2022. Thanks for efforts :)Vivica

© 2022 - 2024 — McMap. All rights reserved.