Design Decisions¶
This document captures the design choices that define the current NSX workflow.
1. Product Boundary¶
NSX is primarily a Python tooling product with a thin build-helper payload.
The Python repo owns:
- the
nsxCLI and Python API - packaged templates
- packaged CMake helpers
- metadata schemas and the curated lock registry
- built-in board definitions
Firmware modules remain separate repos.
2. App Shape¶
The intended working layout after nsx create-app is:
nsx.yml: app metadata and module statemodules/: vendored module content resolved from the packaged registryboards/: vendored board definitions for the selected targetcmake/nsx/: copied NSX build helperssrc/: app-owned source code
3. App Model¶
NSX apps are lightweight, bare-metal, single-target applications.
From the product perspective, the app is the primary user-facing unit.
Each app targets:
- one board
- one SoC
- one toolchain
4. App Creation Flow¶
nsx is the top-level user interface.
The lifecycle is:
nsx create-app: create app skeleton, metadata, top-level CMake, and copy packagedcmake/nsxsupport- dependency resolution: determine the required board/module closure for the selected target
- source materialization: obtain module sources from curated registry-backed locations
- vendoring: copy required module and board sources into the app
nsx configure/build/flash/view: run the CMake-driven app lifecycle
Generated apps remain understandable as ordinary CMake projects.
5. Module Source Resolution¶
Module sources are resolved from the packaged registry and cloned from their upstream git repos on demand.
Role of git:
- clone or fetch module source repos
- provide deterministic source material for vendoring
Role of nsx:
- orchestrate app creation
- resolve module closure
- copy or replace vendored modules inside apps
- invoke build, flash, and view commands
Role of CMake:
- remain the build truth for compilation and linking
- express startup, linker, SDK, and target wiring
6. Vendored App Contents¶
Generated apps should be mostly self-contained after creation.
Expected layout:
CMakeLists.txtnsx.ymlsrc/cmake/nsx/modules/boards/
7. Board and SoC Policy¶
Board and SoC remain separate decision axes.
Why:
- SDK/provider choice is mostly SoC-family driven
- startup and linker policy are mostly SoC-driven with board-specific tuning
- some helper modules are board-specific because of wiring or EVB assumptions
8. Compatibility Enforcement¶
Module compatibility is validated before a module is added to an app.
Each module declares compatibility for:
- boards
- socs
- toolchains
nsx module add should fail fast when the module is incompatible with the
app target.
9. AmbiqSuite Provider Policy¶
AmbiqSuite provider modules are treated as target-specific infrastructure modules.
Examples:
nsx-ambiqsuite-r3nsx-ambiqsuite-r4nsx-ambiqsuite-r5
For families with multiple validated minor lines, board defaults pin specific provider branches or revisions in app metadata.
10. Scope of NSX¶
NSX is intended for:
- profiling-oriented apps
- bring-up and smoke-test apps
- simple interface examples
- lightweight bare-metal workflows