Skip to content

RTX changes pulled in from d20b8aa #6045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions rtos/TARGET_CORTEX/mbed_rtx_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,7 @@
# define OS_PRIVILEGE_MODE 0
#endif

#define OS_IDLE_THREAD_TZ_MOD_ID 1
#define OS_TIMER_THREAD_TZ_MOD_ID 1

#endif /* MBED_RTX_CONF_H */
18 changes: 17 additions & 1 deletion rtos/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* -----------------------------------------------------------------------------
*
* $Revision: V5.1.0
* $Revision: V5.2.0
*
* Project: CMSIS-RTOS RTX
* Title: RTX Configuration definitions
Expand Down Expand Up @@ -181,6 +181,14 @@
#define OS_IDLE_THREAD_STACK_SIZE 200
#endif

// <o>Idle Thread TrustZone Module Identifier
// <i> Defines TrustZone Thread Context Management Identifier.
// <i> Applies only to cores with TrustZone technology.
// <i> Default: 0 (not used)
#ifndef OS_IDLE_THREAD_TZ_MOD_ID
#define OS_IDLE_THREAD_TZ_MOD_ID 0
#endif

// <q>Stack overrun checking
// <i> Enable stack overrun checks at thread switch.
// <i> Enabling this option increases slightly the execution time of a thread switch.
Expand Down Expand Up @@ -242,6 +250,14 @@
#define OS_TIMER_THREAD_STACK_SIZE 200
#endif

// <o>Timer Thread TrustZone Module Identifier
// <i> Defines TrustZone Thread Context Management Identifier.
// <i> Applies only to cores with TrustZone technology.
// <i> Default: 0 (not used)
#ifndef OS_TIMER_THREAD_TZ_MOD_ID
#define OS_TIMER_THREAD_TZ_MOD_ID 0
#endif

// <o>Timer Callback Queue entries <0-256>
// <i> Number of concurrent active timer callback functions.
// <i> May be set to 0 when timers are not used.
Expand Down
14 changes: 12 additions & 2 deletions rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ static const osThreadAttr_t os_idle_thread_attr = {
&os_idle_thread_stack,
(uint32_t)sizeof(os_idle_thread_stack),
osPriorityIdle,
0U, 0U
#if defined(OS_IDLE_THREAD_TZ_MOD_ID)
(uint32_t)OS_IDLE_THREAD_TZ_MOD_ID,
#else
0U,
#endif
0U
};


Expand Down Expand Up @@ -176,7 +181,12 @@ static const osThreadAttr_t os_timer_thread_attr = {
&os_timer_thread_stack,
(uint32_t)sizeof(os_timer_thread_stack),
(osPriority_t)OS_TIMER_THREAD_PRIO,
0U, 0U
#if defined(OS_TIMER_THREAD_TZ_MOD_ID)
(uint32_t)OS_TIMER_THREAD_TZ_MOD_ID,
#else
0U,
#endif
0U
};

// Timer Message Queue Control Block
Expand Down