cancel
Showing results for 
Search instead for 
Did you mean: 

Override Breakpoint at 'main' ?

 

AndrewNeil_1-1743163673370.png

Is there a way to have this breakpoint only enabled at the start of the debug session?

So, when the code is first loaded, it will stop at main(); but then after subsequent resets I set my own breakpoint.

It doesn't appear in the list of breakpoints, so I can't clear/disable it from there.

 

2 REPLIES 2
TDK
Guru

I don't think so.

You can set "conditional" breakpoints in code which may achieve a similar result. Check if the debugger is connected, then check whatever flags you want (maybe a flag in RCC->CSR), and execute __BKPT();.

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

Uncheck "set breakpoint at main". Then in the editor set a breakpoint on main and change its type to temporary (in Breakpoint properties). Then start debugging. The program will still break once at the reset handler, resume automatically then break on main.  Next resets won't break at main or reset handler.