Questions tagged [openocd]

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

Filter by
Sorted by
Tagged with
16
votes
6answers
3k views

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 ...
15
votes
1answer
15k views

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'...
9
votes
0answers
2k views

Problems while trying to flash a memory using openocd and jtag [closed]

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 ...
7
votes
2answers
2k views

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 ...
6
votes
2answers
23k views

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: https://www.olimex.com/Products/ARM/ST/STM32-H103/) with the STM32-H103 development board from ...
5
votes
1answer
2k views

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 ...
4
votes
3answers
4k views

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 ...
4
votes
1answer
3k views

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.
4
votes
2answers
10k views

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 ...
3
votes
1answer
454 views

Reverse engineering target chip to be used with OpenOCD

I have a board that has JTAG pins and I want to connect OpenOCD to the board. However the CPU chip identification number is not written on the chip and I couldn't find the datasheet of the board. ...
3
votes
1answer
2k views

What do these OpenOCD CPU states mean?

Here is what the documentation has to say: ...
3
votes
1answer
604 views

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 ...
3
votes
1answer
1k views

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 ...
3
votes
1answer
1k views

How to use RPI 2 to debug RPI model B via JTAG with OpenOCD

I have a RPI 2 that I want to use for programming and debugging a RPI model B over JTAG for a bare metal project. Right now I'm having trouble to get the two boards to even talk to each other over ...
2
votes
1answer
2k views

Eclipse and OpenOCD works only, if I program the MCU on Discovery board

I'd like to program and debug an STM32F030 MCU with Eclipse, OpenOCD and ST-link. I have an STM32F4 Discovery board that includes an ST-link debugger. Programming the STM32F4 MCU on the discovery ...
2
votes
1answer
3k views

Is it possible to use openocd to program an atmega using an AVR ISP (mk2)?

I have an ATMega2560 on a custom board which I want to program with my AVRISP mkii. I have successfully programmed it using the Arduino IDE, and also over the commandline using avrdude. Is there a ...
2
votes
1answer
179 views

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? ...
2
votes
1answer
1k views

Multiple errors when writing image file with OpenOCD and Stlink v2 to NRF51822

I want to flash a firmware on my nrf51822 module I was trying an example from Nordic, I concatenated the bin file with the s110 file and it worked fine. Now, when I went ahead to flash the bin file, ...
2
votes
1answer
44 views

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 ...
2
votes
0answers
92 views

OpenOCD flash writing failure with STM32L071C8 MCU [closed]

I have designed custom-made PCB with STM32L071C8 MCU. I'm using OpenOCD 'master' branch and SWD interface via FT2232H to debug the MCU. I successfully did some RAM reading and Flash writing, erasing ...
2
votes
0answers
519 views

Memory layout problem when debugging, flashing works fine

My openocd configuration script: ...
1
vote
2answers
1k views

Crash when reaching the end of executable

I have an executable that crashes after main has finished all its instructions, and the last assembler instruction is executed. Just before the program crashes, I ...
1
vote
1answer
3k views

Is it possible to get ST-LINK's virtual COM port working without launching any program in Ubuntu?

I did some development on a Nucleo-64 board (specifically the NUCLEO-F303RE with the STM32F303RE microcontroller) and used OpenOCD and GDB with target remote :3333 ...
1
vote
1answer
569 views

When issuing GDB `continue` in RAM, can I write to the adresses from which I `continue`d?

I'm just writing some test programs in order to get to know the STM32F4 (ARM Cortex M4). The development board I'm using has U-Boot preinstalled in flash. When the board is up and running and U-Boot ...
1
vote
1answer
817 views

Why is it necessary to halt program execution for the breakpoint to be effective?

When I'm following this procedure, program execution is successfully stopped when the payload program is run: Setting breakpoint to beginning of program which is gets loaded by the bootloader ...
1
vote
1answer
3k views

openOCD flash 'erase_sector' command NOT erasing lpc1768?

I am trying to debug LPC1768 using a JTAG debugger and openOCD(version 0.7.0). My os is Win7 . I'm connetced to the openOCD via telnet(port 4444) commands like halt, flash info, resume etc do work ...
1
vote
2answers
1k views

Error in final launch sequence Failed for OpenOCD (Olimex) for ARM (STM32fxx)

I am using openOCD in eclipse for the arm STM32F10x series. After writing the whole code and building everything without error in the program, I am going to debug it and I am getting an error after ...
1
vote
0answers
91 views

OpenOCD: enabling SWD on STLINK-V3

I am starting with a simple STM32 board that has only SWD (i.e., SWDIO, SWCLK, SWO, and NRST) and 3V power supply. (Yes, I have double-checked the connections of all of the above pins, both on the ...
1
vote
1answer
172 views

Can't get Flyswatter2 probe to work with OpenOCD

I've got a Flyswatter2 flash/debug probe from the company Tin Can Tools (see https://www.tincantools.com/product/flyswatter2). Unfortunately, I can't get it to work with OpenOCD. Below is a detailed ...
1
vote
0answers
276 views

LPC-Link2 Not Working as CMSIS-DAP with OpenOCD

I'm working on a project with the NXP LPC824 using VisualGDB and OpenOCD. Using the LPCXpresso824-MAX dev board I had no trouble programming and debugging using OpenOCD. I am using the version of ...
1
vote
0answers
74 views

JTAG scan chain interrogation fails

I am currently trying to get my Bus Blaster v4.1a to work. I want to use openocd to communicate with a device over JTAG. The device that I want to communicate with is a Qualcomm_qca4531. First of all ...
1
vote
0answers
256 views

OpenOCD FT2232H as SWD debugger with STM32L0 mcu

I would like to debug my MCU with OpenOCD. I run this command: openocd -f interface/ftdi/minimodule-swd.cfg -f target/stm32l0.cfg and then I get this prints from ...
1
vote
0answers
111 views

OpenOCD debugger in Eclipse Neon 4.6.2 Error in final launch sequence

I have been struggling with OpenOCD debugger under Eclipse Neon 4.6.2. Whenever I run the debug configuration I receive below given error message I have been attempting to debug the STM32F417VGT6 MCU....
1
vote
1answer
460 views

JTAG, OpenOCD and Atmel SAM3X

I'm trying to set up OpenOCD debugging through a JTAG port on a custom board with an Atmel ATSAM3X8E microcontroller. OpenOCD is running on a Raspberry Pi using the bcm2835 native GPIO. The JTAG ...
0
votes
2answers
254 views

Live variable view using openOCD and VScode

I really like using VScode + cortex debug extension + openOCD over Keil or Eclipse in embedded projects. Although i wasn't able to figure out how to set up live variable view, which you can set up ...
0
votes
3answers
1k views

Why are words in reverse order when reading from a flash?

I dumped the contents of a NAND flash chip, and do not understand why would each of the words in the image be in the reverse order. This CFI-compatible flash is connected to a TI AR7 SoC that ...
0
votes
1answer
59 views

stm32f429 hardware development

I have built a custom stm32f429 board. It uses SPI, I2C, UART and CAN for communication with various sensors. This is my first stm32f429 board, i've designed boards around stm32f3 and f1 series before....
0
votes
2answers
330 views

How to connect custom stm32 board to debugger

I have a custom STM32 microcontroller board. I have verified all of the electrical connections, and I am able to program the board with Texane's st-flash utility. However, I would like to debug the ...
0
votes
2answers
401 views

stm32f051 Overwritten reserved

I think I may have overwritten the reserved bits when messing with GPIO on my board. Now when I try to connect with OpenOCD it gives an error. ...
0
votes
1answer
481 views

Strange error when connecting JTAG

My setup: Common) CPU: at91sam7x512, JTAG: olimex-arm-usb-tiny-h, proprietary single-CPY board 1) Windows 7, OpenOCD 0.0.4 <- works 2) Ubuntu 13.04, OpenOCD 0.7.0 <- strange error There ...
0
votes
1answer
177 views

Intermittent NVM programming error

Occasionally I'll get the following errors while programming my SAMD21 chip. Anyone know the reason? ...
0
votes
2answers
755 views

Programming a STM32F407 with a Raspberry PI: No answer on JTDO

Introduction Getting in touch for the first time with an ARM MCU (the STM32F407ZE), I am trying to generate a first working "Hello world!" blinking led. For programming the MCU, it seem possible ...
0
votes
1answer
382 views

XDS100v2 OpenOCD Support

I've read a lot of post saying that TIs XDS100v2 JTAG emulator is not supported by OpenOCD. However, looking at this link, I see that the XDS100v2 is a supported FTDI chip. So I'm kind of confused on ...
0
votes
1answer
2k views

OpenOCD init Failed

The title says it all. One thing to say before going into detail about the issue. I am a complete beginner at using the terminal in Ubuntu that I need help with the codes to fix this issue. Long ...
0
votes
0answers
31 views

Trying to write u-boot to router flash “Connection closed by foreign host”

I am trying to write a .bin file to the flash memory of my router. I am following the steps as outlined here as I am using the exact same router and a raspberry pi as well. However, although I am ...
0
votes
1answer
84 views

OpenOCD throws “JTAG scan chain interrogation failed: all zeroes” error

I am trying to install openWRT on a router using my Raspberry Pi Zero. I am following the exact steps as explained in http://www.alfredklomp.com/technology/experia-v8/ However, for some reason I keep ...
0
votes
0answers
12 views

OPENOCD: Flashed code doesn't persist after reset

I have a SAM4E-Xplained-Pro Board. Everything works ok with atmel studio. I'm trying to set a development environment with openOCD. I was able to load and run my code through gdb, but after resetting ...
0
votes
0answers
70 views

Programming issue when uploading bootloader to samd11 via OpenOCD on RPI

I'm attempting to flash a bootloader on to an atsamd11c14a using openocd on an rpi model 3b+ but encountering some trouble. No issues on installing openocd (following adafruit's guide) and I believe ...
0
votes
0answers
27 views

OpenOCD prints only the last command's result in terminal

I'm using a fresh build of OpenOCD (Open On-Chip Debugger 0.10.0+dev-01047-g09ac9ab1 (2020-02-05-18:51)) on Raspbian, trying to read a few register values (http://...
0
votes
0answers
17 views

OpenOCD Interpreter Flag

I'm using OpenOCD and GDB to program an STM32 processor. I'm planning to programatically interface with the GDB server that OpenOCD runs using a Python library: pygdbmi. The library states: To ...