6 years, 2 months ago.

GDB issue when debugging

I've followed all the setup steps carefully. I'm trying to run the mbed_blinky example on DISCO_L475VG_IOT01A in eclipse on macOS with OpenOCD. I've followed these steps: https://os.mbed.com/docs/latest/tutorials/eclipse.html

OpenOCD runs fine. The problem seems to be in GDB:

Error in final launch sequence Failed to execute MI command: -target-select remote localhost:3333 Error message from debugger back end: Truncated register 16 in remote 'g' packet Failed to execute MI command: -target-select remote localhost:3333 Error message from debugger back end: Truncated register 16 in remote 'g' packet Truncated register 16 in remote 'g' packet

/media/uploads/nrbrook/screen_shot_2018-02-08_at_14.47.21.png

2 Answers

6 years, 2 months ago.

Hi Nich, I use openOCD v10 and gdb ( 6-2017-q2-update) in a terminal Windows and it works pretty good without problems. I use STM32L0 and mutiple STM32-L4 MCUs (but no L475VG).

My "openocd.cfg" looks like this:

openocd.cfg

add_script_search_dir "/Applications/GNU ARM Eclipse/OpenOCD/0.10.0-201701241841/scripts"
source [find board/st_nucleo_l476rg.cfg]
itm ports on
tpiu config internal /dev/stderr uart off 80000000

6 years, 2 months ago.

I gave up trying to get it to go with Eclipse, but I do now have things running (on a Mac) with Visual Studio Code (using a Nucleo 411 board). There is a crucial part missing from the instructions - see

https://os.mbed.com/forum/bugs-suggestions/topic/28935/?page=1#comment-54555

but after fixing that, iy works fairly well, using openocd and the gnu arm tools.

For eclipse, there is a great plugin for ARM development: https://gnu-mcu-eclipse.github.io/ It is not a one-click installation, but you will find all neccessary tools in the instructions/download of that site. For some evalboards you need to update the firmware for the built in debugger, this information can be found on the mbed hardware page for that particular board.

posted by Johannes Stratmann 14 Feb 2018