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 error when running/debugging

Hi all,

I am running into a problem when using a STlink v2 to program one of these cheap chineese STM32F103C8T6 boards that have been going around on ebay. It is only in system workbench that I cannot flash the board, running stlink from the command line lets me flash the board no worries.

The error I am receiving states:

OpenOCD child process termination

Reason:
Unplugged target or STLink already in use or STLink USB driver not installed

Details:

Unplugged target or STLink already in use or STLink USB driver not installed
Open On-Chip Debugger 0.9.0 (2015-09-02-10:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 950 kHz
adapter_nsrst_delay: 100
Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 950 kHz
Error: open failed
in procedure ‘init’
in procedure ‘ocd_bouncer’


All i have modified from default was pointing the debugger to my /usr/bin binaries for OpenOCD and my gdb toolchain, although the errors were the same before I changed the binary locations.

I am not sure what other details I can post. It is being run on an Ubuntu 16.04 with workbench Version: 1.15.0.201708311556 machine with OpenOCD 0.9.0.

Any help would be greatly appreciated,

Alex

So i’ve fixed my own problem incase anyone has this problem and stumbled accross this post. It was quite an easy fix. I downloaded the latest openocd release from

https://github.com/gnu-mcu-eclipse/openocd/releasesQuestion

Then in system workbench I changed the debug configuration script to one provided in the OpenOCD release.

Run->Debug Configurations->Configuration Script, set to user defined and navigate too scripts/target/stm32f1x.cfg in the release downloaded and bingo it works.

Thanks for posting what you discovered.

I am running in to the same error, with a clean install and fresh project (for a custom board). This didn’t help me, but at least gave me something else to try.

Web searches led me to a number of posts with various solutions to this, but none have worked yet.


 

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