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>
This commit is contained in:
parent
42b2624531
commit
c99f456cf1
@ -409,6 +409,9 @@ Misc
|
|||||||
* All memc_flexram_* namespaced things including kconfigs and C API
|
* All memc_flexram_* namespaced things including kconfigs and C API
|
||||||
have been changed to just flexram_*.
|
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
|
Bluetooth
|
||||||
*********
|
*********
|
||||||
|
|
||||||
|
|||||||
@ -2,23 +2,23 @@
|
|||||||
# affiliates <open-source-office@arm.com></text>
|
# affiliates <open-source-office@arm.com></text>
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# 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
|
# 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 directory variable will fail to override that in ethos-u-core-driver
|
||||||
# as cache variable. Fix by passing as cache variable. See:
|
# as cache variable. Fix by passing as cache variable. See:
|
||||||
# https://cmake.org/cmake/help/latest/policy/CMP0126.html#policy:CMP0126
|
# 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
|
# 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)
|
# Ethos-U driver (err=0, warn=1, info=2, debug=3)
|
||||||
set(ETHOSU_LOG_SEVERITY_MAP err err warning info debug)
|
set(ETHOSU_LOG_SEVERITY_MAP err err warning info debug)
|
||||||
list(LENGTH ETHOSU_LOG_SEVERITY_MAP ETHOSU_LOG_SEVERITY_MAP_LENGTH)
|
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.
|
# The Ethos-U driver does not have a corresponding "none" log level. Disable logging instead.
|
||||||
set(ETHOSU_LOG_ENABLE OFF CACHE BOOL "")
|
set(ETHOSU_LOG_ENABLE OFF CACHE BOOL "")
|
||||||
elseif (${CONFIG_ARM_ETHOS_U_LOG_LEVEL} LESS "${ETHOSU_LOG_SEVERITY_MAP_LENGTH}")
|
elseif (${CONFIG_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)
|
list(GET ETHOSU_LOG_SEVERITY_MAP ${CONFIG_ETHOS_U_LOG_LEVEL} ETHOSU_LOG_SEVERITY)
|
||||||
set(ETHOSU_LOG_SEVERITY ${ETHOSU_LOG_SEVERITY} CACHE STRING "")
|
set(ETHOSU_LOG_SEVERITY ${ETHOSU_LOG_SEVERITY} CACHE STRING "")
|
||||||
else()
|
else()
|
||||||
set(ETHOSU_LOG_SEVERITY debug CACHE STRING "")
|
set(ETHOSU_LOG_SEVERITY debug CACHE STRING "")
|
||||||
|
|||||||
@ -2,93 +2,93 @@
|
|||||||
# affiliates <open-source-office@arm.com></text>
|
# affiliates <open-source-office@arm.com></text>
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
config ARM_ETHOS_U
|
config ETHOS_U
|
||||||
bool "Ethos-U core driver"
|
bool "Ethos-U core driver"
|
||||||
default n
|
default n
|
||||||
depends on MULTITHREADING
|
depends on MULTITHREADING
|
||||||
help
|
help
|
||||||
This option enables the Arm Ethos-U core driver.
|
This option enables the Arm Ethos-U core driver.
|
||||||
|
|
||||||
if ARM_ETHOS_U
|
if ETHOS_U
|
||||||
menu "Arm Ethos-U NPU configuration"
|
menu "Ethos-U NPU configuration"
|
||||||
choice ARM_ETHOS_U_NPU_CONFIG
|
choice ETHOS_U_NPU_CONFIG
|
||||||
prompt "Arm Ethos-U NPU configuration"
|
prompt "Ethos-U NPU configuration"
|
||||||
default ARM_ETHOS_U55_128 if SOC_SERIES_MPS3
|
default ETHOS_U55_128 if SOC_SERIES_MPS3
|
||||||
default ARM_ETHOS_U65_256 if SOC_MPS4_CORSTONE315
|
default ETHOS_U65_256 if SOC_MPS4_CORSTONE315
|
||||||
default ARM_ETHOS_U85_256 if SOC_MPS4_CORSTONE320
|
default ETHOS_U85_256 if SOC_MPS4_CORSTONE320
|
||||||
config ARM_ETHOS_U55_64
|
config ETHOS_U55_64
|
||||||
bool "using Ethos-U55 with 64 macs"
|
bool "using Ethos-U55 with 64 macs"
|
||||||
config ARM_ETHOS_U55_128
|
config ETHOS_U55_128
|
||||||
bool "using Ethos-U55 with 128 macs"
|
bool "using Ethos-U55 with 128 macs"
|
||||||
config ARM_ETHOS_U55_256
|
config ETHOS_U55_256
|
||||||
bool "using Ethos-U55 with 256 macs"
|
bool "using Ethos-U55 with 256 macs"
|
||||||
config ARM_ETHOS_U65_128
|
config ETHOS_U65_128
|
||||||
bool "using Ethos-U65 with 128 macs"
|
bool "using Ethos-U65 with 128 macs"
|
||||||
config ARM_ETHOS_U65_256
|
config ETHOS_U65_256
|
||||||
bool "using Ethos-U65 with 256 macs"
|
bool "using Ethos-U65 with 256 macs"
|
||||||
config ARM_ETHOS_U65_512
|
config ETHOS_U65_512
|
||||||
bool "using Ethos-U65 with 512 macs"
|
bool "using Ethos-U65 with 512 macs"
|
||||||
config ARM_ETHOS_U85_128
|
config ETHOS_U85_128
|
||||||
bool "using Ethos-U85 with 128 macs"
|
bool "using Ethos-U85 with 128 macs"
|
||||||
config ARM_ETHOS_U85_256
|
config ETHOS_U85_256
|
||||||
bool "using Ethos-U85 with 256 macs"
|
bool "using Ethos-U85 with 256 macs"
|
||||||
config ARM_ETHOS_U85_512
|
config ETHOS_U85_512
|
||||||
bool "using Ethos-U85 with 512 macs"
|
bool "using Ethos-U85 with 512 macs"
|
||||||
config ARM_ETHOS_U85_1024
|
config ETHOS_U85_1024
|
||||||
bool "using Ethos-U85 with 1024 macs"
|
bool "using Ethos-U85 with 1024 macs"
|
||||||
config ARM_ETHOS_U85_2048
|
config ETHOS_U85_2048
|
||||||
bool "using Ethos-U85 with 2048 macs"
|
bool "using Ethos-U85 with 2048 macs"
|
||||||
endchoice
|
endchoice
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
config ARM_ETHOS_U_NPU_NAME
|
config ETHOS_U_NPU_NAME
|
||||||
string
|
string
|
||||||
default "ethos-u55-64" if ARM_ETHOS_U55_64
|
default "ethos-u55-64" if ETHOS_U55_64
|
||||||
default "ethos-u55-128" if ARM_ETHOS_U55_128
|
default "ethos-u55-128" if ETHOS_U55_128
|
||||||
default "ethos-u55-256" if ARM_ETHOS_U55_256
|
default "ethos-u55-256" if ETHOS_U55_256
|
||||||
default "ethos-u65-128" if ARM_ETHOS_U65_128
|
default "ethos-u65-128" if ETHOS_U65_128
|
||||||
default "ethos-u65-256" if ARM_ETHOS_U65_256
|
default "ethos-u65-256" if ETHOS_U65_256
|
||||||
default "ethos-u65-512" if ARM_ETHOS_U65_512
|
default "ethos-u65-512" if ETHOS_U65_512
|
||||||
default "ethos-u85-128" if ARM_ETHOS_U85_128
|
default "ethos-u85-128" if ETHOS_U85_128
|
||||||
default "ethos-u85-256" if ARM_ETHOS_U85_256
|
default "ethos-u85-256" if ETHOS_U85_256
|
||||||
default "ethos-u85-512" if ARM_ETHOS_U85_512
|
default "ethos-u85-512" if ETHOS_U85_512
|
||||||
default "ethos-u85-1024" if ARM_ETHOS_U85_1024
|
default "ethos-u85-1024" if ETHOS_U85_1024
|
||||||
default "ethos-u85-2048" if ARM_ETHOS_U85_2048
|
default "ethos-u85-2048" if ETHOS_U85_2048
|
||||||
help
|
help
|
||||||
Name of the used Arm NPU
|
Name of the used Ethos-U NPU
|
||||||
|
|
||||||
choice "ARM_ETHOS_U_LOG_LEVEL_CHOICE"
|
choice "ETHOS_U_LOG_LEVEL_CHOICE"
|
||||||
prompt "Max compiled-in log level for arm_ethos_u"
|
prompt "Max compiled-in log level for ETHOS_U"
|
||||||
default ARM_ETHOS_U_LOG_LEVEL_WRN
|
default ETHOS_U_LOG_LEVEL_WRN
|
||||||
depends on STDOUT_CONSOLE
|
depends on STDOUT_CONSOLE
|
||||||
|
|
||||||
config ARM_ETHOS_U_LOG_LEVEL_NONE
|
config ETHOS_U_LOG_LEVEL_NONE
|
||||||
bool "None"
|
bool "None"
|
||||||
|
|
||||||
config ARM_ETHOS_U_LOG_LEVEL_ERR
|
config ETHOS_U_LOG_LEVEL_ERR
|
||||||
bool "Error"
|
bool "Error"
|
||||||
|
|
||||||
config ARM_ETHOS_U_LOG_LEVEL_WRN
|
config ETHOS_U_LOG_LEVEL_WRN
|
||||||
bool "Warning"
|
bool "Warning"
|
||||||
|
|
||||||
config ARM_ETHOS_U_LOG_LEVEL_INF
|
config ETHOS_U_LOG_LEVEL_INF
|
||||||
bool "Info"
|
bool "Info"
|
||||||
|
|
||||||
config ARM_ETHOS_U_LOG_LEVEL_DBG
|
config ETHOS_U_LOG_LEVEL_DBG
|
||||||
bool "Debug"
|
bool "Debug"
|
||||||
|
|
||||||
config ARM_ETHOS_U_LOG_LEVEL_DEFAULT
|
config ETHOS_U_LOG_LEVEL_DEFAULT
|
||||||
bool "Default"
|
bool "Default"
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config ARM_ETHOS_U_LOG_LEVEL
|
config ETHOS_U_LOG_LEVEL
|
||||||
int
|
int
|
||||||
depends on STDOUT_CONSOLE
|
depends on STDOUT_CONSOLE
|
||||||
default 0 if ARM_ETHOS_U_LOG_LEVEL_NONE
|
default 0 if ETHOS_U_LOG_LEVEL_NONE
|
||||||
default 1 if ARM_ETHOS_U_LOG_LEVEL_ERR
|
default 1 if ETHOS_U_LOG_LEVEL_ERR
|
||||||
default 2 if ARM_ETHOS_U_LOG_LEVEL_WRN
|
default 2 if ETHOS_U_LOG_LEVEL_WRN
|
||||||
default 3 if ARM_ETHOS_U_LOG_LEVEL_INF
|
default 3 if ETHOS_U_LOG_LEVEL_INF
|
||||||
default 4 if ARM_ETHOS_U_LOG_LEVEL_DBG
|
default 4 if ETHOS_U_LOG_LEVEL_DBG
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -24,7 +24,7 @@ if(CONFIG_TENSORFLOW_LITE_MICRO)
|
|||||||
zephyr_library_compile_definitions(CMSIS_NN)
|
zephyr_library_compile_definitions(CMSIS_NN)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CONFIG_ARM_ETHOS_U)
|
if (CONFIG_ETHOS_U)
|
||||||
set(ETHOSU_CO_PROCESSOR ethos_u)
|
set(ETHOSU_CO_PROCESSOR ethos_u)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user