Skip to content
heliaPROFILER
User guide
HELIA

Toolchains

Choose the cross-compiler that builds the firmware. hpx builds through neuralSPOT-X, which supports three Cortex-M toolchains; the choice changes build time, binary size and cycle counts, so hold the model, engine and target settings fixed when comparing compilers. Supported combinations depend on the engine and board.

At least one toolchain installed and found by hpx doctor (Install covers GCC). Arm Compiler 6 needs a licence; ATfE needs ATFE_ROOT.

target.toolchain Compiler Linker Cost to set up Pick it when
arm-none-eabi-gcc (default; gcc is the accepted alias) GNU Arm Embedded GNU ld free; install a supported host package First setup, CI without a licence, cross-platform reproducibility. The default heliaRT registry module builds with it.
armclang Arm Compiler 6 armlink licence required Cycle-count optimisation on Cortex-M55, or confirming a result replicates across compilers. Not covered by ExecuTorch validation.
atfe Arm Toolchain for Embedded (LLVM) LLD free download, ATFE_ROOT An open LLVM toolchain; preview status in hpx. Builds the heliaRT registry flow and ExecuTorch end to end.

The four accepted values are the Toolchain vocabulary in src/helia_profiler/vocab.py: arm-none-eabi-gcc, gcc, armclang, atfe. Arm Compiler 5 is not among them and is not supported; there is no flag or key for it.

Terminal window
hpx profile model.tflite --toolchain armclang
target:
toolchain: armclang

The selection flows to nsx configure --toolchain. GCC is the special case: when arm-none-eabi-gcc or gcc is selected hpx omits the flag so neuralSPOT-X uses its default GCC configuration; armclang and atfe are passed through. Binary sections are probed with arm-none-eabi-size for GCC, fromelf for Arm Compiler 6 and llvm-size from ATFE_ROOT/bin for ATfE.

Install as on Install, then verify:

Terminal window
arm-none-eabi-gcc --version
arm-none-eabi-size --version

Compiler results depend on the model, the engine, the optimisation settings and the clock, so measure rather than assume. Same model, three toolchains, three directories:

Terminal window
hpx profile model.tflite --toolchain gcc --output-dir results/gcc
hpx profile model.tflite --toolchain armclang --output-dir results/armclang
hpx profile model.tflite --toolchain atfe --output-dir results/atfe
hpx compare results/gcc results/armclang

The work directory is not shared between toolchains; each run configures and builds from scratch. Hold the engine, board and counters constant and vary only --toolchain, otherwise a cycle delta could be any of them. The toolchain comparison example is that recipe with captured output.

run_metadata.json records the resolved toolchain and the compiler version it found; the terminal report’s memory table names the size tool used. Different toolchains produce different cycle counts for the same model, which is the point of measuring.

Capture transports for how the data leaves the board, or Engines if the engine you want constrains the toolchain (ExecuTorch is validated on GCC and ATfE).