Skip to content

Commit 1d3ada3

Browse files
Enhance build instructions for arm_executor_runner
Updated instructions to include building ExecuTorch libraries for the arm_executor_runner executable.
1 parent 604de1a commit 1d3ada3

1 file changed

Lines changed: 18 additions & 13 deletions

File tree

  • content/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm

content/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/4-build-model.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,28 @@ cd $ET_HOME
6868
python -m examples.arm.aot_arm_compiler --model_name=examples/arm/simple_nn.py --delegate --quantize --target=ethos-u85-256 --system_config=Ethos_U85_SYS_DRAM_Mid --memory_mode=Sram_Only
6969
```
7070

71-
From the Arm Examples directory, you can build an embedded Arm runner with the `.pte` included. This allows you to optimize the performance of your model, and ensures compatibility with the CPU kernels on the FVP. Finally, generate the executable `arm_executor_runner`.
71+
From the Arm Examples directory, you can build an embedded Arm runner with the `.pte` included. This allows you to optimize the performance of your model, and ensures compatibility with the CPU kernels on the FVP. Finally, build the ExecuTorch libraries and generate the executable `arm_executor_runner`.
7272

7373
```bash
74-
cd $HOME/executorch/examples/arm/executor_runner
74+
cmake -S "${ET_HOME}" \
75+
-B "${executorch_DIR}" \
76+
--preset arm-baremetal \
77+
-DCMAKE_BUILD_TYPE=Release
78+
79+
cmake --build "$executorch_DIR" --target install --parallel
7580

81+
cd $HOME/executorch/examples/arm/executor_runner
7682

77-
cmake -DCMAKE_BUILD_TYPE=Release \
78-
-DCMAKE_TOOLCHAIN_FILE=$ET_HOME/examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake \
79-
-DTARGET_CPU=cortex-m85 \
80-
-DET_DIR_PATH:PATH=$ET_HOME/ \
81-
-DET_BUILD_DIR_PATH:PATH=$ET_HOME/cmake-out \
82-
-DET_PTE_FILE_PATH:PATH=$ET_HOME/simple_nn_arm_delegate_ethos-u85-256.pte \
83-
-DETHOS_SDK_PATH:PATH=$ET_HOME/examples/arm/ethos-u-scratch/ethos-u \
84-
-DETHOSU_TARGET_NPU_CONFIG=ethos-u85-256 \
85-
-DPYTHON_EXECUTABLE=$HOME/executorch-venv/bin/python3 \
86-
-DSYSTEM_CONFIG=Ethos_U85_SYS_DRAM_Mid \
87-
-B $ET_HOME/examples/arm/executor_runner/cmake-out
83+
cmake -S "${ET_HOME}/examples/arm/executor_runner" \
84+
-B "${ET_HOME}/examples/arm/executor_runner/cmake-out" \
85+
-DCMAKE_BUILD_TYPE=Release \
86+
-DCMAKE_TOOLCHAIN_FILE=$ET_HOME/examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake \
87+
-DTARGET_CPU=cortex-m85 \
88+
-DET_PTE_FILE_PATH:PATH=$ET_HOME/simple_nn_arm_delegate_ethos-u85-256.pte \
89+
-DETHOS_SDK_PATH:PATH=$ET_HOME/examples/arm/ethos-u-scratch/ethos-u \
90+
-DETHOSU_TARGET_NPU_CONFIG=ethos-u85-256 \
91+
-DPYTHON_EXECUTABLE=$HOME/executorch-venv/bin/python3 \
92+
-DSYSTEM_CONFIG=Ethos_U85_SYS_DRAM_Mid \
8893

8994
cmake --build $ET_HOME/examples/arm/executor_runner/cmake-out --parallel -- arm_executor_runner
9095

0 commit comments

Comments
 (0)