aboutsummaryrefslogtreecommitdiff
path: root/applications/threadx_demo/CMakeLists.txt
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2024-01-22 14:48:28 +0100
committerMikael Olsson <mikael.olsson@arm.com>2024-01-22 15:06:26 +0100
commitad5b6f2a6ca5f9ed1312224767490073315d68b9 (patch)
tree9de1190a8c808275712724a0d58859b3e9041e38 /applications/threadx_demo/CMakeLists.txt
parent36638b51327efcb77951c2ed293ab1032d079e67 (diff)
downloadethos-u-core-platform-ad5b6f2a6ca5f9ed1312224767490073315d68b9.tar.gz
Change threadx_demo to use ThreadX lib init file
Instead of using its own low level initialization file for ThreadX, the ThreadX demo has been changed to use the one provided by the ThreadX library. The initialization file from the ThreadX library, assumes some specific symbol names are present in the linker script so the script for the Corstone-300 platform, which is the only one that currently supports the ThreadX demo, has been updated accordingly. To still be able to use the HardFault_Handler from the platform target, the handler provided by the ThreadX library is marked as a weak symbol before linking. Change-Id: I757b74bc30e295bc1f7126fc5d9330e381d7a886 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Diffstat (limited to 'applications/threadx_demo/CMakeLists.txt')
-rw-r--r--applications/threadx_demo/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/applications/threadx_demo/CMakeLists.txt b/applications/threadx_demo/CMakeLists.txt
index ef20b57..41fabdd 100644
--- a/applications/threadx_demo/CMakeLists.txt
+++ b/applications/threadx_demo/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2021-2022 Arm Limited.
+# SPDX-FileCopyrightText: Copyright 2021-2022, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -24,10 +24,15 @@ endif()
ethosu_add_executable_test(threadx_demo PRIVATE
SOURCES main.cpp
- SOURCES tx_initialize_low_level.c
LIBRARIES inference_process threadx)
target_include_directories(threadx_demo PRIVATE models/mobilenet_v2)
+# Make ThreadX's HardFault_Handler a weak symbol to use the platform target's handler instead
+add_custom_command(TARGET threadx_demo PRE_LINK
+ COMMAND ${CMAKE_OBJCOPY} -W HardFault_Handler $<TARGET_FILE:threadx>
+ DEPENDS threadx
+)
+
# Use the fast memory to support both 11.12.57 and 11.13.x release
# of the FVP
# The size is defined to force the .bss.tensor_arena to be placed in DDR