Questions tagged [openocd]

Open On-Chip Debugger. Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing

OpenOCD, the Open On-Chip Debugger has been created by Dominic Rath as part of a diploma thesis at the University of Applied Sciences, FH-Augsburg.

Additional details are on the sourceforge project site.

72 questions
19
votes
1 answer

How do I print debug messages to gdb console with STM32 discovery board using GDB, OpenOCD and arm-none-eabi-gcc?

I'm programming an STM32 Cortex M0 discovery board (32F0308DISCOVERY) using OpenOCD, arm-none-eabi-gcc, and gdb. I was wondering if there is any straightforward way to log debug messages over SWD. I've read about the semihosting option, but this…
foldl
  • 591
  • 1
  • 5
  • 14
17
votes
6 answers

What unit test framework can I use for a c based mcu project?

I'm thinking about how I can use unit tests in my mcu project, and what frameworks I can use to simplify it. Today I am using a stm32 with OpenOCD-jtag from a Linux pc, where it is all controlled from a classic Makefile and crosscompiled with…
Johan
  • 2,385
  • 2
  • 25
  • 27
9
votes
2 answers

SWDAP vs CMSIS-DAP vs DAPLink

EDIT : I got the basic questions (for example, what is CMSIS-DAP?) answered by user @Nipo. Based on that, I restructured my post in a more logical way. Hopefully the remaining questions will be answered as well :-)   1. Programming a…
K.Mulier
  • 2,327
  • 3
  • 21
  • 40
9
votes
0 answers

Problems while trying to flash a memory using openocd and jtag

I'm using openocd and jtag for the very first time in my life (after 30 years of playing with electronics), when I dump the flash using dump_image, I got a 4 byte sequence (0x80 0x01 0x59 0x18) in every Kb. downloaded. Example 0x000000 0x80 0x01…
6
votes
3 answers

STM32 - Problem debugging using OpenOCD and ST-LINK

I am trying to follow this guide "Installing a toolchain for Cortex-M3/STM32 on GNU/Linux" (available from here) with the STM32-H103 development board from Olimex. Everything works as expected up to the point where I need to copy my compiled program…
matben243
  • 353
  • 2
  • 5
  • 10
5
votes
2 answers

How to disable USB mass-storage in STLink on Nucleo?

Is it possible to disable the USB Mass Storage option on the STLink hardware of the Nucleo board? I want to prevent mounting the device when I plug it into computers (while keeping the virtual com port). I am using nucleo-32 and nucleo-64 boards by…
Andrew Straw
  • 163
  • 2
  • 6
5
votes
1 answer

STM32F3 Discovery + GNU ARM plugin + OpenOCD - cannot load the binary onto the board

I'm using the GNU ARM plugin for Eclipse with Open OCD as a debugger. This is on Windows 10 x64. The problem I'm facing is the following error when trying to debug or run the sample program: Error in final launch sequence Failed to execute MI…
Violet Giraffe
  • 343
  • 1
  • 3
  • 12
4
votes
1 answer

What do these OpenOCD CPU states mean?

Here is what the documentation has to say: — Command: reset — Command: reset run — Command: reset halt — Command: reset init Perform as hard a reset as possible, using SRST if possible. All defined targets will be reset, and target events…
Vorac
  • 3,091
  • 5
  • 29
  • 52
4
votes
2 answers

STM32F4 Discovery + Mac OS X + GCC + OpenOCD + Eclipse

I'm interested in buying an STM32F4 Discovery from ST Microelectronics. I'm using Mac OS X, 10.8 and would like to use a toolchain including GCC OpenOCD for debugging Eclipse IDE / IntelliJ IDEA Ultimate and this must work on my Mac. Would this…
josef.van.niekerk
  • 3,600
  • 7
  • 44
  • 63
4
votes
3 answers

Program only runs when debugging in GDB - using Open OCD and Olimex arm-usb-ocd-h jtag to program at91sam3su

I'm trying to make my Atmel at91sam3u cortex-m3 arm chip make an LED blink. I have a Olimex ARM-USB-OCD-H jtag programmer, and I'm using Open OCD running on OS X to program my chip. I'm using the provided Open OCD startup scripts for the jtag…
Stepan
  • 41
  • 1
  • 2
4
votes
2 answers

STM32 SWO & OpenOCD with Variable SysClock

I have been using SWO with STM32 chips for debugging for a number of years. I have managed to side-step this issue until now. I would like to be able to use SWO for debugging while varying the SysClock frequency. This is an issue because OpenOCD…
Colorado.Rob
  • 148
  • 8
4
votes
1 answer

Can't program multiple chips using JTAG

SOLVED - LOOK UNDER "EDIT 3" SUBTITLE. I've got this two chips: Board with LPC4337(left) and board with ATSAM3X8E(right), JTAG interconnected, using FT2232H chip soldered on the board of the left as an interface. The first one (LPC4337) can be…
4
votes
1 answer

Using RTOS support in OpenOCD

I can see that OpenOCD is RTOS aware and it supports FreeRTOS, which I'm using at the moment. I have looked at various sources and cannot seem to figure how to use this feature.
errordeveloper
  • 475
  • 4
  • 13
3
votes
1 answer

Openocd cannot find CMSIS-DAP device

I compiled openocd from git (latest commit: March 7, 2021) with --enable-cmsis-dap. openocd cannot open my CMSIS-DAP device: openocd -f interface/cmsis-dap.cfg -f target/max32660.cfg Open On-Chip Debugger 0.11.0+dev-00056-g6448f70-dirty…
personal_cloud
  • 317
  • 4
  • 11
3
votes
1 answer

Flashing multi chips with JTAG using openocd

I'm newbie in this field. My task is I have to flash 6 devices with JTAG like the picture below. I'm currently success with flashing one device. Can someone give me advice how to flash all 6 devices? As I understand, when a device is being flashed,…
Tùng Bill
  • 31
  • 3
1
2 3 4 5