diff options
-rw-r--r-- | drivers/mhu_v2/src/mhu_v2.cpp | 4 | ||||
-rw-r--r-- | targets/common/src/init.cpp | 2 | ||||
-rw-r--r-- | targets/corstone-300/CMakeLists.txt | 3 | ||||
-rw-r--r-- | targets/corstone-300/target.cpp | 9 |
4 files changed, 10 insertions, 8 deletions
diff --git a/drivers/mhu_v2/src/mhu_v2.cpp b/drivers/mhu_v2/src/mhu_v2.cpp index 1144a0f..cdeb90b 100644 --- a/drivers/mhu_v2/src/mhu_v2.cpp +++ b/drivers/mhu_v2/src/mhu_v2.cpp @@ -197,12 +197,12 @@ void MHUv2::printAIDR(bool tx, bool rx) { if (tx) { aidr = getTxAIDR(); a = reinterpret_cast<struct aidr_t *>(&aidr); - LOG_INFO("TX MHUv2 reports: Major rev: %d, Minor rev: %d", a->ARCH_MAJOR_REV, a->ARCH_MINOR_REV); + LOG("TX MHUv2 reports: Major rev: %d, Minor rev: %d", a->ARCH_MAJOR_REV, a->ARCH_MINOR_REV); } if (rx) { aidr = getRxAIDR(); a = reinterpret_cast<struct aidr_t *>(&aidr); - LOG_INFO("RX MHUv2 reports: Major rev: %d, Minor rev: %d", a->ARCH_MAJOR_REV, a->ARCH_MINOR_REV); + LOG("RX MHUv2 reports: Major rev: %d, Minor rev: %d", a->ARCH_MAJOR_REV, a->ARCH_MINOR_REV); } } diff --git a/targets/common/src/init.cpp b/targets/common/src/init.cpp index 54e4590..0876070 100644 --- a/targets/common/src/init.cpp +++ b/targets/common/src/init.cpp @@ -18,6 +18,6 @@ #include <target.hpp> -__attribute__((constructor)) void init() { +__attribute__((constructor(500))) void init() { EthosU::targetSetup(); } diff --git a/targets/corstone-300/CMakeLists.txt b/targets/corstone-300/CMakeLists.txt index 5dc3804..7c8db4e 100644 --- a/targets/corstone-300/CMakeLists.txt +++ b/targets/corstone-300/CMakeLists.txt @@ -124,9 +124,8 @@ target_sources(ethosu_target_startup INTERFACE target.cpp) target_link_libraries(ethosu_target_startup INTERFACE - $<$<TARGET_EXISTS:ethosu_core_driver>:ethosu_core_driver> + $<$<TARGET_EXISTS:ethosu_core_driver>:ethosu_core_driver;timing_adapter> mpu - timing_adapter ethosu_mhu_dummy ethosu_uart_cmsdk_apb) diff --git a/targets/corstone-300/target.cpp b/targets/corstone-300/target.cpp index 87ba0c4..8f8db83 100644 --- a/targets/corstone-300/target.cpp +++ b/targets/corstone-300/target.cpp @@ -24,11 +24,10 @@ #ifdef ETHOSU #include <ethosu_driver.h> +#include <timing_adapter.h> #endif #include "mpu.hpp" -#include <timing_adapter.h> - #include "uart_stdout.h" #include <inttypes.h> @@ -67,6 +66,8 @@ struct ethosu_driver ethosu0_driver; * Timing Adapters ****************************************************************************/ +#ifdef ETHOSU + #ifndef ETHOSU_TA_MAXR_0 #define ETHOSU_TA_MAXR_0 0 #endif @@ -203,6 +204,8 @@ struct timing_adapter_settings ethosu_ta_settings[ETHOSU_NPU_TA_COUNT] = {{ETHOS ETHOSU_TA_HISTBIN_1, ETHOSU_TA_HISTCNT_1}}; +#endif + /**************************************************************************** * Cache maintenance ****************************************************************************/ @@ -283,6 +286,7 @@ void targetSetup() { // Initialize UART driver UartStdOutInit(); +#ifdef ETHOSU // Initialize timing adapter(s) for (int i = 0; i < ETHOSU_NPU_COUNT; i++) { for (int j = 0; j < ETHOSU_NPU_TA_COUNT; j++) { @@ -295,7 +299,6 @@ void targetSetup() { } } -#ifdef ETHOSU // Initialize Ethos-U NPU driver if (ethosu_init(ðosu0_driver, reinterpret_cast<void *>(ETHOSU_BASE_ADDRESS), |