Skip to content

Commit 35cf9ad

Browse files
ccli8kartben
authored andcommitted
modules: hal_ethos_u: fix failure to override ETHOSU_TARGET_NPU_CONFIG
This fixes failure to override ETHOSU_TARGET_NPU_CONFIG in hal_ethos_u due to CMP0126 not being NEW. See: https://cmake.org/cmake/help/latest/policy/CMP0126.html#policy:CMP0126 Signed-off-by: Chun-Chieh Li <[email protected]>
1 parent 30c441b commit 35cf9ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/hal_ethos_u/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
if(CONFIG_ARM_ETHOS_U AND CONFIG_MULTITHREADING)
6-
set(ETHOSU_TARGET_NPU_CONFIG ${CONFIG_ARM_ETHOS_U_NPU_NAME})
6+
# Due to CMP0126 not being NEW, ETHOSU_TARGET_NPU_CONFIG originally
7+
# as directory variable will fail to override that in ethos-u-core-driver
8+
# as cache variable. Fix by passing as cache variable. See:
9+
# https://cmake.org/cmake/help/latest/policy/CMP0126.html#policy:CMP0126
10+
set(ETHOSU_TARGET_NPU_CONFIG ${CONFIG_ARM_ETHOS_U_NPU_NAME} CACHE STRING "NPU configuration")
711

812
# Mapping log level from Zephyr (none=0, err=1, wrn=2, inf=3, dbg=4) to
913
# Ethos-U driver (err=0, warn=1, info=2, debug=3)

0 commit comments

Comments
 (0)