Blackmagic + gdbgui

 Sometimes it really helps to have a nice GUI for GDB

Finding an IDE that supports *correctly* remote gdb debugging as used with Arm or RiscV boards is difficult.

There is one option that seems to work ok : gdbgui

The principle is that the UI is actually your favorite browser

How to start it easily with the backmagic ?

1- create a blackmagic gdb init script

target extended-remote /dev/ttyBmpGdb
monitor connect_srst enable
monitor swdp_scan
attach 1
load
compare-sections
set mem inaccessible-by-default off
set confirm off

2- start gdbgui through a small shell script

#!/bin/bash
export F=$PWD/$@
echo "Loading $F"
gdbgui -g "/home/fx/Arduino_stm32/arm-gcc-2020q4/bin/arm-none-eabi-gdb-py3 -x /home/fx/blackmagic.gdb ${F}"

(you'll need to adapt those 2 scripts for your configuration : path to gdb, path to blackmagic.gdb, device to use etc...)

then
bash ~/gdbgui.sh myelf.elf

and it starts. 

A small warning, i have to go to the output panel and press enter or else it gets stuck waiting for a key press



Comments

Popular posts from this blog

Component tester with STM32 : Part 1 ADC, Resistor

Fixing the INA3221

INA3221, weird wiring