Neural Inverse is Open Source →
DocsBuild & Flash

Build & Flash

Supported Build Systems

SystemCommandDetection
PlatformIOpio run / pio uploadplatformio.ini
CMakecmake --buildCMakeLists.txt + toolchain file
MakemakeMakefile with cross-compiler
ESP-IDFidf.py build / idf.py flashsdkconfig
Cargocargo build --target <triple>Cargo.toml + embedded-hal
Arduino CLIarduino-cli compile / uploadArduino includes
Zephyrwest build / west flashprj.conf / west.yml

Building

> fw_build

Runs the detected build system's compile command. Build output is parsed for errors and warnings from:

  • GCC / arm-none-eabi-gcc
  • Clang
  • IAR
  • Keil ARM-CC
  • rustc
  • xtensa-gcc

Errors include file:line references that navigate directly to the source.

Binary Size Analysis

> fw_binary_size

Shows section breakdown:

Section   Size      % Flash    % RAM
.text     45,312    4.3%       —
.rodata   12,048    1.1%       —
.data     1,024     0.1%       0.5%
.bss      8,192     —          4.2%
─────────────────────────────────────
Total     58,384    5.5% Flash  4.7% RAM

ELF Analysis

> fw_read_elf_symbols

Reads symbols from the built ELF via arm-none-eabi-nm.

> fw_lookup_symbols DMA1_Stream0_IRQHandler

Finds symbol addresses and sizes.

> fw_disassemble main 50

Disassembles a function via arm-none-eabi-objdump -d.

Stack Usage Analysis

> fw_analyze_stack_usage

Parses .su files generated by GCC's -fstack-usage flag. Reports per-function stack consumption.

> fw_check_stack_overflow_risk

Identifies functions with deep call chains that may overflow the stack.

MAP File Analysis

> fw_analyze_map_file

Parses the linker map file (auto-detected from build/, out/, cmake-build-*/) to show memory usage per section and per object file.

Flash Programming

Detecting Tools

> fw_detect_flash_tools

Scans for available programmers on your system.

Supported Programmers

ToolTargetsInterface
OpenOCDUniversal (STM32, nRF, RP2040, ESP32, RISC-V)SWD / JTAG
STM32CubeProgrammerSTM32 familySWD / JTAG / UART / USB DFU
esptoolESP32 variantsUART (USB-UART bridge)
nrfjprogNordic nRF52/53/91SWD (J-Link)
J-LinkUniversal (Segger probes)SWD / JTAG
pyOCDCMSIS-DAP probesSWD
dfu-utilUSB DFU bootloaderUSB

Flashing

> fw_flash

Uses the configured flash tool (from Firmware.inverse or auto-detected).

Toolchain Check

> fw_check_toolchain

Verifies that required toolchain components are installed and accessible (compiler, linker, flash tool, debug server).

Build Commands

> fw_get_build_command

Returns the exact build command that would be executed for the current project configuration.

Agent Tools Summary

ToolDescription
fw_buildCompile the project
fw_flashFlash binary to target
fw_binary_sizeSection size breakdown
fw_get_build_errorsParse build errors
fw_get_build_commandShow build command
fw_detect_flash_toolsFind available programmers
fw_check_toolchainVerify toolchain installation
fw_analyze_map_fileParse linker map file
fw_analyze_stack_usageParse GCC .su files
fw_read_elf_symbolsRead ELF symbol table
fw_lookup_symbolsFind symbol by name
fw_disassembleDisassemble function
fw_check_stack_overflow_riskIdentify overflow-prone functions

Was this page helpful?

Last edited