Skip to content
Snippets Groups Projects
Commit e8dafc6a authored by David Horstmann's avatar David Horstmann Committed by Jaeden Amero
Browse files

examples: Run TF-M example on CMSIS/ThreadX


Allow the TF-M example to be run via the CMSIS-RTOSv2/ThreadX adaptation
layer.

Signed-off-by: David Horstmann's avatarDavid Horstmann <david.horstmann@arm.com>
parent 3bbc7d4b
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
set(example tf-m)
set(supported_platforms corstone-300 corstone-310)
set(supported_rtoses cmsis-rtx)
set(supported_rtoses cmsis-rtx cmsis-threadx)
foreach(platform IN LISTS supported_platforms)
get_tfm_target_platform_variables(${platform})
......@@ -33,5 +33,8 @@ foreach(platform IN LISTS supported_platforms)
firmware_update.log
DESTINATION ${example_dir}
)
if(rtos STREQUAL "cmsis-threadx")
file(COPY threadx-config DESTINATION ${example_dir})
endif()
endforeach()
endforeach()
/*
* Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef TX_USER_H
#define TX_USER_H
/* Armv8-M runs in non-secure mode only when TrustZone is configured */
#define TX_SINGLE_MODE_NON_SECURE
/* Prevent tx_kernel_enter() from scheduling threads so that the CMSIS layer
* can create objects before the scheduler is started. */
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION return;
/* Allow 64 priorities to allow space for all of the possible CMSIS-RTOSv2
* priorities to be represented. */
#define TX_MAX_PRIORITIES 64
/* Add special thread extension. */
#define TX_THREAD_USER_EXTENSION VOID *tx_cmsis_extension;
/* Increase default thread stack size to 1024 bytes to prevent stack
* overflow. */
#define OS_STACK_SIZE 1024
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment