News for hackers. Stuff that matters.
Re:Ask HN: What do you do with your Raspberry Pi? by ChuckMcM on Monday June 24, 2019 @06:44PM (#20269315)
Its 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

[2] https://myboogieboard.com/

There are no comments on this comment yet.