modules: hal_ethos_u: add support for log level NONE
Add support for log level NONE by disabling Ethos-U driver logging. Signed-off-by: Ledion Daja <ledion.daja@arm.com>
This commit is contained in:
parent
2fff293cc7
commit
93af8754ec
|
@ -10,7 +10,10 @@ if(CONFIG_ARM_ETHOS_U AND CONFIG_MULTITHREADING)
|
|||
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} LESS "${ETHOSU_LOG_SEVERITY_MAP_LENGTH}")
|
||||
if (${CONFIG_ARM_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)
|
||||
set(ETHOSU_LOG_SEVERITY ${ETHOSU_LOG_SEVERITY} CACHE STRING "")
|
||||
else()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright 2021-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
|
||||
#
|
||||
# SPDX-FileCopyrightText: <text>Copyright 2021-2022, 2024 Arm Limited and/or its
|
||||
# affiliates <open-source-office@arm.com></text>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config ARM_ETHOS_U
|
||||
|
@ -45,6 +45,9 @@ choice "ARM_ETHOS_U_LOG_LEVEL_CHOICE"
|
|||
default ARM_ETHOS_U_LOG_LEVEL_WRN
|
||||
depends on STDOUT_CONSOLE
|
||||
|
||||
config ARM_ETHOS_U_LOG_LEVEL_NONE
|
||||
bool "None"
|
||||
|
||||
config ARM_ETHOS_U_LOG_LEVEL_ERR
|
||||
bool "Error"
|
||||
|
||||
|
@ -65,6 +68,7 @@ endchoice
|
|||
config ARM_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
|
||||
|
|
Loading…
Reference in New Issue