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


GDB will not connect to OpenOCD session.

Hello,

I’ve been trying to get libuavcan setup through SW4STM32, and I’ve been using STM32CubeMX to generate my peripheral initialization.

This involves converting to a C++ project and adding some -Ddefines to the build config. However, I have got it built. I can upload to the board, however debug does not work.

I have verified debug works with a new test project.

I have also been able to manually connect to the board (a NUCELO-F103RB), using GDB and the provided OpenOCD script. (One note is that I’m not using the provided GDB as my installation is unable to find the provided binary. I have linked to my system gdb, which, again, works completely)

The debugging configurations between the non-working project are practically identical.

Here is the console output from OpenOCD:

Open On-Chip Debugger 0.10.0-dev-00011-g46c94c8 (2018-09-06-08:38)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Warn : Could not determine executable path, using configured BINDIR.
none separate
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter_nsrst_delay: 100
adapter speed: 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2.1 JTAG v29 API v2 M18 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.247706
Info : Stlink adapter speed set to 950 kHz
Info : STM32F103RBTx.cpu: hardware has 6 breakpoints, 4 watchpoints

At this point it will simply terminate.
The GDB console output isn’t much help either:

GNU gdb (7.10-1ubuntu3+9) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “host=x86_64-linux-gnu target=arm-none-eabi”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type “help”.
Type “apropos word” to search for commands related to “word”.

Again, another configuration, using the same versions of GDB and OpenOCD, as well as a nearly identical OpenOCD and debugging configuration (only difference is the board names) works completely fine, as well as manually connecting with GDB.

I’m not sure how to proceed from here. Are there any files I should be checking that aren’t the openOCD config?

So I solved the issue.

I was using an external (64-bit version of GDB)

Apparently that doesn’t work.

The solution was to solve the dependency issues that were leaving me unable to use GDB.


 

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