Neural Inverse is Open Source →
GuidesFirmware & Embedded
GuidesOpen Source ContributingFirmware & Embedded

Firmware & Embedded

Open with Cmd+Alt+F. Purpose-built for embedded engineers working with microcontrollers.

Source: src/vs/workbench/contrib/neuralInverseFirmware/


MCU Database

357+ MCU variants across 11 manufacturers:

ManufacturerFamilies
STMicroelectronicsSTM32 F0, F1, F4, F7, L0, L4, H7, U5, C0
Nordic SemiconductornRF52, nRF53
EspressifESP32, ESP32-S3, ESP32-C3, ESP32-C6
Raspberry PiRP2040
NXPi.MX RT, LPC, Kinetis
MicrochipSAM, PIC32, AVR
Texas InstrumentsC2000, MSP430, CC series
RenesasRA, RX, RL78
InfineonAURIX TC3xx, PSoC, XMC
SiFiveRISC-V cores
GigaDeviceGD32

Each entry includes: core type, max clock, flash/RAM sizes, FPU/MPU/DSP flags, GPIO count, peripheral list, memory map, and common dev boards.

Auto-Detection

When you open a workspace, the firmware module scans for project markers (CMakeLists.txt with FreeRTOS/Zephyr, platformio.ini, Arduino sketches, etc.) and auto-loads the relevant MCU profile.


SVD Register Maps

CMSIS-SVD (System View Description) files are parsed on demand:

  • Fetches SVD XML from CMSIS Pack Index or local cache
  • Parses full peripheral trees with bit-field detail
  • Handles derivedFrom inheritance at peripheral and register level
  • Expands clusters and dimension arrays (e.g., GPIOA[0..15])
  • Default value inheritance (size, access, resetValue)

The parsed register map is available to:

  • Agent tools (fw_get_register_map, fw_get_bit_field_info)
  • LSP hover provider (shows register docs on hover)
  • Autocomplete (peripheral and register name completions)

Datasheet Intelligence

Drop a PDF datasheet and the agent extracts structured data:

  1. Extraction — PDF parsed page by page
  2. Classification — each page categorized (register map, timing, errata, pinout, electrical specs)
  3. LLM Reclassification — uncertain pages verified with LLM
  4. Caching — content-hash based, zero re-processing on re-open
  5. Citations — all extracted data links back to source page numbers

Agent Tools (22 tools)

Available in sidebar chat and Power Mode when a firmware project is detected:

CategoryTools
MCU Infofw_get_mcu_info, fw_list_peripherals, fw_search_mcu
Registersfw_get_register_map, fw_get_bit_field_info
Erratafw_get_errata
Code Genfw_codegen_peripheral_init, fw_codegen_isr, fw_codegen_dma, fw_codegen_clock
Buildfw_build, fw_flash, fw_binary_size
Serialfw_serial_monitor, fw_serial_send
Debugfw_debug_break, fw_debug_step, fw_debug_memory_read, fw_debug_memory_write
Compliancefw_misra_check, fw_cert_c_check, fw_safety_audit
Simulationfw_sim_discover

Serial Monitor

Built-in serial port communication:

  • Web Serial API for browser-based access
  • 10,000-line ring buffer
  • Baud rate auto-detection
  • Debug probe auto-detection (ST-Link, J-Link, CMSIS-DAP, FTDI, CH340)
  • Send/receive with timestamp

Platform Knowledge Packs

Injected into every agent session when working on a supported platform:

PlatformContext provided
STM32HAL/LL patterns, clock tree, DMA streams, NVIC priorities
ESP32ESP-IDF APIs, partition tables, WiFi/BLE patterns
nRF (Zephyr)Zephyr device tree, BLE stack, power management
RP2040PIO state machines, DMA channels, multicore patterns

Build System Integration

Build SystemDetectionCapabilities
PlatformIOplatformio.iniBuild, flash, monitor, library management
CMakeCMakeLists.txtBuild, flash (with probe config)
ESP-IDFsdkconfig, idf.pyBuild, flash, monitor, menuconfig
MakeMakefileBuild
Arduino.ino filesBuild, flash via Arduino CLI
Zephyrprj.conf, west manifestBuild, flash, debug

Context Injection

When a firmware session is active, hardware context is automatically injected into:

  • Sidebar chat system prompt
  • Power Mode system prompt
  • Any tool call that benefits from MCU awareness

This means you can ask "set up UART2 at 115200 baud" and the agent already knows your exact MCU, its UART peripheral registers, and the correct HAL calls.


Contributing

Key files:

  • neuralInverseFirmware/common/mcuDatabase.ts — MCU variant data
  • neuralInverseFirmware/browser/engine/svd/svdParserService.ts — SVD XML parser
  • neuralInverseFirmware/browser/engine/agentTools/firmwareAgentToolService.ts — tool definitions
  • neuralInverseFirmware/browser/engine/serial/serialMonitorService.ts — serial port
  • neuralInverseFirmware/browser/engine/hardwareContext/hardwareContextProvider.ts — context injection

Was this page helpful?