Skip to content

Examples

Ten ready-to-build example apps live in the examples/ directory of the neuralspotx repo. Each one is a self-contained NSX app — the same shape that nsx create-app produces — with its own nsx.yml manifest and a combined nsx.lock receipt.

Most examples are multi-target: a single lean nsx.yml declares a targets: block, so the same app builds across sibling boards (e.g. apollo510_evb, apollo510b_evb, apollo330mP_evb). See the support matrix below for each example's declared targets.

Quick Start

The recommended flow is to install nsx once and create your own app (see Getting Started). To try a maintained example without a git clone or a separate workspace, use the snippet below. (Note: this still downloads the full repository tarball; tar then extracts only the example folder you ask for.)

curl -fL https://github.com/AmbiqAI/neuralspotx/archive/refs/heads/main.tar.gz \
  | tar -xz -f - --strip-components=2 neuralspotx-main/examples/hello_world
cd hello_world

nsx configure
nsx build
nsx flash   # requires J-Link
nsx view    # live SWO stream

Contributors who already have the repo cloned can simply cd neuralspotx/examples/hello_world and run the same commands.

Because those commands run from the app root, NSX resolves the app directory from the nearest nsx.yml automatically.

Available Examples

  • hello_world


    Minimal SWO printf loop. Start here to verify your toolchain and board.

  • freertos_blinky


    FreeRTOS task blinking an LED with periodic tick logging over SWO.

  • coremark


    EEMBC CoreMark with ITCM execution and NVM shutdown for clean power numbers.

  • power_benchmark


    Three-phase power measurement: CoreMark, idle, and deep sleep.

  • pmu_profiling


    Cortex-M55 PMU cycle counting, cache hits, and branch mispredicts.

  • kws_infer


    TFLite Micro keyword-spotting inference with CMSIS-NN kernels.

  • ble_webble


    Minimal Bluetooth LE peripheral with app-owned Cordio/WSF policy.

  • audio_capture


    PDM microphone capture with RMS/peak statistics over SWO.

  • usb_serial


    USB CDC virtual COM port echo app.

  • usb_rpc


    USB vendor-class RPC with nanopb protobuf serialization.

Target Support Matrix

Generated by scripts/gen_examples_table.py — do not edit by hand. Boards come from each nsx.yml targets.supported; ★ marks the default.

Example Tier Capabilities Supported boards Tested on HW Status
freertos_blinky basics freertos, rtos apollo510_evb ★, apollo510b_evb, apollo330mP_evb, apollo510dL_evb, apollo4p_blue_kxr_evb apollo510_evb tested
hello_world basics swo, printf apollo510_evb ★, apollo510b_evb, apollo330mP_evb, apollo510dL_evb, apollo4p_blue_kxr_evb apollo510_evb tested
usb_serial basics usb, cdc-acm apollo510_evb ★, apollo510b_evb, apollo330mP_evb, apollo510dL_evb apollo510_evb tested
audio_capture capabilities audio, pdm apollo510_evb ★, apollo510b_evb, apollo330mP_evb, apollo510dL_evb apollo510_evb tested
coremark capabilities benchmark, rtt, itcm apollo510_evb ★, apollo510b_evb, apollo330mP_evb, apollo510dL_evb, apollo4p_blue_kxr_evb builds
pmu_profiling capabilities pmu, profiling apollo510_evb ★, apollo510b_evb, apollo330mP_evb, apollo510dL_evb apollo510_evb tested
power_benchmark capabilities power, gpio, timer apollo510_evb ★, apollo510b_evb builds
ble_webble integrations ble, cordio, freertos apollo4p_blue_kxr_evb ★, apollo3p_evb, apollo510b_evb apollo3p_evb, apollo4p_blue_kxr_evb, apollo510b_evb experimental
kws_infer integrations ml, tflite, cmsis-nn, helia-rt apollo510_evb ★, apollo510b_evb, apollo330mP_evb apollo510_evb tested
usb_rpc integrations usb, rpc, nanopb apollo510_evb ★, apollo510b_evb, apollo330mP_evb, apollo510dL_evb apollo510_evb tested