Skip to content

Commit d8e5dcd

Browse files
committed
Support building testing target for Corstone-320
Signed-off-by: Per Åstrand <[email protected]> Change-Id: I98ec1f0e27a801fc4686cf3f63807ba81b8e88ce
1 parent 1892399 commit d8e5dcd

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

backends/arm/test/runner_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ def run_corstone300(
226226
os.path.join(self.intermediate_path, f"{name}.bin"),
227227
)
228228
elf_path = os.path.join(
229-
"cmake-out", "arm_semihosting_executor_runner", "arm_executor_runner"
229+
"cmake-out",
230+
"arm_semihosting_executor_runner_corstone-300",
231+
"arm_executor_runner",
230232
)
231233
assert os.path.exists(
232234
elf_path

backends/arm/test/setup_testing.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,30 @@ ethos_u_root_dir=${et_root_dir}/examples/arm/ethos-u-scratch/ethos-u
1313

1414
toolchain_cmake=${et_root_dir}/examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake
1515
et_build_dir=${et_root_dir}/cmake-out
16-
build_test_dir=${et_build_dir}/arm_semihosting_executor_runner
16+
build_root_test_dir=${et_build_dir}/arm_semihosting_executor_runner
1717
fvp_model=FVP_Corstone_SSE-300_Ethos-U55
1818

1919
# Build Arm Baremetal executor_runner in semihosting mode.
2020
# Put in backends/arm/test/res to be used by unit tests.
2121
function build_semihosting_executorch_runner() {
22+
target_board=$1
23+
build_test_dir=${build_root_test_dir}_${target_board}
24+
echo "[${FUNCNAME[0]}] Configuring ${target_board}"
25+
if [[ ${target_board} == "corstone-300" ]]; then
26+
local target_cpu=cortex-m55
27+
elif [[ ${target_board} == "corstone-320" ]]; then
28+
local target_cpu=cortex-m85
29+
else
30+
echo "[${FUNCNAME[0]}] ERROR: Invalid target_board specified!"
31+
exit 1
32+
fi
2233
cd ${et_root_dir}/examples/arm/executor_runner
2334
pwd
2435
mkdir -p ${build_test_dir}
2536
cmake -DCMAKE_TOOLCHAIN_FILE=${toolchain_cmake} \
26-
-DTARGET_CPU=cortex-m55 \
37+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
38+
-DTARGET_CPU=${target_cpu} \
39+
-DTARGET_BOARD=${target_board} \
2740
-DSEMIHOSTING=ON \
2841
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${build_test_dir} \
2942
-B ${build_test_dir} \
@@ -40,4 +53,6 @@ function build_semihosting_executorch_runner() {
4053
find ${build_test_dir} -name "arm_executor_runner"
4154
}
4255

43-
build_semihosting_executorch_runner
56+
build_semihosting_executorch_runner corstone-300
57+
58+
build_semihosting_executorch_runner corstone-320

0 commit comments

Comments
 (0)