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


openocd not running when using script

Hello All,

I am reinstalling System Workbench on a new machine and I am attempting to get the debug tools to work again and I am running into some issues. I am connecting to a STM32F030R8T6 over an ST-LINK firmware V2J27M15.

On my previous machine I used a local config file in my project to connect to the chip. It looked like this:

  1. This is an preamp_bd board with a single STM32F030R8Tx chip.
  2. Generated by System Workbench for STM32


source find interface/stlink-v2-1.cfg

set WORKAREASIZE 0x2000
transport select “hla_swd”


source find target/stm32f0x_stlink.cfg

  1. use hardware reset, connect under reset

reset_config srst_only srst_nogate

This script works fine on my old machine. I did need to go into the stm32f0x.cfg and bump the speed down from 1000 khz to 480 khz but this was the only change I needed to make.

On my new machine it does not work. The error I get is from GDB saying:

Failed to execute MI command:
-target-select remote localhost:3333

So I went to look at the console output from openocd and it is so odd, the console is BLANK. Its like openocd never ran?

I dug in a little bit and found that if i modify the debug configuration to not use a configuration file for openocd but rather use Manual spec then I do get console output from openocd but it fails and reports wrong device detected. I am pretty sure I need the custom script here to connect.

Does anyone have any hints for me. Am I correct the openocd is just not running with the local script?

Thanks in advance,
Jason

Yes, local script is buggy, what you can do is to move your local cfg file to another directory (not in the project dir) and reselect it by browse button in debug config.

Or use the manual spec as you did but override the reset config with “Openocd options” field (field is above the use local script or manual spec) set to : -c “reset_config srst_only srst_nogate”

Rgds,
Laurent


This used to work recently, and for my colleagues that haven’t taken the latest update, it still works. I have:

fr.ac6.feature.mcu.debug version 1.12.1 and
fr.ac6.feature.mcu.externaltools.openocd 1.13.1
these don’t work with our custom openocd debug script, exiting with ‘0’ status and no output

My colleagues still have
fr.ac6.feature.mcu.debug version 1.12.0 and
fr.ac6.feature.mcu.externaltools.openocd 1.13.0
And they don’t have any problem with the same shared setup.

I need this fixed.


 

Newest Forum Posts

  1. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  2. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  3. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  5. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  8. Build a project in "release" mode by tang, 2025-02-20 10:36
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  10. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27

Last-Modified Blogs