Code Scaffolds
How FirmwareMaestro generates production-ready Zephyr project files for Nordic targets.
The Code Scaffold Generator produces a complete, flashable Zephyr project. It uses the project's accumulated context (PRD, HAL, architecture) to generate files that compile against the current nRF Connect SDK.
What you get
A typical scaffold for an nRF52840 BLE peripheral includes:
my-project/
├── src/
│ └── main.c # Entry point with thread/task setup
├── boards/
│ └── nrf52840dk_nrf52840.overlay # Device Tree overlay
├── CMakeLists.txt # Build configuration
├── prj.conf # Kconfig fragments
├── Kconfig # Project-level Kconfig (optional)
└── .cursorrules # AI editor guidanceHow it works
Under the hood, the Code Scaffold Generator:
Detects the project type
Based on hardware target and use case, it selects the right Zephyr project template (BLE peripheral, BLE central, Matter accessory, cellular socket app, etc.).
Builds the file plan
Determines exactly which files are needed (main.c, overlays, Kconfig
fragments) for the chosen template.
Generates each file
Uses the two-stage AI pipeline with Google Search Grounding to ensure the generated code matches the current nRF Connect SDK API surface, not stale training data.
Validates against MISRA C
Generated source aims for MISRA C compliance — explicit types, no hidden control flow, defensive null checks, and clear error propagation.
Supported targets
All 21 supported Nordic targets get their own correct Device Tree overlay and board identifier. Series include:
- nRF52 — nRF52805, nRF52810, nRF52811, nRF52820, nRF52832, nRF52833, nRF52840
- nRF53 — nRF5340 (DK + audio variants)
- nRF54 — nRF54H20, nRF54L05, nRF54L10, nRF54L15, nRF54LM20
- nRF70 — nRF7000, nRF7001, nRF7002 (Wi-Fi 6 companion ICs)
- nRF91 — nRF9131, nRF9151, nRF9160, nRF9161, nRF9280 (cellular IoT)
Iterating on a scaffold
The scaffold is a starting point — you'll likely want to refine it. Two ways:
- In the dashboard — use the Refine Document Generator to ask for targeted changes.
- In your editor with the fwm CLI —
open the generated project, run
fwm, and iterate in Edit mode.
Downloading
From the project view, click Download ZIP. The archive contains:
/docs/— every document you generated/src/,/boards/, root files — the scaffold
You can drop the contents straight into your nRF Connect SDK workspace
and build with west build -b <board>.