DocsDebug
Debug
Neural Inverse integrates with GDB for hardware debugging through 5 supported debug servers.
GDB Server Support
| Server | Use Case | Probes |
|---|---|---|
| OpenOCD | Universal, open-source | ST-Link, CMSIS-DAP, FTDI, J-Link |
| J-Link GDB Server | Segger probes | J-Link |
| pyOCD | CMSIS-DAP | Any CMSIS-DAP probe |
| st-util | ST-Link dedicated | ST-Link v2/v3 |
| QEMU | Simulation (no hardware) | None |
Starting a Debug Session
> fw_debug_startThis:
- Starts the configured GDB server
- Connects GDB client
- Loads the ELF binary
- Halts at reset vector or main()
Debug Controls
| Tool | Description |
|---|---|
fw_debug_start | Start GDB server + connect |
fw_debug_stop | Disconnect and stop server |
fw_debug_halt | Halt the CPU |
fw_debug_continue | Resume execution |
fw_debug_step | Step one source line |
fw_debug_step_instruction | Step one assembly instruction |
fw_debug_set_breakpoint | Set breakpoint at location |
fw_debug_remove_breakpoint | Remove breakpoint |
fw_debug_read_registers | Read all CPU registers |
fw_debug_read_memory | Read memory at address |
fw_debug_backtrace | Show call stack |
fw_debug_combined | Execute multiple debug commands |
Breakpoints
Set breakpoints by source location:
> fw_debug_set_breakpoint src/main.c:42Or by address:
> fw_debug_set_breakpoint 0x08001234Register Inspection
> fw_debug_read_registersReturns all CPU registers (R0-R15, PSR, MSP, PSP, etc.) with current values.
For peripheral registers, use the SVD-based tools:
> fw_get_register_map USART1Memory Inspection
> fw_debug_read_memory 0x20000000 256Reads 256 bytes from address 0x20000000 in hex format.
Call Stack
> fw_debug_backtraceShows the current call stack with function names, source locations, and frame addresses.
GDB/MI Passthrough
For advanced use cases, send raw GDB/MI commands:
> fw_debug_combined -exec-nextQEMU Simulation
For development without hardware:
> fw_qemu_availabilityChecks if QEMU supports your target MCU. When available, you can debug entirely in software.
> fw_renode_board_checkChecks Renode simulation support for your board.
Was this page helpful?
Last edited