Skip to main content
Schmid.M.
Associate III
January 15, 2021
Question

run release without breakpoints

Hi,

I flash a project for debugging and set some breakpoints. Then I compile for release and run the code using the green arrow symbol. The code is flashed, but does not run, as it is stuck in a breakpoint from earlier debug sessions.

Is there a way to automatically remove all breakpoints in the device when starting a "Run" configuration?

thanks,

Michael

This topic has been closed for replies.

12 replies

Uwe Bonnes
Chief
January 15, 2021

Your program should provide a way to clear breakpoint. As a last ressort, power cycle the device to clear breakpoints left in the debug unit.

Schmid.M.
Schmid.M.Author
Associate III
January 15, 2021

power cycling is what I always need to do now. there should be an easier way, in my hardware this is quite complicated.

Cartu38 OpenDev
Graduate II
January 15, 2021

? is "Run > Skip All Breakpoints" or "Run > Remove All Breakpoints" menu you are looking for ?

Schmid.M.
Schmid.M.Author
Associate III
January 15, 2021

thanks, but no, this removes the breakpoints in the IDE. I want to keep the breakpoints in the IDE for debugging, just clear them from the device memory when running a release version. I guess there should be some initialization commands in the run config, but I don't know which commands are available there.

0693W000007BUg2QAG.png 

Cartu38 OpenDev
Graduate II
January 15, 2021

If no IDE breakpoint we are discussing so about software breakpoints you've added to your applicative code ?

If yes you're looking for a way to ignore them at compile time ?

If hardware breakpoint (IDE ones) using "Run > Skip All Breakpoints" is allowing to ignore them running on target without removing them so possible to activate them later on relying on same menu (toggle mode)

Schmid.M.
Schmid.M.Author
Associate III
January 15, 2021

no no. I assume the breakpoints are somehow still in the memory of my stm32. during "run", I don't want them there, only during "debug'. So if I click on run, the breakpoints can still be in the IDE ( I might need them again in next debug session), but they should be removed in the stm32 during run.

I hope that makes it a bit more clear ;)

Cartu38 OpenDev
Graduate II
January 15, 2021

According to me only 2 kind of breakpoints.

1) Hard breakpoint = added thru GDB (relying on console based gdb command usage or Thanks IDE dedicated UI). Such is not part of binary you're flashing to device.

2) Software breakpoint = added within applicative code by code developper

See https://mcuoneclipse.com/2012/07/29/software-and-hardware-breakpoints/

If a breakpoint is part of your device memory means it is part of your application code ... Removing it then new compile & device flash should solve trouble.

Schmid.M.
Schmid.M.Author
Associate III
January 15, 2021

I never inserted software breakpoints, so how can I make gdb delete all breakpoints when I want to run release?

Cartu38 OpenDev
Graduate II
January 15, 2021

Have a try to toogle off all your breakpoints relying on "Run > Skip All Breakpoints".

Then launch a debug session on target. Once running stop it.

Have new try in run mode then.

If debug session and no breakpoint active GDB should do proper cleanup.

Schmid.M.
Schmid.M.Author
Associate III
January 17, 2021

I just wanted to have the breakpoints automatically cleared once I start a run session. I thought there were some simple init commands in the run config. Other IDEs do this automatically anyways. Of course I can always disable them manually and then start the run session.

Cartu38 OpenDev
Graduate II
January 18, 2021

Ok so you've no trouble you're asking for an extra feature so. Go it.

According to me "Run > Skip All Breakpoints" or related toolbar icon usage is not killer here sounds like to me good enough but we may always ask more.

Schmid.M.
Schmid.M.Author
Associate III
January 18, 2021

yep. so what are the commands you can enter here? Is there any kind of docu for that? is it GDB commands?

0693W000007BUg2QAG.png