Browse Source

modules: hal_ethos_u: Update ARM_ETHOS_U config

- Update to use ETHOS_U config instead of ARM_ETHOS_U
- Update prefix ETHOS_U_ for all configs that use ARM_ETHOS_U_

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
pull/74629/head
Khoa Nguyen 2 weeks ago committed by Benjamin Cabé
parent
commit
c99f456cf1
  1. 3
      doc/releases/migration-guide-4.2.rst
  2. 10
      modules/hal_ethos_u/CMakeLists.txt
  3. 94
      modules/hal_ethos_u/Kconfig
  4. 2
      modules/tflite-micro/CMakeLists.txt

3
doc/releases/migration-guide-4.2.rst

@ -409,6 +409,9 @@ Misc @@ -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
*********

10
modules/hal_ethos_u/CMakeLists.txt

@ -2,23 +2,23 @@ @@ -2,23 +2,23 @@
# affiliates <open-source-office@arm.com></text>
# 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 "")

94
modules/hal_ethos_u/Kconfig

@ -2,93 +2,93 @@ @@ -2,93 +2,93 @@
# affiliates <open-source-office@arm.com></text>
# 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

2
modules/tflite-micro/CMakeLists.txt

@ -24,7 +24,7 @@ if(CONFIG_TENSORFLOW_LITE_MICRO) @@ -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()

Loading…
Cancel
Save