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 required by the app's target setcmake/nsx/: copied NSX build helperssrc/: app-owned source code
3. App Model¶
NSX apps are lightweight bare-metal applications with an explicit supported target set and one active target per operation.
From the product perspective, the app is the primary user-facing unit.
Each declared target resolves:
- one board
- its SoC and starter profile
- its effective toolchain
targets.default supplies the active board unless a lifecycle command selects
another member of targets.supported with --board. Legacy singular
target: manifests remain a compatibility input, not the preferred shape for
new multi-target manifests.
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 initial selected target (and each declared target when the set is expanded)
- 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 against the targets to which a dependency applies before it is added to an app.
Each module declares compatibility for:
- boards
- socs
- toolchains
nsx module add fails fast when the module is incompatible with an applicable
supported target. A board-scoped dependency must name a subset of
targets.supported.
9. AmbiqSuite Provider Policy¶
AmbiqSuite provider modules are treated as target-specific infrastructure modules.
A single provider module, nsx-ambiqsuite, mirrors the upstream AmbiqSuite
stable baseline and serves every supported Apollo SoC.
For families with multiple validated minor lines, board defaults pin specific provider 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