4 ms·
> * One sits on my electronics workbench and runs OpenOCD and allows BlackMagic Probes to export GDB as a service over the network. That lets me debug from anyw
by korethr 7y ago
> * One sits on my electronics workbench and runs OpenOCD and allows BlackMagic Probes to export GDB as a service over the network. That lets me debug from anywhere without burning a USB port or adding additional software.
This sounds cool and interesting. Can you elaborate on the setup and some of the ways you've used it?
- ChuckMcM 7y agoIts pretty simple really, I built OpenOCD from source on the RPi (that is just download the github repo[1] and add some libraries like libusb), when you run OpenOCD, by default it opens a gdb server on port 3333 and a telnet server on 4444. From anywhere on the network when you start arm-none-eabi-gdb, you can type target extended-remote debug:3333 And poof you're connected to what ever dev board OpenOCD id debugging. Then just load your .elf file (which flashes it) and start it and you are off to the races. Since the Black Magic Probe has its own gdb server you wrap it with nc(1) so on the Pi you run nc -kl 1234 < /dev/ttyACM0 > /dev/ttyACM0 and now you can connect to port 1234 on the debug server. At which point you're talking to the BMP. The ports are selectable so I typically set up as many ports as I need (depends on how many sessions I might be running) and write them on a boogie board[2]. Of course I've got that particular RasPi mapped to the host name 'debug' for that reason, the one that runs the waveforms software is named 'instruments' :-) [1] https://github.com/ntfreak/openocd.git https://github.com/ntfreak/openocd.git [2] https://myboogieboard.com/ https://myboogieboard.com/