Skip to content
heliaCORE
Getting started
HELIA HUB

CMSIS-Pack

heliaCORE publishes a CMSIS-Pack on every release. The pack ships with two Cvariants so you can choose between rebuilding from source or linking a prebuilt GCC archive when the component conditions match your project.

Start with a working board application and matching target/compiler settings. See Requirements before choosing source or prebuilt kernels.

Terminal window
VERSION=7.39.2 # x-release-please-version
curl -LO https://github.com/AmbiqAI/ns-cmsis-nn/releases/download/v${VERSION}/Ambiq.NS-CMSIS-NN.${VERSION}.pack
# CMSIS-Toolbox
cpackget add Ambiq.NS-CMSIS-NN.${VERSION}.pack
# Keil MDK / older tooling
# Double-click the .pack file, or import via Pack Installer.

The pack defines the component heliaCORE NN Lib from Ambiq with two variants:

Cvariant What you get When to use
Source The CMSIS-NN sources compiled by your project’s toolchain. You want maximum control / portability.
Prebuilt A vendored libns-cmsis-nn.a we built with GCC. The release’s per-arch SDK tarball ns-cmsis-nn-<cpu>-gcc-<version>.tar.gz names that GCC in its manifest.json, under toolchain.version; the pack vendors the same archive bytes. Your GCC project matches a supported archive condition.

Merge this component entry into your existing .cproject.yml file:

Your application.cproject.yml · Source variant
project:
components:
- component: Ambiq::Machine Learning:NN Lib:heliaCORE&Source

Keep the project’s existing board/device, compiler, groups, and other components. Do not replace the whole project with this fragment. To select a supported prebuilt configuration, change &Source to &Prebuilt, not add a second entry. Build with your existing solution/context using CMSIS-Toolbox.

Install the downloaded pack with your IDE’s pack manager. In its component selection view, choose Ambiq → Machine Learning → NN Lib → heliaCORE and select exactly one variant, Source or Prebuilt. Rebuild the board project so the generated include paths and selected sources or library are applied.

Include the headers as #include "arm_nnfunctions.h". Both components also put the pack root on the include path, so the source-tree spelling #include "Include/arm_nnfunctions.h", which TFLM-based runtimes such as heliaRT use, resolves without an extra add-path. Both spellings reach the same file.

The Prebuilt Cvariant is gated by per-arch conditions. The pack ships GCC-built archives for:

  • ARMv6-M (cortex-m0 / cortex-m0+)
  • ARMv7E-M (cortex-m4 with FPv4 SP-D16)
  • ARMv8.1-M MVE (cortex-m55)

If your target doesn’t match one of these, switch to the Source Cvariant — the kernels will be recompiled by your toolchain.

Build your existing board project using its IDE or CMSIS-Toolbox build command. For Source, confirm the build compiles the component sources. For Prebuilt, confirm the final link includes the selected libns-cmsis-nn.a.

The pack includes floating-point sources and headers, but selecting the component does not enable their APIs. Both float feature macros default to 0. In Source mode, set numeric preprocessor definitions in your project’s compiler settings for both the component sources and the application code that calls them. For FP32 only, use:

Compiler definitions · FP32 only
ARM_NN_ENABLE_F32=1
ARM_NN_ENABLE_F16=0

Set ARM_NN_ENABLE_F16=1 as well when you need FP16 and your target and compiler support it. These are C preprocessor values, not CMake ON/OFF options. Rebuild the component after changing them and inspect a verbose compiler command to confirm the definitions reach the kernel sources. See Toolchains for FP16 requirements.

In Prebuilt mode, definitions only expose declarations to your application; they cannot add functions to the archive. Check features.f32 and features.f16 in the matching release’s GCC SDK manifest.json, and enable only features that archive contains. Keep the pack, SDK metadata, and headers on the same release. Use Source mode if the archive lacks the required floating-point kernels.

Before building firmware, confirm your project has exactly one heliaCORE NN Lib component selected:

  • Use Source when your IDE/toolchain should compile the kernels.
  • Use Prebuilt when the target architecture and ABI match the selected archive.

For CMSIS-Toolbox projects, inspect the resolved component list after pack resolution and confirm the selected component includes the intended Cvariant. For IDE projects, open the pack/component view and verify the Source or Prebuilt variant before the first full build.

Symptom Check
Prebuilt cannot be selected Confirm the compiler is GCC and the architecture matches a pack condition; otherwise choose Source.
Duplicate symbols Remove duplicate Source/Prebuilt selections or another CMSIS-NN library.
Component not found Confirm the pack is installed and the component name matches the YAML above.

Run First kernel to verify an actual kernel result on your target. Keep activation kernels enabled for that example.