@@ -19,8 +19,8 @@ _setup_msg="please refer to ${et_root_dir}/examples/arm/setup.sh to properly ins
1919
2020et_build_root=" ${et_root_dir} /arm_test"
2121build_type=" Release"
22- build_devtools=false
23- build_with_etdump=false
22+ build_devtools=OFF
23+ build_with_etdump=OFF
2424
2525help () {
2626 echo " Usage: $( basename $0 ) [options]"
@@ -38,8 +38,8 @@ for arg in "$@"; do
3838 -h|--help) help ;;
3939 --et_build_root=* ) et_build_root=" ${arg#* =} " ;;
4040 --build_type=* ) build_type=" ${arg#* =} " ;;
41- --devtools) build_devtools=true ;;
42- --etdump) build_with_etdump=true ;;
41+ --devtools) build_devtools=ON ;;
42+ --etdump) build_with_etdump=ON ;;
4343 --toolchain=* ) toolchain=" ${arg#* =} " ;;
4444 * )
4545 ;;
4848
4949if [[ ${toolchain} == " arm-none-eabi-gcc" ]]; then
5050 toolchain_cmake=${et_root_dir} /examples/arm/ethos-u-setup/${toolchain} .cmake
51- elif [[ ${toolchain} == " arm-zephyr-eabi-gcc" ]]; then
51+ elif [[ ${toolchain} == " arm-zephyr-eabi-gcc" ]]; then
5252 toolchain_cmake=${et_root_dir} /examples/zephyr/x86_64-linux-arm-zephyr-eabi-gcc.cmake
5353else
5454 echo " Error: Invalid toolchain selection, provided: ${tolchain} "
@@ -74,40 +74,12 @@ cd "${et_root_dir}"
7474 echo " Build ExecuTorch target libs ${build_type} into '${et_build_dir} '" ;
7575 echo " --------------------------------------------------------------------------------" )
7676
77- build_devtools_flags=" -DEXECUTORCH_BUILD_DEVTOOLS=OFF "
78- if [ " $build_devtools " = true ] ; then
79- build_devtools_flags=" -DEXECUTORCH_BUILD_DEVTOOLS=ON "
80- fi
81-
82- build_with_etdump_flags=" -DEXECUTORCH_ENABLE_EVENT_TRACER=OFF "
83- if [ " $build_with_etdump " = true ] ; then
84- # Add DevTools flags use in the Target build below
85- build_with_etdump_flags=" -DEXECUTORCH_BUILD_DEVTOOLS=ON \
86- -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
87- -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=OFF \
88- -DFLATCC_ALLOW_WERROR=OFF "
89- fi
90-
91- echo " Building with Devtools: ${build_devtools_flags} ${build_with_etdump_flags} "
92-
93-
9477# Build
95- cmake \
96- -DCMAKE_INSTALL_PREFIX=${et_build_dir} \
97- -DCMAKE_BUILD_TYPE=${build_type} \
98- -DCMAKE_TOOLCHAIN_FILE=" ${toolchain_cmake} " \
99- -DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \
100- -DEXECUTORCH_BUILD_ARM_BAREMETAL=ON \
101- -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
102- -DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \
103- -DEXECUTORCH_BUILD_CORTEX_M=ON \
104- -DEXECUTORCH_ENABLE_LOGGING=ON \
105- ${build_devtools_flags} \
106- ${build_with_etdump_flags} \
107- -B" ${et_build_dir} " \
108- " ${et_root_dir} "
109-
110- echo " [$( basename $0 ) ] Configured CMAKE"
78+ cmake -DCMAKE_TOOLCHAIN_FILE=${toolchain_cmake} \
79+ -DCMAKE_BUILD_TYPE=Release \
80+ -DEXECUTORCH_BUILD_DEVTOOLS=$build_devtools \
81+ -DEXECUTORCH_BUILD_ARM_ETDUMP=$build_with_etdump \
82+ --preset arm-baremetal -B${et_build_dir}
11183
11284cmake --build ${et_build_dir} -j$( nproc) --target install --config ${build_type} --
11385
0 commit comments