@@ -19,8 +19,8 @@ _setup_msg="please refer to ${et_root_dir}/examples/arm/setup.sh to properly ins
19
19
20
20
et_build_root=" ${et_root_dir} /arm_test"
21
21
build_type=" Release"
22
- build_devtools=false
23
- build_with_etdump=false
22
+ build_devtools=OFF
23
+ build_with_etdump=OFF
24
24
25
25
help () {
26
26
echo " Usage: $( basename $0 ) [options]"
@@ -38,8 +38,8 @@ for arg in "$@"; do
38
38
-h|--help) help ;;
39
39
--et_build_root=* ) et_build_root=" ${arg#* =} " ;;
40
40
--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 ;;
43
43
--toolchain=* ) toolchain=" ${arg#* =} " ;;
44
44
* )
45
45
;;
48
48
49
49
if [[ ${toolchain} == " arm-none-eabi-gcc" ]]; then
50
50
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
52
52
toolchain_cmake=${et_root_dir} /examples/zephyr/x86_64-linux-arm-zephyr-eabi-gcc.cmake
53
53
else
54
54
echo " Error: Invalid toolchain selection, provided: ${tolchain} "
@@ -74,40 +74,12 @@ cd "${et_root_dir}"
74
74
echo " Build ExecuTorch target libs ${build_type} into '${et_build_dir} '" ;
75
75
echo " --------------------------------------------------------------------------------" )
76
76
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
-
94
77
# 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}
111
83
112
84
cmake --build ${et_build_dir} -j$( nproc) --target install --config ${build_type} --
113
85
0 commit comments