Skip to content

Commit 4cfe230

Browse files
committed
Seems like there is a cmake caching issue, trying to commit and then run from clean install
1 parent 75578c6 commit 4cfe230

File tree

7 files changed

+70
-30
lines changed

7 files changed

+70
-30
lines changed

backends/arm/scripts/build_executor_runner.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ set -eu
99
script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
1010
et_root_dir=$(cd ${script_dir}/../../.. && pwd)
1111
et_root_dir=$(realpath ${et_root_dir})
12-
toolchain_cmake=${et_root_dir}/examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake
12+
toolchain_cmake=${et_root_dir}/examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake
1313
setup_path_script=${et_root_dir}/examples/arm/ethos-u-scratch/setup_path.sh
1414
_setup_msg="please refer to ${et_root_dir}/examples/arm/setup.sh to properly install necessary tools."
1515

1616
pte_file=""
1717
target="ethos-u55-128"
18-
build_type="Release"
18+
build_type="Debug"
1919
bundleio=false
2020
system_config=""
2121
memory_mode=""
@@ -134,6 +134,8 @@ echo "Building with BundleIO/etdump/extra flags: ${build_bundleio_flags} ${build
134134
cmake \
135135
-DCMAKE_BUILD_TYPE=${build_type} \
136136
-DCMAKE_TOOLCHAIN_FILE=${toolchain_cmake} \
137+
-DCMAKE_C_COMPILER="/home/zephyruser/zephyr-sdk-0.16.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc" \
138+
-DCMAKE_CXX_COMPILER="/home/zephyruser/zephyr-sdk-0.16.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++" \
137139
-DTARGET_CPU=${target_cpu} \
138140
-DET_DIR_PATH:PATH=${et_root_dir} \
139141
-DET_BUILD_DIR_PATH:PATH=${et_build_dir} \
@@ -154,6 +156,6 @@ cmake --build ${output_folder}/cmake-out -j$(nproc) -- arm_executor_runner
154156

155157
echo "[${BASH_SOURCE[0]}] Generated baremetal elf file:"
156158
find ${output_folder}/cmake-out -name "arm_executor_runner"
157-
echo "executable_text: $(find ${output_folder}/cmake-out -name arm_executor_runner -exec arm-none-eabi-size {} \; | grep -v filename | awk '{print $1}') bytes"
158-
echo "executable_data: $(find ${output_folder}/cmake-out -name arm_executor_runner -exec arm-none-eabi-size {} \; | grep -v filename | awk '{print $2}') bytes"
159-
echo "executable_bss: $(find ${output_folder}/cmake-out -name arm_executor_runner -exec arm-none-eabi-size {} \; | grep -v filename | awk '{print $3}') bytes"
159+
echo "executable_text: $(find ${output_folder}/cmake-out -name arm_executor_runner -exec arm-zephyr-eabi-size {} \; | grep -v filename | awk '{print $1}') bytes"
160+
echo "executable_data: $(find ${output_folder}/cmake-out -name arm_executor_runner -exec arm-zephyr-eabi-size {} \; | grep -v filename | awk '{print $2}') bytes"
161+
echo "executable_bss: $(find ${output_folder}/cmake-out -name arm_executor_runner -exec arm-zephyr-eabi-size {} \; | grep -v filename | awk '{print $3}') bytes"

backends/arm/scripts/build_executorch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set -eu
1313
script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
1414
et_root_dir=$(cd ${script_dir}/../../.. && pwd)
1515
et_root_dir=$(realpath ${et_root_dir})
16-
toolchain_cmake=${script_dir}/../../../examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake
16+
toolchain_cmake=${script_dir}/../../../examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake
1717
toolchain_cmake=$(realpath ${toolchain_cmake})
1818
setup_path_script=${et_root_dir}/examples/arm/ethos-u-scratch/setup_path.sh
1919
_setup_msg="please refer to ${et_root_dir}/examples/arm/setup.sh to properly install necessary tools."

backends/arm/scripts/build_portable_kernels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set -eu
1313
script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
1414
et_root_dir=$(cd ${script_dir}/../../.. && pwd)
1515
et_root_dir=$(realpath ${et_root_dir})
16-
toolchain_cmake=${script_dir}/../../../examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake
16+
toolchain_cmake=${script_dir}/../../../examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake
1717
toolchain_cmake=$(realpath ${toolchain_cmake})
1818
setup_path_script=${et_root_dir}/examples/arm/ethos-u-scratch/setup_path.sh
1919
_setup_msg="please refer to ${et_root_dir}/examples/arm/setup.sh to properly install necessary tools."

backends/arm/test/setup_testing.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
1111
et_root_dir=$(cd ${script_dir}/../../.. && pwd)
1212
ethos_u_root_dir=${et_root_dir}/examples/arm/ethos-u-scratch/ethos-u
1313

14-
toolchain_cmake=${et_root_dir}/examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake
14+
toolchain_cmake=${et_root_dir}/examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake
1515
et_build_dir=${et_root_dir}/arm_test/cmake-out
1616
build_root_test_dir=${et_root_dir}/arm_test/arm_semihosting_executor_runner
1717

examples/arm/executor_runner/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ if(NOT DEFINED ET_PTE_FILE_PATH AND NOT ${SEMIHOSTING})
2121
)
2222
endif()
2323

24+
set(CMAKE_C_COMPILER arm-zephyr-eabi-gcc)
25+
set(CMAKE_CXX_COMPILER arm-zephyr-eabi-g++)
2426
# Example ExecuTorch demo for bare metal Cortex-M based systems
2527
set(ET_DIR_PATH
2628
"../../.."

examples/arm/run.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ done
9292
ethos_u_scratch_dir=$(realpath ${ethos_u_scratch_dir})
9393
setup_path_script=${ethos_u_scratch_dir}/setup_path.sh
9494
toolchain_cmake=${script_dir}/ethos-u-setup/arm-none-eabi-gcc.cmake
95+
toolchain_cmake=${script_dir}/ethos-u-setup/arm-zephyr-eabi-gcc.cmake
9596
_setup_msg="please refer to ${script_dir}/setup.sh to properly install necessary tools."
9697

9798

@@ -126,9 +127,9 @@ function check_setup () {
126127
fi
127128

128129
# If setup_path_script was correct all these checks should now pass
129-
hash arm-none-eabi-gcc \
130-
|| { echo "Could not find arm baremetal toolchain on PATH, ${_setup_msg}"; return 1; }
131-
130+
# hash arm-none-eabi-gcc \
131+
# || { echo "Could not find arm baremetal toolchain on PATH, ${_setup_msg}"; return 1; }
132+
#
132133
[[ -f ${toolchain_cmake} ]] \
133134
|| { echo "Could not find ${toolchain_cmake} file, ${_setup_msg}"; return 1; }
134135

tools/cmake/preset/zephyr.cmake

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,57 @@
55
# This source code is licensed under the BSD-style license found in the
66
# LICENSE file in the root directory of this source tree.
77

8-
set_overridable_option(EXECUTORCH_BUILD_PYBIND ON)
9-
set_overridable_option(CMAKE_CXX_STANDARD_REQUIRED ON)
10-
set_overridable_option(CMAKE_TOOLCHAIN_FILE "/home/zephyruser/executorch/examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake")
11-
set_overridable_option(CMAKE_SYSTEM_PROCESSOR cortex-m55)
12-
set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED OFF)
13-
set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED_AOT OFF)
14-
set_overridable_option(EXECUTORCH_ENABLE_LOGGING ON)
15-
set_overridable_option(EXECUTORCH_LOG_LEVEL Info)
16-
set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON)
17-
set_overridable_option(EXECUTORCH_BUILD_PTHREADPOOL ON)
18-
set_overridable_option(EXECUTORCH_BUILD_CPUINFO ON)
19-
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TENSOR ON)
20-
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL ON)
21-
set_overridable_option(EXECUTORCH_BUILD_KERNELS_CUSTOM ON)
22-
set_overridable_option(EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT ON)
23-
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON)
24-
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON)
25-
set_overridable_option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
26-
set_overridable_option(EXECUTORCH_BUILD_EXECUTOR_RUNNER ON)
8+
set(CMAKE_CXX_STANDARD 17)
9+
set(CMAKE_SYSTEM_PROCESSOR cortex-m55)
10+
set(CMAKE_BUILD_TYPE Release)
11+
set(PYTHON_EXECUTABLE /home/zephyruser/executorch/.venv/bin/python3)
12+
set(BUCK2 /home/zephyruser/executorch/buck2-bin/buck2-2025-05-06-201beb86106fecdc84e30260b0f1abb5bf576988)
13+
set(CMAKE_CXX_COMPILER_ID GNU)
14+
set(CMAKE_TOOLCHAIN_FILE /home/zephyruser/executorch/examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake)
15+
set(EXECUTORCH_ENABLE_LOGGING ON)
16+
set(EXECUTORCH_BUILD_COREML OFF)
17+
set(EXECUTORCH_FLATBUFFERS_MAX_ALIGNMENT 1024)
18+
set(EXECUTORCH_PAL_DEFAULT posix)
19+
set(EXECUTORCH_PAL_DEFAULT_FILE_PATH /home/zephyruser/executorch/runtime/platform/default/posix.cpp)
20+
set(EXECUTORCH_LOG_LEVEL Info)
21+
set(EXECUTORCH_ENABLE_PROGRAM_VERIFICATION OFF)
22+
set(EXECUTORCH_ENABLE_EVENT_TRACER OFF)
23+
set(EXECUTORCH_OPTIMIZE_SIZE ON)
24+
set(EXECUTORCH_BUILD_ARM_BAREMETAL OFF)
25+
set(EXECUTORCH_BUILD_KERNELS_CUSTOM OFF)
26+
set(EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT OFF)
27+
set(EXECUTORCH_BUILD_KERNELS_QUANTIZED_AOT OFF)
28+
set(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER OFF)
29+
set(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR OFF)
30+
set(EXECUTORCH_BUILD_EXTENSION_LLM OFF)
31+
set(EXECUTORCH_BUILD_EXTENSION_MODULE OFF)
32+
set(EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL OFF)
33+
set(EXECUTORCH_BUILD_EXTENSION_TENSOR OFF)
34+
set(EXECUTORCH_BUILD_EXTENSION_TRAINING OFF)
35+
set(EXECUTORCH_BUILD_EXTENSION_APPLE OFF)
36+
set(EXECUTORCH_BUILD_MPS OFF)
37+
set(EXECUTORCH_BUILD_NEURON OFF)
38+
set(EXECUTORCH_BUILD_OPENVINO OFF)
39+
set(EXECUTORCH_BUILD_PYBIND OFF)
40+
set(EXECUTORCH_BUILD_QNN OFF)
41+
set(EXECUTORCH_BUILD_KERNELS_OPTIMIZED OFF)
42+
set(EXECUTORCH_BUILD_KERNELS_QUANTIZED OFF)
43+
set(EXECUTORCH_BUILD_DEVTOOLS OFF)
44+
set(EXECUTORCH_BUILD_TESTS OFF)
45+
set(EXECUTORCH_NNLIB_OPT OFF)
46+
set(EXECUTORCH_CADENCE_CPU_RUNNER OFF)
47+
set(EXECUTORCH_BUILD_SIZE_TEST OFF)
48+
set(EXECUTORCH_BUILD_XNNPACK OFF)
49+
set(EXECUTORCH_BUILD_VULKAN OFF)
50+
set(EXECUTORCH_BUILD_PORTABLE_OPS ON)
51+
set(EXECUTORCH_USE_DL ON)
52+
set(EXECUTORCH_BUILD_CADENCE OFF)
53+
set(EXECUTORCH_BUILD_CORTEX_M ON)
54+
set(EXECUTORCH_COREML_BUILD_EXECUTOR_RUNNER OFF)
55+
set(EXECUTORCH_BUILD_PTHREADPOOL OFF)
56+
set(EXECUTORCH_BUILD_CPUINFO OFF)
57+
set(EXECUTORCH_BUILD_EXECUTOR_RUNNER ON)
58+
set(EXECUTORCH_XNNPACK_SHARED_WORKSPACE ON)
59+
set(EXECUTORCH_XNNPACK_ENABLE_KLEIDI OFF)
60+
set(EXECUTORCH_XNNPACK_ENABLE_WEIGHT_CACHE OFF)
61+
set(EXECUTORCH_USE_CPP_CODE_COVERAGE OFF)

0 commit comments

Comments
 (0)