OpenOCD stands for Open On Chip Debugger and is a program used to debug embedded platforms, mostly via JTAG.
Questions tagged [openocd]
286 questions
0
votes
1 answer
OpenOCD SWO output from an STM32F4 and buffering
In an STM32F4-based system I am using SWO for my trace output (intercepting _write() to use ITM_SendChar() in the usual way). I can view the SWO output faultlessly in ST's [Eclipse-based] Cube IDE with the SWO clock at 2 MHz (core clock 168 MHz);…

Rob
- 865
- 1
- 8
- 21
0
votes
1 answer
OpenOCD cannot open connection to STM32L4 board (STEVAL STWINCSV1)
I have a STEVAL STWINCSV1 board with an STM32L4R9 chip connected to my computer via USB. I am trying to use OpenOCD to flash a new image. I am using the command openocd -d -f board/stm32l4discovery.cfg to try to open a connection to the board. Here…

riley lyman
- 317
- 1
- 11
0
votes
0 answers
Debugging STM32F767 with OpenOCD - unknown device id problem
Trying to debug STM32F767 (NUCLEO-F767ZI board) with OpenOCD 0.10.0 in VSCode I get the following error:
Info : device id = 0xa05f0000
Warn : Cannot identify target as a STM32 family.
Error: auto_probe failed
Does it mean OpenOCD simply does not…

T. Jastrzębski
- 145
- 8
0
votes
2 answers
STM32 READ OUT PROTECTION LEVEL 2 using openocd
The STM32 has a read-out protection level 2 feature so code can't be read out via the debug interface (SWD).
Using OpenOCD, how can I enable the read-out protection LEVEL 2 via a SWD interface?

kahan
- 1
- 1
0
votes
0 answers
ESP32 Debugging in VS Code - Cannot find compatible tool-openocd-esp32 for linux_i686
Environment:
Ubuntu 14.04.6 LTS,
VS Code 1.35.1,
PlatformIO IDE 1.10.0,
Arduino libraries for ESP32.
When attempting to open the debug interface in VS code, I am presented with the following error.
PackageManager: Installing tool-openocd-esp32 @…

Alphlim
- 1
0
votes
0 answers
OpenOCD - stuck on breakpoint, step over and continue aren't working
I'm using STM32H745ZI Nucleo board with STLinkV3. I have successfully compiled and run simple program that flashes LEDs on Cortex M7 core. When program runs without debugger, everything's fine.
The problem appears while degugging. When I set…

Konrad Sikorski
- 399
- 5
- 11
0
votes
2 answers
OpenOCD doesn't open/listen on any ports, using an STM32 Nucleo board
So I've been interested in learning embedded programming and just got my Nucleo F103RB(stm32) board. I want to avoid IDEs and work in terminal with open-source tools. I've been trying to follow this tutorial:…

Zest
- 99
- 1
- 8
0
votes
1 answer
I'm trying to debug STM32F446 board from virtual box(UBUNTU, hostos = windows10) , using openocd
My board STM32F446 is having a on-chip debugger(STLINK v2) and I'm trying to debug my executable from Linux environment i.e. (Virtual Box = Ubuntu, host os = windows 10).
I'm not able
1. To see stlink debugger in the USB devices list , i.e. lsusb…

Phani Chinimilli
- 35
- 6
0
votes
0 answers
How to insert a wildcard in an OpenOCD adapter interface driver command?
I'd like to use the adapter interface driver command ftdi_serial in OpenOCD where the argument has a wildcard. This is because the serial number field will not be static from device to device in my application.
So instead of passing:
ftdi_serial…

AJbotic
- 75
- 1
- 6
0
votes
2 answers
read register value into variable - e.g. control location of pc
Aim is to check if my controller has halted at the correct position.
I'm using tcl-script.
The commend reg pc outputs the value of the register pc to the console. So in theory following command should store something in a variable.
set x [ reg pc…

Cutton Eye
- 3,207
- 3
- 20
- 39
0
votes
1 answer
Using OpenOCD to determine RAM usage in microcontroller (ARM Cortex-M3)
I'd like to see how much RAM is used by the firmware by writing a known pattern, and comparing RAM contents to see how much has been modified.
I've tried
reset halt
load_image pattern.bin 0xaddress
resume
(let target run for a bit)
halt
dump_image…

handle
- 5,859
- 3
- 54
- 82
0
votes
0 answers
ATOM/PlatformIO OpenOCD init failed
I'm trying to upload to a board for my 3d printer and was following a couple of online tutorials; however, when I'm trying to upload to the board I receive the error below.
I'm running an up-to-date version of Windows 10, Atom & PlatformIO, the…

user1543042
- 3,422
- 1
- 17
- 31
0
votes
1 answer
Prevent sigint from closing OpenOCD when using OpenOCD with GDB
I am trying to write a script to launch OpenOCD in the background, and then launch and instance of GDB connected to my OpenOCD server. This mostly works, except that as soon as I type the interrupt character to halt the target I am debugging my…

Samuel Dewan
- 33
- 3
0
votes
1 answer
nRF52840 debug SWD Raspberry Pi 3B+ flash_writing error
I have problem witch writing flash to nRF52840 dongle by Raspberry PI 3B+. I tried to change the bootloader and when I was cleaning the memory with the "nrf5 mass_erase" command, raspberry said that nothing cleared, and since it didn't clear, I…

Mariusz94
- 13
- 3
0
votes
0 answers
The program doesn't stop onto breakpoint in eclipse
Eclipse accidently doesn't stop on breakpoint, but output shows that MCU halted at 0x...., seems that the problem between openocd and arm-none-eabi-gdb
Ubuntu 18, openocd 0.10.0 and arm-none-eabi-gdb from 2016. Earlier it was working. Having this…

Ilya
- 61
- 1
- 10