cancel
Showing results for 
Search instead for 
Did you mean: 

Add reset MCU command to debug toolbar

AHugh.2
Associate III

Hi,

Is it possible to add a MCU reset command to the debug toolbar? I.e. a button that does a pause then "monitor reset" type sequence? Of course I can do this manually in the debug console, but it'd be nice to have a button to do it, to complement the full restart button.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Nawres GHARBI
ST Employee

Thanks @AHugh.2   for the proposal

Ticket created for this change request 

View solution in original post

14 REPLIES 14
TDK
Super User

This one doesn't work? What is a monitor reset type sequence?

TDK_0-1754486453015.png

 

If you feel a post has answered your question, please click "Accept as Solution".
AHugh.2
Associate III

Thanks, but I am referring to Cube integration in VSCode not CubeIDE.

"monitor reset" is a command you give to GDB to tell it to reset the target, without it going through the reconnect, and flashing the image again.

 

Nawres GHARBI
ST Employee

Thanks @AHugh.2   for the proposal

Ticket created for this change request 

ADunc.1
Senior

Yup, definitely need that reset button.  In my case I use a bootloader.  Debugging programs just the application.  But cant properly run the application with it going through the bootloader first.  So, need to be able to reset after programming to force the bootloader to be executed.

And besides, every debugger I have ever used has a reset button so you can quickly start again with reprogramming (which takes forever on a full flash H7!).

vincent_grenet
ST Employee

@AHugh.2 
Thank you for reporting this issue.

I’m happy to share an early teaser with you: the reset feature is already part of our codebase, and we plan to deliver it as soon as possible. Stay tuned!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Ozone
Principal III

And I thought such a MCU reset command was standard ...

Ozone_0-1762414707779.png

Just saying ...

Florent V
ST Employee

Hi @AHugh.2 , @ADunc.1 and @Ozone ,

The reset button is officially available in the latest 3.7.0 release.

FlorentV_1-1765816985951.png

By default, it will execute :

  • monitor reset
  • tbreak <runEntry attribute value>
  • continue

However, you can customize these commands using the following attribute in your debug configuration

"quickReset": [
    "monitor reset",
    "tbreak main",
    "continue"
],


Kind Regards,
Flo

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

As a remark ...

If the option "run to main" is disabled (i.e. the debugger should stop at the reset vector), a "reset MCU" should take that into account.

Hi Ozone,

Thanks for the remark.

For info, without talking about "reset MCU" (aka "quickReset"), if the "runEntry" attribute is not set, then the program does not stop at startup. Otherwise, it would be blocking for users wanting to run their code.
In this case, it is easier to set the desired function in the "runEntry" attribute.

For the "quickReset", we chose to set a temporary breakpoint on the "runEntry" value or on "main" (if "runEntry" is not set). But again, it is entirely possible to customize this via the "quickReset" attribute.

And of course, if many agree with your remark, we can change our approach, no problem with that.

KR,
Flo

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.