# nsx configure

Configure a generated NSX app with CMake

## Usage

```text
nsx configure [-h] [--app-dir APP_DIR] [--board BOARD]
                     [--build-dir BUILD_DIR] [--toolchain TOOLCHAIN]
                     [--sdk-root SDK_ROOT] [--probe-serial PROBE_SERIAL]
                     [--frozen] [--timeout SECONDS]
                     [app]
```

## Arguments

| Option | Value | Default | Description |
| --- | --- | --- | --- |
| app | value | optional | App name or directory (overrides --app-dir; resolved under ./ and ./examples) |

## Options

| Option | Value | Default | Description |
| --- | --- | --- | --- |
| --app-dir APP_DIR | value | . | App directory containing nsx.yml |
| --board BOARD | value | optional | Override board from nsx.yml |
| --build-dir BUILD_DIR | value | optional | Build directory override |
| --toolchain TOOLCHAIN | value | optional | Toolchain override (gcc, armclang, atfe) |
| --sdk-root SDK_ROOT | value | optional | Optional out-of-tree AmbiqSuite root passed as NSX_AMBIQSUITE_ROOT_OVERRIDE |
| --probe-serial PROBE_SERIAL | value | optional | Optional SEGGER J-Link USB serial number to use for generated flash/view targets |
| --frozen | flag | optional | Error on any drift between nsx.yml, nsx.lock, and modules/ instead of correcting it; modules missing from modules/ are fetched at their locked revision and verified |
| --timeout SECONDS | value | optional | Wall-clock budget per subprocess (seconds). Kills the whole process group on timeout. |

## Notes

`--board` must name a declared supported target. `--sdk-root` builds against an out-of-tree
AmbiqSuite root (`NSX_AMBIQSUITE_ROOT_OVERRIDE`) instead of the vendored `nsx-ambiqsuite`;
it must be a directory, it warns that `nsx.lock` and the SBOM no longer describe the
binary, and it cannot be combined with `--frozen`. Omitting it clears a previously cached
override.

```bash
cd <app-dir>
nsx configure
```

Run `nsx commands --json` for the authoritative machine-readable argument schema.

`--app-dir` names the app directory containing `nsx.yml`; when it is omitted NSX searches
upward from the current directory. The positional `app` argument overrides `--app-dir` and
is resolved under the current directory and under `examples/`.

The out-of-tree SDK escape hatch is described under [SDK provider selection](/neuralspotx/guides/modules/sdk-providers/) in the guides.

`-v/--verbose`, `-q/--quiet` are parsed by `nsx` itself, so they go before the command name, as `nsx -v configure`.
