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


Please help: OpenOCD error "Wrong device detected"

Hi!
I’m pretty new in using both System Workbench and Eclipse.
You can also say that I’m pretty new in programming MCU’s using C/C++ (used to write a lot on Keil Assembler for C8051).

I’m trying to migrate existing project from one board version to another. There are a lot of changes in board layout, so I had to redefine almost all GPIO pins. None of location-dependent pins were changed though.

What I did:

  • copied existing project to another folder
  • edited project name
  • edited #defines that were linking GPIO pins to their functions
  • edited CubeMX project so it matched current board


Right now project builds with no errors, but if I try to run it on MCU it gives me error: “OpenOCD child process termination. Reason: wrong device detected” with this message in console:

Open On-Chip Debugger 0.10.0-dev-00007-g58350bc-dirty (2018-01-12-12:21)
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: 8000 kHz
adapter_nsrst_delay: 100
Info : clock speed 8000 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : vid/pid are not identical: 0x0483/0x374B 0x0483/0x3748
Info : using stlink api v2
Info : Target voltage: 3.234921
Error: init mode failed (unable to connect to the target)
in procedure ‘program’
in procedure ‘init’ called at file “embedded:startup.tcl”, line 485
in procedure ‘ocd_bouncer’

    • OpenOCD init failed **

shutdown command invoked

Original project is created, I believe, with CubeMX v.4 and firmware STM32Cube_FW_F1_V1.6.1. New project is edited using CubeMX 5.0.1 and firmware STM32Cube_FW_F1_V1.6.1 and STM32Cube_FW_F1_V1.7.0.
Project settings are seemed OK to me. Linker script seems normal too.

 

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