diff --git a/doc/releases/migration-guide-4.2.rst b/doc/releases/migration-guide-4.2.rst index dbbe2d03ec2..553c83ffa0a 100644 --- a/doc/releases/migration-guide-4.2.rst +++ b/doc/releases/migration-guide-4.2.rst @@ -409,6 +409,9 @@ Misc * All memc_flexram_* namespaced things including kconfigs and C API have been changed to just flexram_*. +* Select ``CONFIG_ETHOS_U`` instead ``CONFIG_ARM_ETHOS_U`` to enable Ethos-U NPU driver. +* Rename all configs that have prefix ``CONFIG_ARM_ETHOS_U_`` to ``CONFIG_ETHOS_U_``. + Bluetooth ********* diff --git a/modules/hal_ethos_u/CMakeLists.txt b/modules/hal_ethos_u/CMakeLists.txt index 94949bcd9b4..547e6e4f8eb 100644 --- a/modules/hal_ethos_u/CMakeLists.txt +++ b/modules/hal_ethos_u/CMakeLists.txt @@ -2,23 +2,23 @@ # affiliates # SPDX-License-Identifier: Apache-2.0 -if(CONFIG_ARM_ETHOS_U AND CONFIG_MULTITHREADING) +if(CONFIG_ETHOS_U AND CONFIG_MULTITHREADING) # Due to CMP0126 not being NEW, ETHOSU_TARGET_NPU_CONFIG originally # as directory variable will fail to override that in ethos-u-core-driver # as cache variable. Fix by passing as cache variable. See: # https://cmake.org/cmake/help/latest/policy/CMP0126.html#policy:CMP0126 - set(ETHOSU_TARGET_NPU_CONFIG ${CONFIG_ARM_ETHOS_U_NPU_NAME} CACHE STRING "NPU configuration") + set(ETHOSU_TARGET_NPU_CONFIG ${CONFIG_ETHOS_U_NPU_NAME} CACHE STRING "NPU configuration") # Mapping log level from Zephyr (none=0, err=1, wrn=2, inf=3, dbg=4) to # Ethos-U driver (err=0, warn=1, info=2, debug=3) set(ETHOSU_LOG_SEVERITY_MAP err err warning info debug) list(LENGTH ETHOSU_LOG_SEVERITY_MAP ETHOSU_LOG_SEVERITY_MAP_LENGTH) - if (${CONFIG_ARM_ETHOS_U_LOG_LEVEL} EQUAL 0) + if (${CONFIG_ETHOS_U_LOG_LEVEL} EQUAL 0) # The Ethos-U driver does not have a corresponding "none" log level. Disable logging instead. set(ETHOSU_LOG_ENABLE OFF CACHE BOOL "") - elseif (${CONFIG_ARM_ETHOS_U_LOG_LEVEL} LESS "${ETHOSU_LOG_SEVERITY_MAP_LENGTH}") - list(GET ETHOSU_LOG_SEVERITY_MAP ${CONFIG_ARM_ETHOS_U_LOG_LEVEL} ETHOSU_LOG_SEVERITY) + elseif (${CONFIG_ETHOS_U_LOG_LEVEL} LESS "${ETHOSU_LOG_SEVERITY_MAP_LENGTH}") + list(GET ETHOSU_LOG_SEVERITY_MAP ${CONFIG_ETHOS_U_LOG_LEVEL} ETHOSU_LOG_SEVERITY) set(ETHOSU_LOG_SEVERITY ${ETHOSU_LOG_SEVERITY} CACHE STRING "") else() set(ETHOSU_LOG_SEVERITY debug CACHE STRING "") diff --git a/modules/hal_ethos_u/Kconfig b/modules/hal_ethos_u/Kconfig index 93715e6bcc6..3c384d74a22 100644 --- a/modules/hal_ethos_u/Kconfig +++ b/modules/hal_ethos_u/Kconfig @@ -2,93 +2,93 @@ # affiliates # SPDX-License-Identifier: Apache-2.0 -config ARM_ETHOS_U +config ETHOS_U bool "Ethos-U core driver" default n depends on MULTITHREADING help This option enables the Arm Ethos-U core driver. -if ARM_ETHOS_U -menu "Arm Ethos-U NPU configuration" -choice ARM_ETHOS_U_NPU_CONFIG - prompt "Arm Ethos-U NPU configuration" - default ARM_ETHOS_U55_128 if SOC_SERIES_MPS3 - default ARM_ETHOS_U65_256 if SOC_MPS4_CORSTONE315 - default ARM_ETHOS_U85_256 if SOC_MPS4_CORSTONE320 -config ARM_ETHOS_U55_64 +if ETHOS_U +menu "Ethos-U NPU configuration" +choice ETHOS_U_NPU_CONFIG + prompt "Ethos-U NPU configuration" + default ETHOS_U55_128 if SOC_SERIES_MPS3 + default ETHOS_U65_256 if SOC_MPS4_CORSTONE315 + default ETHOS_U85_256 if SOC_MPS4_CORSTONE320 +config ETHOS_U55_64 bool "using Ethos-U55 with 64 macs" -config ARM_ETHOS_U55_128 +config ETHOS_U55_128 bool "using Ethos-U55 with 128 macs" -config ARM_ETHOS_U55_256 +config ETHOS_U55_256 bool "using Ethos-U55 with 256 macs" -config ARM_ETHOS_U65_128 +config ETHOS_U65_128 bool "using Ethos-U65 with 128 macs" -config ARM_ETHOS_U65_256 +config ETHOS_U65_256 bool "using Ethos-U65 with 256 macs" -config ARM_ETHOS_U65_512 +config ETHOS_U65_512 bool "using Ethos-U65 with 512 macs" -config ARM_ETHOS_U85_128 +config ETHOS_U85_128 bool "using Ethos-U85 with 128 macs" -config ARM_ETHOS_U85_256 +config ETHOS_U85_256 bool "using Ethos-U85 with 256 macs" -config ARM_ETHOS_U85_512 +config ETHOS_U85_512 bool "using Ethos-U85 with 512 macs" -config ARM_ETHOS_U85_1024 +config ETHOS_U85_1024 bool "using Ethos-U85 with 1024 macs" -config ARM_ETHOS_U85_2048 +config ETHOS_U85_2048 bool "using Ethos-U85 with 2048 macs" endchoice endmenu -config ARM_ETHOS_U_NPU_NAME +config ETHOS_U_NPU_NAME string - default "ethos-u55-64" if ARM_ETHOS_U55_64 - default "ethos-u55-128" if ARM_ETHOS_U55_128 - default "ethos-u55-256" if ARM_ETHOS_U55_256 - default "ethos-u65-128" if ARM_ETHOS_U65_128 - default "ethos-u65-256" if ARM_ETHOS_U65_256 - default "ethos-u65-512" if ARM_ETHOS_U65_512 - default "ethos-u85-128" if ARM_ETHOS_U85_128 - default "ethos-u85-256" if ARM_ETHOS_U85_256 - default "ethos-u85-512" if ARM_ETHOS_U85_512 - default "ethos-u85-1024" if ARM_ETHOS_U85_1024 - default "ethos-u85-2048" if ARM_ETHOS_U85_2048 + default "ethos-u55-64" if ETHOS_U55_64 + default "ethos-u55-128" if ETHOS_U55_128 + default "ethos-u55-256" if ETHOS_U55_256 + default "ethos-u65-128" if ETHOS_U65_128 + default "ethos-u65-256" if ETHOS_U65_256 + default "ethos-u65-512" if ETHOS_U65_512 + default "ethos-u85-128" if ETHOS_U85_128 + default "ethos-u85-256" if ETHOS_U85_256 + default "ethos-u85-512" if ETHOS_U85_512 + default "ethos-u85-1024" if ETHOS_U85_1024 + default "ethos-u85-2048" if ETHOS_U85_2048 help - Name of the used Arm NPU + Name of the used Ethos-U NPU -choice "ARM_ETHOS_U_LOG_LEVEL_CHOICE" - prompt "Max compiled-in log level for arm_ethos_u" - default ARM_ETHOS_U_LOG_LEVEL_WRN +choice "ETHOS_U_LOG_LEVEL_CHOICE" + prompt "Max compiled-in log level for ETHOS_U" + default ETHOS_U_LOG_LEVEL_WRN depends on STDOUT_CONSOLE -config ARM_ETHOS_U_LOG_LEVEL_NONE +config ETHOS_U_LOG_LEVEL_NONE bool "None" -config ARM_ETHOS_U_LOG_LEVEL_ERR +config ETHOS_U_LOG_LEVEL_ERR bool "Error" -config ARM_ETHOS_U_LOG_LEVEL_WRN +config ETHOS_U_LOG_LEVEL_WRN bool "Warning" -config ARM_ETHOS_U_LOG_LEVEL_INF +config ETHOS_U_LOG_LEVEL_INF bool "Info" -config ARM_ETHOS_U_LOG_LEVEL_DBG +config ETHOS_U_LOG_LEVEL_DBG bool "Debug" -config ARM_ETHOS_U_LOG_LEVEL_DEFAULT +config ETHOS_U_LOG_LEVEL_DEFAULT bool "Default" endchoice -config ARM_ETHOS_U_LOG_LEVEL +config ETHOS_U_LOG_LEVEL int depends on STDOUT_CONSOLE - default 0 if ARM_ETHOS_U_LOG_LEVEL_NONE - default 1 if ARM_ETHOS_U_LOG_LEVEL_ERR - default 2 if ARM_ETHOS_U_LOG_LEVEL_WRN - default 3 if ARM_ETHOS_U_LOG_LEVEL_INF - default 4 if ARM_ETHOS_U_LOG_LEVEL_DBG + default 0 if ETHOS_U_LOG_LEVEL_NONE + default 1 if ETHOS_U_LOG_LEVEL_ERR + default 2 if ETHOS_U_LOG_LEVEL_WRN + default 3 if ETHOS_U_LOG_LEVEL_INF + default 4 if ETHOS_U_LOG_LEVEL_DBG endif diff --git a/modules/tflite-micro/CMakeLists.txt b/modules/tflite-micro/CMakeLists.txt index 95301b34c79..59990e1305f 100644 --- a/modules/tflite-micro/CMakeLists.txt +++ b/modules/tflite-micro/CMakeLists.txt @@ -24,7 +24,7 @@ if(CONFIG_TENSORFLOW_LITE_MICRO) zephyr_library_compile_definitions(CMSIS_NN) endif() - if (CONFIG_ARM_ETHOS_U) + if (CONFIG_ETHOS_U) set(ETHOSU_CO_PROCESSOR ethos_u) endif()