Oberon RTK

Your First Debug Session

RTK-specific knowledge for your first debug build and debugger session on RP2040, RP2350, or STM32

Overview

This page is a short companion to the debug build pages and Debugging: it collects the RTK-specific knowledge you need before your first debug build and debugger session. Familiarity with Astrobe and with Your First Build is assumed, ideally with at least one successful non-debug build under your belt.

Debug builds add DWARF debug data and symbol tables to the program, enabling source-level stepping, variable inspection, and breakpoints via GDB (command line) or Cortex-Debug (in VS Code).

Read this page first, then follow the build pages for your target:

The running example is BlinkPlus, the same as in Your First Build.

Debug Builds Produce ELF, Not UF2

The UF2 format carries only raw binary blocks with target addresses; it has no section structure for DWARF debug data or a symbol table. Even on RP, the debug pipeline therefore produces an ELF (<program>.elf) – see UF2 and ELF: a Comparison for the full comparison.

  • gen-rdb runs after Astrobe's link to produce per-module .alst files.
  • make-elf --debug bundles the program binary, the DWARF data, and the symbol table into the ELF.

(Non-debug builds can also produce an ELF, but it's optional; for debugging it's mandatory.)

Loading Is via the Debugger

The debugger – Cortex-Debug in VS Code, or GDB from the command line – flashes the ELF directly through the GDB server (OpenOCD). You no longer drag-drop a UF2 to BOOTSEL or run STM32CubeProgrammer manually.

See Debugging for the operational detail: Cortex-Debug launch configurations, the GDB command-line walkthrough, the per-MCU monitor reset halt sequencing for RP2040 / RP2350, and so on.

Executable Binaries Are 100% the Same

A point worth highlighting: the program binary the debugger flashes is byte-identical with or without --debug. The DWARF data and symbols are separate ELF sections that the debugger consumes but the target ignores – there is no run-time "debug overhead". The same ELF can be flashed and run outside a debugger, behaving identically to its non-debug sibling.

Last updated: 21 May 2026