diff options
author | Jonny Svärd <jonny.svaerd@arm.com> | 2021-06-07 16:57:00 +0200 |
---|---|---|
committer | Jonny Svärd <jonny.svaerd@arm.com> | 2021-06-08 15:44:29 +0200 |
commit | a830f17656ee3a8bcb72483886da562d69245c39 (patch) | |
tree | b5860b6f1381ad965b0adc5ad0908343c0187eb8 /CMakeLists.txt | |
parent | d1ea036bd870663d737db9bfbb25e2aa04a389e0 (diff) | |
download | ethos-u-core-driver-a830f17656ee3a8bcb72483886da562d69245c39.tar.gz |
Spring clean/refactor of NPU driver
These changes mostly focus on creating a better structure
for the driver. Creating a better separation between driver
and device(s).
A short summary of what this commit contains:
- Move driver specific defines from device to driver
- Prefix device functions with ethosu_dev
- Remove device specific register access' from driver
- Remove device specific debug/dump functions
- Add function prototypes for weak functions
- Remove legacy ARM_NPU_STUB support
- Rename ethosu_device.c to ethosu_device_u55.c
- Remove redundant irq handler prototype
- Remove (deprecated) hardcoded instance ethosu_drv
- Simplify versioning API
Split driver version and hardware version/information so
that driver version can be queried without a driver instance.
- Improve and simplify logging
Make warning the new default severity level to print and
reduce severity levels to:
err
warning
info
debug
- Add severity prefix to log lines. Error messages print file
and line number, debug messages print function by default.
- Clarify some log messages
- Small optimizations and bugfixes
Change-Id: I2dfbfc3a40d7eca133c82f187f422325e1e6d314
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b364716..9852ae4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (c) 2019-2020 Arm Limited. All rights reserved. +# Copyright (c) 2019-2021 Arm Limited. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 # @@ -28,8 +28,8 @@ option(DRIVER_PMU_AUTOINIT "Enable PMU boot auto-initialization" OFF) set(CMSIS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmsis" CACHE PATH "Path to CMSIS.") -set(LOG_NAMES emerg alert crit err warning notice info debug) -set(ETHOSU_LOG_SEVERITY "info" CACHE STRING "Driver log severity level ${LOG_NAMES}") +set(LOG_NAMES err warning info debug) +set(ETHOSU_LOG_SEVERITY "warning" CACHE STRING "Driver log severity level ${LOG_NAMES}") set_property(CACHE ETHOSU_LOG_SEVERITY PROPERTY STRINGS ${LOG_NAMES}) # @@ -53,7 +53,7 @@ include_directories(${CMSIS_PATH}/CMSIS/Core/Include) # Build driver library add_library(ethosu_core_driver STATIC) target_include_directories(ethosu_core_driver PUBLIC include) -target_sources(ethosu_core_driver PRIVATE src/ethosu_driver.c src/ethosu_device.c src/ethosu_pmu.c) +target_sources(ethosu_core_driver PRIVATE src/ethosu_driver.c src/ethosu_device_u55.c src/ethosu_pmu.c) # Set the log level for the target target_compile_definitions(ethosu_core_driver PRIVATE ETHOSU_LOG_SEVERITY=${LOG_SEVERITY}) |