Neural Inverse is Open Source →
DocsProject Configuration

Project Configuration

Firmware.inverse

The primary project manifest. Located at workspace root.

{
  "neuralInverseFirmware": true,
  "version": "1",
  "mcu": "STM32F407VGT6",
  "board": "STM32F4DISCOVERY",
  "rtos": "FreeRTOS",
  "buildSystem": "cmake",
  "hal": "stm32-hal",
  "compliance": ["misra-c-2012", "iec-61508"],
  "datasheets": ["docs/stm32f407_rm.pdf", "docs/stm32f407_ds.pdf"],
  "svd": "docs/STM32F407.svd",
  "createdAt": 1742300000000
}
FieldRequiredDescription
neuralInverseFirmwareYesMust be true — discriminator field
versionYesSchema version ("1")
mcuYesExact MCU variant from database
boardNoBoard name (shown in status bar)
rtosNoRTOS: FreeRTOS, Zephyr, Embassy, ThreadX, etc.
buildSystemNocmake, platformio, make, esp-idf, cargo, zephyr, arduino
halNoHAL framework identifier
complianceNoArray of framework IDs
datasheetsNoRelative paths to PDF datasheets
svdNoRelative path to SVD file
createdAtNoCreation timestamp (epoch ms)

On Load Behavior

When Firmware.inverse is detected:

  1. Session starts automatically with the specified MCU
  2. SVD file is parsed → register maps loaded
  3. PDF datasheets are parsed → timing constraints, errata extracted
  4. Compliance frameworks activated
  5. Hardware context injected into all AI system prompts

NI.md

Project-specific configuration for the AI agent. Auto-loaded at every session start.

# NI.md

## Build

make -j$(nproc) BOARD=stm32f4discovery


## Flash

openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program build/firmware.elf verify reset exit"


## Debug

gdb openocd swd


## Target
STM32F407VGT6

## Rules
- Always use HAL_Delay() instead of busy-wait loops
- DMA transfers must use double-buffering for audio streams
- All ISRs must complete within 10Ξs

## IMPORTANT
- Never modify vendor/STM32F4xx_HAL_Driver/ files
- Flash writes must be sector-aligned

The agent reads NI.md and follows its rules during code generation and modifications.

.niignore

Blocks Neural Inverse from editing certain files. Uses gitignore-compatible syntax.

# Vendor HAL — never edit
vendor/

# Generated files
*.bin
*.hex
*.elf
**/generated/**

# Re-include specific generated config
!src/gen/config.h

# Third-party libraries
lib/CMSIS/
lib/FreeRTOS/

Check if a file is blocked:

> fw_niignore_check src/vendor/stm32f4xx_hal_spi.c

.inverse/ Directory

Workspace-local firmware development artifacts:

.inverse/
├── checkpoints/          # Workspace snapshots
│   ├── cp_001.json
│   └── cp_002.json
├── captures/             # Logic analyzer captures
│   └── cap_abc123/
├── rtt/                  # RTT channel logs
│   └── session_001/
│       ├── ch0.log
│       └── ch1.log
├── hil-tests/            # HIL test definitions
│   ├── uart_loopback.json
│   └── power_sleep.json
└── hil-results/          # HIL test results
    └── 1742300000_uart_loopback.json

Checkpoints

Workspace state snapshots for rollback and experimentation:

> fw_checkpoint_create label="before DMA refactor"
> fw_checkpoint_list
> fw_checkpoint_rewind cp_001
> fw_checkpoint_fork cp_001 label="experimental branch"

Checkpoints capture file state so you can safely experiment with hardware configurations and revert if something breaks.


Was this page helpful?

Last edited