Configure and build
Neither of these commands needs a board. Run them from inside the app directory: NSX walks
up from your working directory to the nearest nsx.yml, so --app-dir is only needed when
you want to act on an app somewhere else.
Configure
Section titled “Configure”cd hello_ap510nsx configurensx configure does three things in order. It resolves every module constraint in
nsx.yml to an exact commit and writes nsx.lock. It makes modules/ match that lock,
cloning anything missing. Then it runs CMake to generate a Ninja build tree under
build/<board>/.
Captured on macOS 26 with the Arm GNU toolchain, in an app created by nsx create-app.
CMake’s compiler detection block is collapsed and the app path is replaced by
/home/you/hello_ap510. Because create-app already vendored the starter modules, the
sync step reports that they match; on an app created with --no-bootstrap, or after you
edit nsx.yml, this is where the clones happen instead.
Afterwards the app has three things it did not have before:
| Path | What it is |
|---|---|
nsx.lock |
The resolved graph: every module pinned to a commit. Commit this file. |
build/apollo510_evb/ |
The generated CMake and Ninja tree, one directory per board. |
.nsx/ |
NSX’s own bookkeeping, including the sync lock file. |
Your source tree stays clean: the generated .gitignore covers build/ and .nsx/, and
nsx configure writes a modules/.gitignore for the modules it re-acquires and a
cmake/.gitignore for cmake/nsx/.
nsx buildnsx build drives CMake and Ninja. If no build tree exists yet it configures first, so
nsx build on a fresh app is enough on its own.
Same host and app as above, with the middle of the Ninja log collapsed and the artifact path shortened. Ninja numbers the link step 23 of 24 and prints nothing for the last one. The section sizes are from that one build; yours will differ as soon as the app does.
The artifacts land in build/apollo510_evb/:
hello_ap510, the linked ELF. Under GCC it has no file extension.hello_ap510.bin, the raw image that gets programmed.hello_ap510.map, the linker map.jlink/, the generated SEGGER command files thatnsx flashandnsx viewuse.
Options you are likely to reach for
Section titled “Options you are likely to reach for”Both commands take the same core set. Full tables are on the
nsx configure and
nsx build reference pages.
- A positional
appargument instead ofcd. It takes an app name or directory and is resolved under./and./examples, sonsx build hello_worldfrom a source checkout builds the packaged example of that name. --boardoverrides the board innsx.ymlfor one run, which is how you build the same app for a second target.--toolchaintakesgcc,armclangoratfe.--frozenturns drift betweennsx.yml,nsx.lockandmodules/into an error instead of silently correcting it.nsx configure --frozenalways checks; onnsx build,nsx flashandnsx viewit only applies when a reconfigure is needed, so runnsx configure --frozenas the CI gate.--timeout SECONDSputs a wall clock budget on each subprocess.
nsx build adds three of its own: --jobs for parallelism, --target to build one
explicit CMake target, and --update to re-resolve constraints to upstream tip and
re-vendor before building.
Starting over
Section titled “Starting over”nsx clean # run the build system's clean targetnsx clean --full # remove the build directory outrightnsx clean --reset # also remove modules/ and .nsx/, back to a freshly cloned state--reset prompts before discarding locally modified files under modules/; --force
skips the prompt. See nsx clean.
You have an image. Flash, reset and view puts it on a board.