aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applications/CMakeLists.txt9
-rw-r--r--applications/message_handler_openamp/core_driver_mutex.cpp13
-rw-r--r--applications/message_handler_openamp/message_handler.hpp6
-rw-r--r--cmake/toolchain/armclang.cmake5
-rw-r--r--targets/common/CMakeLists.txt12
5 files changed, 34 insertions, 11 deletions
diff --git a/applications/CMakeLists.txt b/applications/CMakeLists.txt
index 1fa2b2e..a017575 100644
--- a/applications/CMakeLists.txt
+++ b/applications/CMakeLists.txt
@@ -1,6 +1,5 @@
#
-# SPDX-FileCopyrightText: Copyright 2021, 2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
-#
+# SPDX-FileCopyrightText: Copyright 2021, 2023-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the License); you may
@@ -32,3 +31,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "ARMClang")
# Only armclang supported for now
add_subdirectory(trustzone_inference)
endif()
+
+message(STATUS "*******************************************************")
+message(STATUS "PROJECT_NAME : ${PROJECT_NAME}")
+message(STATUS "TR_ARENA_SIZE : ${TR_ARENA_SIZE}")
+message(STATUS "MESSAGE_HANDLER_ARENA_SIZE : ${MESSAGE_HANDLER_ARENA_SIZE}")
+message(STATUS "*******************************************************")
diff --git a/applications/message_handler_openamp/core_driver_mutex.cpp b/applications/message_handler_openamp/core_driver_mutex.cpp
index 7948bd0..5f2e6cc 100644
--- a/applications/message_handler_openamp/core_driver_mutex.cpp
+++ b/applications/message_handler_openamp/core_driver_mutex.cpp
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-FileCopyrightText: Copyright 2022-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
@@ -24,11 +24,15 @@
#include <stdio.h>
extern "C" {
-
void *ethosu_mutex_create(void) {
return xSemaphoreCreateMutex();
}
+void ethosu_mutex_destroy(void *mutex) {
+ SemaphoreHandle_t handle = reinterpret_cast<SemaphoreHandle_t>(mutex);
+ vSemaphoreDelete(handle);
+}
+
int ethosu_mutex_lock(void *mutex) {
SemaphoreHandle_t handle = reinterpret_cast<SemaphoreHandle_t>(mutex);
if (xSemaphoreTake(handle, portMAX_DELAY) != pdTRUE) {
@@ -51,6 +55,11 @@ void *ethosu_semaphore_create(void) {
return xSemaphoreCreateCounting(255, 0);
}
+void ethosu_semaphore_destroy(void *sem) {
+ SemaphoreHandle_t handle = reinterpret_cast<SemaphoreHandle_t>(sem);
+ vSemaphoreDelete(handle);
+}
+
int ethosu_semaphore_take(void *sem, uint64_t timeout) {
SemaphoreHandle_t handle = reinterpret_cast<SemaphoreHandle_t>(sem);
if (xSemaphoreTake(handle, (TickType_t)timeout) != pdTRUE) {
diff --git a/applications/message_handler_openamp/message_handler.hpp b/applications/message_handler_openamp/message_handler.hpp
index ea8bc3e..4ff9328 100644
--- a/applications/message_handler_openamp/message_handler.hpp
+++ b/applications/message_handler_openamp/message_handler.hpp
@@ -45,9 +45,9 @@ struct Message {
rpmsg.header.msg_id = msgId;
}
- uint32_t src = 0;
- uint32_t length = 0;
- EthosU::ethosu_rpmsg rpmsg;
+ uint32_t src = 0;
+ uint32_t length = 0;
+ EthosU::ethosu_rpmsg rpmsg = {};
};
/*****************************************************************************
diff --git a/cmake/toolchain/armclang.cmake b/cmake/toolchain/armclang.cmake
index 61a8e59..74ff007 100644
--- a/cmake/toolchain/armclang.cmake
+++ b/cmake/toolchain/armclang.cmake
@@ -1,6 +1,5 @@
#
-# Copyright (c) 2020-2022 Arm Limited. All rights reserved.
-#
+# SPDX-FileCopyrightText: Copyright 2020-2022, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the License); you may
@@ -65,7 +64,7 @@ add_link_options(
--lto
--info common,debug,sizes,totals,veneers,unused
--symbols
- --diag_suppress=L6439W)
+ --diag_suppress=L6439W,L6314W)
# Compilation warnings
add_compile_options(
diff --git a/targets/common/CMakeLists.txt b/targets/common/CMakeLists.txt
index 0001172..eb7916b 100644
--- a/targets/common/CMakeLists.txt
+++ b/targets/common/CMakeLists.txt
@@ -1,6 +1,5 @@
#
# SPDX-FileCopyrightText: Copyright 2021, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
-#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the License); you may
@@ -69,3 +68,14 @@ add_library(ethosu_target_init INTERFACE)
target_link_libraries(ethosu_target_init INTERFACE ethosu_target_startup)
target_sources(ethosu_target_init INTERFACE src/init.cpp)
+#
+# Print build status
+#
+
+message(STATUS "*******************************************************")
+message(STATUS "PROJECT_NAME : ${PROJECT_NAME}")
+message(STATUS "FAST_MEMORY_SIZE : ${FAST_MEMORY_SIZE}")
+message(STATUS "MEMORY_MODEL : ${MEMORY_MODEL}")
+message(STATUS "MEMORY_ARENA : ${MEMORY_ARENA}")
+message(STATUS "TARGET_CPU : ${TARGET_CPU}")
+message(STATUS "*******************************************************")