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

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,

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”


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.