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 0.10.0 open failed in “init” and “ocd_bouncer”, ST-Link-v2-1, STM-NucleoF722EZ

Windows7 64bit
STM-NucleoF722ez board with built in ST-LINK-v2-1 debug board

I am new to these tools, but able to created a simple project using CubeMX and imported the files into Eclipse and generated working hex file, and used ST-Link Utility to program the processor. But when I tried to use the OpenOCD to learn the debug, it failed to connect to the st-link board as descriped below.

With the Nucleo board connected to USB port I was able to use ST-LINK Utility to program a hex file to the STM32F722 processor successfully. But when I tried to run openocd (manually in Windows Command Line) to communicate with with ST-LINK using the command:
..\bin\openocd.exe -f board\st_nucleo_f7.cfg
With st_nucleof7.cfg contains following lines:

source find interface/stlink-v2-1.cfg

transport select hla_swd

source find target/stm32f7x.cfg

reset_config srst_only

...and stlink-v2-1.cfg has:
interface hla hla_layout stlink hla_device_desc “ST-LINK/V2-1” hla_vid_pid 0x0483 0x374b

...and Windows Device Manager shows USB Device as “STLINK dongle” with Hardware lds Value as: USB\VID_0483&PID_374B&REV_0100&MI_00 USB\VID_0483&PID_374B&MI_00

It seems all VID and PID are matched. ...but I got the following error. Could someone tell me what is wrong in my setup please? I have been working on this problem a few days already to no progress.

GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-00113-g0f83948 (2017-01-24-
18:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.htmlQuestion
Info : The selected transport took over low-level target control. The results mi
ght differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Error: open failed
in procedure ‘init’
in procedure ‘ocd_bouncer’

Thanks, Brian

I found the answer here: https://www.eevblog.com/forum/microcontrollers/openocd-fail-to-open-stm32-nucleo-board/Question

Evidently OpenOCD cannot connect to USB 3.0 port. I switched to another port and it worked!!!

Why no one at OpenOCD instructs that it doesn’t work with usb 3.0? I have spent a few days on this problem.
I still don’t know how to tell which port has 2.0 or 3.0 version looking at the Device Manager.


 

Newest Forum Posts

  1. So happy to finally meet you! by Danielrug, 11:01
  2. STM32 MCU model shortlisting for Making RC remote by Palvish, 2025-07-07 15:05
  3. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  5. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  6. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  7. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs