Skip to content

Commit 02730f0

Browse files
committed
Move defines into "cmsis/RTE_Components.h" to make CMSIS files less changed
1 parent 47c3197 commit 02730f0

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

cmsis/RTE_Components.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818

1919
#define CMSIS_device_header <cmsis.h>
2020

21+
#ifndef MBED_CONF_TZ_PROCESS_STACK_SIZE
22+
#define MBED_CONF_TZ_PROCESS_STACK_SIZE 512
23+
#endif
24+
#ifndef MBED_CONF_TZ_PROCESS_STACK_SLOTS
25+
#define MBED_CONF_TZ_PROCESS_STACK_SLOTS 8
26+
#endif
27+
28+
#define TZ_PROCESS_STACK_SLOTS MBED_CONF_TZ_PROCESS_STACK_SLOTS
29+
#define TZ_PROCESS_STACK_SIZE MBED_CONF_TZ_PROCESS_STACK_SIZE
30+
2131
#endif
2232

2333

cmsis/TARGET_CORTEX_M/mbed_tz_context.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,15 @@
3131
#include CMSIS_device_header
3232
#include "tz_context.h"
3333

34-
#ifndef MBED_CONF_TZ_PROCESS_STACK_SLOTS
35-
#define MBED_CONF_TZ_PROCESS_STACK_SLOTS 8
36-
#endif
37-
38-
#ifndef MBED_CONF_TZ_PROCESS_STACK_SIZE
39-
#define MBED_CONF_TZ_PROCESS_STACK_SIZE 512
40-
#endif
41-
4234
/// Number of process slots (threads may call secure library code)
43-
#define TZ_PROCESS_STACK_SLOTS MBED_CONF_TZ_PROCESS_STACK_SLOTS
35+
#ifndef TZ_PROCESS_STACK_SLOTS
36+
#define TZ_PROCESS_STACK_SLOTS 8U
37+
#endif
4438

4539
/// Stack size of the secure library code
46-
#define TZ_PROCESS_STACK_SIZE MBED_CONF_TZ_PROCESS_STACK_SIZE
40+
#ifndef TZ_PROCESS_STACK_SIZE
41+
#define TZ_PROCESS_STACK_SIZE 256U
42+
#endif
4743

4844
typedef struct {
4945
uint32_t sp_top; // stack space top

0 commit comments

Comments
 (0)