diff --git a/cmsis/RTE_Components.h b/cmsis/RTE_Components.h index 1a1b438e80..1af1f976d1 100644 --- a/cmsis/RTE_Components.h +++ b/cmsis/RTE_Components.h @@ -17,7 +17,6 @@ #define RTE_COMPONENTS_H #define CMSIS_device_header -#include "mbed_rtx_conf.h" #endif diff --git a/cmsis/TARGET_CORTEX_M/mbed_tz_context.c b/cmsis/TARGET_CORTEX_M/mbed_tz_context.c index 434422c73c..077ff25512 100644 --- a/cmsis/TARGET_CORTEX_M/mbed_tz_context.c +++ b/cmsis/TARGET_CORTEX_M/mbed_tz_context.c @@ -31,16 +31,20 @@ #include CMSIS_device_header #include "tz_context.h" -/// Number of process slots (threads may call secure library code) -#ifndef TZ_PROCESS_STACK_SLOTS -#define TZ_PROCESS_STACK_SLOTS 8U +#ifndef MBED_CONF_TZ_PROCESS_STACK_SLOTS +#define MBED_CONF_TZ_PROCESS_STACK_SLOTS 8 #endif -/// Stack size of the secure library code -#ifndef TZ_PROCESS_STACK_SIZE -#define TZ_PROCESS_STACK_SIZE 256U +#ifndef MBED_CONF_TZ_PROCESS_STACK_SIZE +#define MBED_CONF_TZ_PROCESS_STACK_SIZE 512 #endif +/// Number of process slots (threads may call secure library code) +#define TZ_PROCESS_STACK_SLOTS MBED_CONF_TZ_PROCESS_STACK_SLOTS + +/// Stack size of the secure library code +#define TZ_PROCESS_STACK_SIZE MBED_CONF_TZ_PROCESS_STACK_SIZE + typedef struct { uint32_t sp_top; // stack space top uint32_t sp_limit; // stack space limit diff --git a/rtos/TARGET_CORTEX/mbed_rtx_conf.h b/rtos/TARGET_CORTEX/mbed_rtx_conf.h index a2f458ee6e..91d024a260 100644 --- a/rtos/TARGET_CORTEX/mbed_rtx_conf.h +++ b/rtos/TARGET_CORTEX/mbed_rtx_conf.h @@ -57,14 +57,4 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 1 #define OS_TIMER_THREAD_TZ_MOD_ID 1 -#ifndef MBED_CONF_TZ_PROCESS_STACK_SIZE -#define MBED_CONF_TZ_PROCESS_STACK_SIZE 512 -#endif -#ifndef MBED_CONF_TZ_PROCESS_STACK_SLOTS -#define MBED_CONF_TZ_PROCESS_STACK_SLOTS 8 -#endif - -#define TZ_PROCESS_STACK_SLOTS MBED_CONF_TZ_PROCESS_STACK_SLOTS -#define TZ_PROCESS_STACK_SIZE MBED_CONF_TZ_PROCESS_STACK_SIZE - #endif /* MBED_RTX_CONF_H */