Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


How to reset target MCU during debugging

Sometimes I want reset the MCU during debugging, but SW4STM32 canit reset MCU, I must stop the debugging and download again.

How to reset the MCU?

Sam

Hi Sam,

Unfortunalty, there is no button yet to reset the MCU. This is on the todo list.
For now, as you say, you can terminate then launch the debug session again. This is also what the “Terminate and Relaunch” action (in the contextual menu) is doing.

Kevin

Hi Kevin,

I’m Joe, ST MCU FAE in sydney. At first, I’d like to thank for your great support. SW4STM32 is a really great free tools for STM32 fans.

Lots of customers are keen on “reset button” function which can save debugging time. currently we can use “monitor reset halt” command to reset MCU, but as you know, it’s not convenient.

As you mentioned above, “reset button” is on the todo list. May I knwow the timeframe? When will we get the exciting new version with reset button?

Thanks again.
Joe

Hi Kevin,

I’m Joe, ST MCU FAE in sydney. At first, I’d like to thank for your great support. SW4STM32 is a really great free tools for STM32 fans.

Lots of customers are keen on “reset button” function which can save debugging time. currently we can use “monitor reset halt” command to reset MCU, but as you know, it’s not convenient.

As you mentioned above, “reset button” is on the todo list. May I knwow the timeframe? When will we get the exciting new version with reset button?

Thanks again.
Joe


It is possible to do a reset without having to reload your application, although there are some issues you will have to deal with if you use the approach I describe below.

To perform a target reset, first halt your application, then select the Console window (typically located at the bottom of the Eclipse UI), then enter this command in the Console window:

monitor reset halt

This will reset the target and stop the application at the very first instruction, which is usually the pre-main() C startup assembly code.

Note that the source level debugger display will NOT update automatically after issuing the reset command. However, if you hit one of the single-step buttons (e.g. F6, Step Over) the source debug display will update.

You will then probably want to switch the debug display to your main() and either highlight the first code line of main() and hit Ctrl-R (Run To Line) or set a breakpoint on it and hit F8 (Resume).

From this point you should be able to debug your application normally.

I am not certain if “monitor reset halt” does a full hardware MCU reset, or just restarts the application at the reset vector without fully resetting the MCU.

the “monitor reset halt” command seem does’t work.

I pause the program, put a breakpoing at the first line of main() function., type “monitor reset halt” in the Console Window, press F8(resume),
the program does’t trigger the breakpoint.

Regards
Sam

To get debugging to work for me, I need to do the following:

Step 1: Click the debug button. This starts thread #1, but it never stops on the main() breakpoint.
Step 2: Suspend (pause) debugging.
Step 3: Execute “monitor reset halt” in the console.
Step 4: Resume debugging. Thread #1 now halts at the main() breakpoint.

I haven’t read anyone else needing to do this. This threads seems to be specific to resetting the target while already debugging. Can anyone suggest why I might be seeing what I’m seeing? Thanks.


France

Maybe the breakpoint was temporarily suppressed as you just hit it... Try to step further in your program before trying to reset it.
Bernard


I do this way:

Step1: press “Suspend”: button to pause my program.
Step2: Go to “Console Window”, type “monitor reset halt”.
Step3: Press “F5” (Single step ).

This debugger “High light” goes to the next step of my program, it doesn’t execute “reset”.


It will be great if I can reset it,
it is annoying that everytime I have to reload the program so many times during debugging.

Regards
Sam


It works now after I set the debug configuration to “Ac6 STM32 Debugging”.

Previously, I set the debug configuration to “GDB Hardware Debugging”.

Regards
Sam


On many ST eval or nucleo board
put a break point in main , press go tolet mcu run
reset the cpu via the push button .. voila your back to the breakpoint after reset


Are there any news concerning the reset button?
I also find this a great pain. It has been on the todo list close to a year now. Maybe you would like to try out CoIDE. It has Mcu reset button. Also, you can disable the programming of the binary image to the mcu on the initiation of debugger and programming it at will with a single click of button later.

Any news after this long time ?

Version: 1.12.0.201701121612 still not providing a reset button ...


One of the most essential functions of an embedded debugger still missing.....

The v2.x branch of SW4STM32 -does- provide a reset button, although it’s not immediately obvious.

It’s a new button just to the left of the double-X clear-terminated-tasks button that is part of the task list dialog (the upper left hand window in the debug view).

With the v1 branch of SW4STM32, I was able to make the “monitor reset halt” trick mentioned by others in this thread work some of the time - it would seem to work correctly if I did a ‘manual’ break (clicking the pause-icon button when the app was running in real time), but was much more hit-or-miss if I tried to do it after stopping due to a breakpoint. It definitely DOES NOT work at all if your app is in the normal run state.

It seems as the input console interface to GDB (which is where the ‘monitor reset halt’ directive is getting sent to) does not function at all in SW4STM32 v2.x. Fortunately, the new ‘reset button’ works pretty reliably.


Sorry for bringing up an old thread but this functionality seems to still be missing from the latest stable version (Windows 64 bit installer Version v2.9, updated on Friday, April 12, 2019 at 16:41:04 CEST). The “Reset the chip and restart debug session” button is grayed out during a debug session, even when stepping through code or sitting at a breakpoint. I am debugging a dual-core STM32H745.

For comparison, in STM32CubeIDE, this reset button works as intended. I am new to SW4STM32, coming from Keil uVision. What am I missing?

Thanks!


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs