A simple CLI tool that starts a GDB server and automatically attaches GDB to debug embedded targets.
- π Multiple backends - Supports J-Link, ST-Link, and QEMU
- π Auto-discovery - Automatically finds STM32CubeProgrammer installation
- π§Ή Clean lifecycle - Starts the server, attaches GDB, and cleans up when done
- βοΈ Configurable - JSON-based backend configuration for easy customization
pip install gdbrunnergdbrunner <backend> [options] elfjlink- J-Link GDB serverstlink- ST-Link GDB serverqemu- QEMU ARM emulator
# π§ Start J-Link and attach GDB
gdbrunner jlink --device STM32H743VI firmware.elf
# π§ Start ST-Link and attach GDB (auto-discovers CubeProgrammer path)
gdbrunner stlink firmware.elf
# π Dry run - print server command without running
gdbrunner jlink --device STM32H743VI --dryrun firmware.elf
# πΊ Show server output for debugging connection issues
gdbrunner stlink --show-output firmware.elf
# π₯οΈ Start QEMU and attach GDB
gdbrunner qemu --machine mps2-an500 firmware.elfRun gdbrunner --help for all options.
MIT