Neural Inverse is Open Source →
DocsDebug
DocsDebug

Debug

Neural Inverse integrates with GDB for hardware debugging through 5 supported debug servers.

GDB Server Support

ServerUse CaseProbes
OpenOCDUniversal, open-sourceST-Link, CMSIS-DAP, FTDI, J-Link
J-Link GDB ServerSegger probesJ-Link
pyOCDCMSIS-DAPAny CMSIS-DAP probe
st-utilST-Link dedicatedST-Link v2/v3
QEMUSimulation (no hardware)None

Starting a Debug Session

> fw_debug_start

This:

  1. Starts the configured GDB server
  2. Connects GDB client
  3. Loads the ELF binary
  4. Halts at reset vector or main()

Debug Controls

ToolDescription
fw_debug_startStart GDB server + connect
fw_debug_stopDisconnect and stop server
fw_debug_haltHalt the CPU
fw_debug_continueResume execution
fw_debug_stepStep one source line
fw_debug_step_instructionStep one assembly instruction
fw_debug_set_breakpointSet breakpoint at location
fw_debug_remove_breakpointRemove breakpoint
fw_debug_read_registersRead all CPU registers
fw_debug_read_memoryRead memory at address
fw_debug_backtraceShow call stack
fw_debug_combinedExecute multiple debug commands

Breakpoints

Set breakpoints by source location:

> fw_debug_set_breakpoint src/main.c:42

Or by address:

> fw_debug_set_breakpoint 0x08001234

Register Inspection

> fw_debug_read_registers

Returns all CPU registers (R0-R15, PSR, MSP, PSP, etc.) with current values.

For peripheral registers, use the SVD-based tools:

> fw_get_register_map USART1

Memory Inspection

> fw_debug_read_memory 0x20000000 256

Reads 256 bytes from address 0x20000000 in hex format.

Call Stack

> fw_debug_backtrace

Shows 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-next

QEMU Simulation

For development without hardware:

> fw_qemu_availability

Checks if QEMU supports your target MCU. When available, you can debug entirely in software.

> fw_renode_board_check

Checks Renode simulation support for your board.


Was this page helpful?

Last edited