OpenOCD stands for Open On Chip Debugger and is a program used to debug embedded platforms, mostly via JTAG.
Questions tagged [openocd]
286 questions
2
votes
3 answers
OPENOCD, flash program to ARM Cortex M0 (JTAG)
I'm new on OpenOCD, has anyone attempted to use Olimex OpenOCD to actually flash program hex file (from Kiel say) into ARM CORTEX M0 (generic).
What do I need to setup script file to take each word of the hex file to performs mww (memory write…

Riscy
- 843
- 4
- 13
- 28
2
votes
1 answer
SMP threads not showing in GDB
Trying to debug multi CPU SoC (Amlogic A113X) and faced a problem.
So I have this debug configuration: A113X(JTAG) -> Segger J-Link V11 -> OpenOCD -> gdb-multiarch
Everything is connected and seems okay, but GDB shows just 1 thread (should be 4 -…

101ful
- 23
- 2
2
votes
0 answers
Debugging STM32 with OpenOCD, STM32 for VSCODE won't work or flash, Configuration issue maybe?
First and for most I googled a lot and Its been a week of searching with no solution at all. Please bare with me!
I tried to add all necessary info! Please request more If you need.
My problem is:
I am trying to debug a STM32 bluepill board with…

The_M_Code
- 127
- 2
- 10
2
votes
2 answers
Flashing of ELF file using OpenOcd causes the ELF header to be written to Flash
I use OpenOcd to flash the Elf image of a STM32 ARM Cmake project.
In the mem.ld script the origin address of the FLASH sector is assigned with an address offset to 0x08020200.
If the Elf file is written to the Flash using OpenOCD and the…

Y. Wilkening
- 63
- 4
2
votes
1 answer
OpenOCD couldn't bind tcl to socket
I'm trying to launch OpenOCD but I'm getting this error:
Error: couldn't bind tcl to socket: No error
I'm sure the configuration is correct and I've tried with several different targets.

José Simões
- 606
- 1
- 5
- 12
2
votes
1 answer
(arm-none-eabi-gcc) creating .elf binary from bootloader + 2 x firmware image
I'm developing for a STM32F429 with CLion and trying to create a merged .elf file from three .elf files.
The layout of the merged .elf file should look like this:
Bootloader.elf (maximum 256K, but can vary in size)
FirmwareImage.elf (always…

Tim Walther
- 53
- 6
2
votes
1 answer
Running OpenOCD fails with jtagRocketConfig
This is what I get when I try to connect Software RTL simulation and OpenOCD:
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.10.0+dev-00068-ge1e63ef30 (2020-03-16-05:57)
Licensed under GNU GPL v2
For bug reports, read
…

yildizabdullah
- 1,895
- 5
- 24
- 37
2
votes
1 answer
Why does OpenOCD fail, when the ST-Link Utility works?
I am trying to use openocd to debug my stm32 bluepill (stm32f103c8t6). I have it connected with an ST-Link V2 which works fine through the ST-Link Utility (connecting, flashing, ...). When I try to use it via openocd I get the following…

Florg
- 21
- 2
2
votes
0 answers
openocd - problem flashing nrf52 using stlink
I've got some issues flashing firmware using an STLINKv2 (from a Nucleo board) with an nRF52 target device using SWD. In short, I'm able to "connect" to the nRF52 (I can open a telnet session), but as soon as I try a Program command, I get a…

pinchy
- 21
- 2
2
votes
0 answers
GDB break commands don't get executed in command files
I have a debugging script that does the following:
sets two breakpoints. let's call them start and end breakpoints.
after starting, the script continues until start breakpoint is hit.
once start breakpoint is hit, I perform single-stepping until…

mad0x60
- 312
- 1
- 14
2
votes
2 answers
Rust discovery, config file not working as expected
I am trying to avoid entering the same commands in each GDB sessions. For this, I have followed the instructions in rust discovery book but the program is not working as mentioned in the book when I run the program through cargo run it is giving the…

Jawwad Turabi
- 322
- 4
- 12
2
votes
1 answer
OpenOCD exit on breakpoint
I'm developing an application on an STM32F042.
I drive everything from a makefile, including my unit tests.
I use OpenOCD and ST-LINK to flash the target.
My unit tests run on the host and on the target.
The host unit test driver returns 0 from…

iter
- 4,171
- 8
- 35
- 59
2
votes
0 answers
GDB: Prevent loading of one section with 'load' command
I use OpenOCD + GDB to debug the firmware. When I type load it loads the code to the FLASH memory:
Loading section ExtFlashSection, size 0x3fe000 lma 0x90000000
Loading section .isr_vector, size 0x1f8 lma 0x8000000
Loading section .text, size…

Piotr Jedyk
- 361
- 1
- 10
2
votes
3 answers
Openocd Error: invalid command name "dap" - can't connect Blue Pill via ST-Link/V2
I'm using a Blue Pill board (STM32F103CB with 128kB of flash according to st-info --probe) via a clone ST-Link/V2 like this one. I've also tested using a genuine ST-Link/V2 like this one. I get the same result, described below, with both…

Spod
- 21
- 1
- 3
2
votes
0 answers
openocd programming NRF58240 with soft device and application firmware
I am attempting to use openocd (STLINK-V2) to program a nrf device with both a soft device (bluetooth stack) and an application firmware (latest.hex).
This is the command I am using:
openocd -f interface/stlink.cfg -f target/nrf52.cfg -c init -c…

crankshaft
- 2,607
- 4
- 45
- 77