Change Note 2026-03-07
Debugging and tools.
Overview
This update brings pretty good support for debugging, new tools, and starts an overhaul of existing tools and their documentation. Debugging support has for quite some time just been a slow-burning side project, which finally shows tangible and practically useful results. Neither the tools nor the debugging features are dependent on the Oberon RTK framework, but can be used with any program built with Astrobe.
Debugging
While the SEGGER Ozone debugger has been central to the efforts up to now, the goal has always been to use non-commercial and whenever possible free tools. All software tools below are free, the hardware probes are not. Unsurprisingly.
- The ELF files created with two tools can now be used with
- the GDB command-line debugger
- Visual Studio Code with the CortexDebug extension (which is based on GDB)
- Currently supported and tested are
- RP2350 on Pico2
- STM32U585 on B-U585I-IOT02A
- Tested probes:
- Raspberry Pi Debug Probe (~15 EUR)
- STM’s on-board ST-LINK (free with the board)
- SEGGER J-Link (~70 to 650+ EUR)
- Tested debug servers:
- OpenOCD
- SEGGER J-Link server
- Documentation:
- Debugging Overview
- Debugging How-to – a short tutorial
- External Tools – finding and installing the required external tools
- tools: see below
- Concept in a nutshell:
- basis are the
.lstfiles created by the Astrobe compiler, which show the full source code including comments, interleaved with the corresponding assembly code, as well as the.mapand.binfiles; - based on the successful compilation and linking of a program,
gen-rdbcreates a directory with.alstfiles, as outlined in the last change note; make-elfparses the.alstfiles to extract DWARF debug and symbol data to create an ELF file for the debugging (or for program upload in general);- the
.alstfiles are the source files for debugging.
- basis are the
- Multi-pane debugging of an RP2350/Pico2, remotely connected via the RPi Debug Probe and OpenOCD (as usual, click the thingie at top right to enlarge):
- center-right: source file viewers, breakpoints can be set by clicking the gutter, the code execution status is indicated by the yellow pointer)
- left, from top:
- registers, variables with the fields of one RECORD displayed
- call stack
- breakpoints
- view of UART0’s hardware registers
- bottom: raw GDB terminal
Tools
- With a growing set of tools, it was time to structure and organise things a bit better, starting with the naming.
- The tools have received revamped documentation pages, structured roughly like a Unix man-page.
- gen-rdb – new doc, formerly
makerdb - make-elf – updated doc, expanded functionality, formerly
makeelf - make-uf2 – updated doc, no new functionality, formerly
makeuf2 - picoload – new doc, no new functionality
- gen-lib – updated doc, no new functionality, formerly
make-lib - gen-bin-res – updated doc, no new functionality, formerly
makebres - gen-secure – new doc, no new functionality, formerly
makesec - gen-pio-oberon – updated doc, no new functionality, formerly
pio2o
- gen-rdb – new doc, formerly
gen-rdbandmake-elfdo the heavy lifting for creating the DWARF data necessary for debugging.- There’s now also some doc about running the Python tools.
Outlook
- Multi-core debugging should work, but requires better evaluation and testing.
- Same for interrupts.
- Plan: running tests on programs based on a descriptive test spec using scripted GDB, directly on the target.