diff --git a/examples/sds_buffer/RTE/CMSIS/RTX_Config.c b/examples/sds_buffer/RTE/CMSIS/RTX_Config.c index 737078a..d21fa0a 100644 --- a/examples/sds_buffer/RTE/CMSIS/RTX_Config.c +++ b/examples/sds_buffer/RTE/CMSIS/RTX_Config.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_buffer/RTE/CMSIS/RTX_Config.c.base@5.1.1 b/examples/sds_buffer/RTE/CMSIS/RTX_Config.c.base@5.2.0 similarity index 91% rename from examples/sds_buffer/RTE/CMSIS/RTX_Config.c.base@5.1.1 rename to examples/sds_buffer/RTE/CMSIS/RTX_Config.c.base@5.2.0 index 737078a..d21fa0a 100644 --- a/examples/sds_buffer/RTE/CMSIS/RTX_Config.c.base@5.1.1 +++ b/examples/sds_buffer/RTE/CMSIS/RTX_Config.c.base@5.2.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_buffer/RTE/CMSIS/RTX_Config.h b/examples/sds_buffer/RTE/CMSIS/RTX_Config.h index 4d2f501..d9631b2 100644 --- a/examples/sds_buffer/RTE/CMSIS/RTX_Config.h +++ b/examples/sds_buffer/RTE/CMSIS/RTX_Config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,6 +197,20 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. @@ -156,10 +225,10 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE #define OS_PRIVILEGE_MODE 1 #endif @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.h.base@5.5.2 b/examples/sds_buffer/RTE/CMSIS/RTX_Config.h.base@5.6.0 similarity index 85% rename from examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.h.base@5.5.2 rename to examples/sds_buffer/RTE/CMSIS/RTX_Config.h.base@5.6.0 index 4d2f501..fe0c57b 100644 --- a/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.h.base@5.5.2 +++ b/examples/sds_buffer/RTE/CMSIS/RTX_Config.h.base@5.6.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,11 +197,25 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. #ifndef OS_STACK_CHECK -#define OS_STACK_CHECK 0 +#define OS_STACK_CHECK 1 #endif // Stack usage watermark @@ -156,12 +225,12 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE -#define OS_PRIVILEGE_MODE 1 +#define OS_PRIVILEGE_MODE 0 #endif // @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_buffer/SDS_Buffer.cproject.yml b/examples/sds_buffer/SDS_Buffer.cproject.yml index 88f94a3..9d79068 100644 --- a/examples/sds_buffer/SDS_Buffer.cproject.yml +++ b/examples/sds_buffer/SDS_Buffer.cproject.yml @@ -1,6 +1,8 @@ project: packs: - pack: ARM::SDS + - pack: ARM::CMSIS@>=6.0.0 + - pack: ARM::CMSIS-RTX@>=5.8.0 connections: - connect: Demo Application @@ -14,6 +16,7 @@ project: components: - component: ARM::CMSIS:RTOS2:Keil RTX5&Source + - component: ARM::CMSIS:OS Tick - component: ARM::SDS:Buffer groups: diff --git a/examples/sds_player/RTE/CMSIS/RTX_Config.c b/examples/sds_player/RTE/CMSIS/RTX_Config.c index 737078a..d21fa0a 100644 --- a/examples/sds_player/RTE/CMSIS/RTX_Config.c +++ b/examples/sds_player/RTE/CMSIS/RTX_Config.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.c.base@5.1.1 b/examples/sds_player/RTE/CMSIS/RTX_Config.c.base@5.2.0 similarity index 91% rename from examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.c.base@5.1.1 rename to examples/sds_player/RTE/CMSIS/RTX_Config.c.base@5.2.0 index 737078a..d21fa0a 100644 --- a/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.c.base@5.1.1 +++ b/examples/sds_player/RTE/CMSIS/RTX_Config.c.base@5.2.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_player/RTE/CMSIS/RTX_Config.h b/examples/sds_player/RTE/CMSIS/RTX_Config.h index 4d2f501..d9631b2 100644 --- a/examples/sds_player/RTE/CMSIS/RTX_Config.h +++ b/examples/sds_player/RTE/CMSIS/RTX_Config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,6 +197,20 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. @@ -156,10 +225,10 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE #define OS_PRIVILEGE_MODE 1 #endif @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_buffer/RTE/CMSIS/RTX_Config.h.base@5.5.2 b/examples/sds_player/RTE/CMSIS/RTX_Config.h.base@5.6.0 similarity index 85% rename from examples/sds_buffer/RTE/CMSIS/RTX_Config.h.base@5.5.2 rename to examples/sds_player/RTE/CMSIS/RTX_Config.h.base@5.6.0 index 4d2f501..fe0c57b 100644 --- a/examples/sds_buffer/RTE/CMSIS/RTX_Config.h.base@5.5.2 +++ b/examples/sds_player/RTE/CMSIS/RTX_Config.h.base@5.6.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,11 +197,25 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. #ifndef OS_STACK_CHECK -#define OS_STACK_CHECK 0 +#define OS_STACK_CHECK 1 #endif // Stack usage watermark @@ -156,12 +225,12 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE -#define OS_PRIVILEGE_MODE 1 +#define OS_PRIVILEGE_MODE 0 #endif // @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_player/RTE/SDS/sds_play_config.h b/examples/sds_player/RTE/SDS/sds_play_config.h index 666c192..4b0f3f5 100644 --- a/examples/sds_player/RTE/SDS/sds_play_config.h +++ b/examples/sds_player/RTE/SDS/sds_play_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_play_config.h * Purpose: SDS Player configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of player streams <1-31> // Default: 16 -#define SDS_PLAY_MAX_STREAMS 16U +#define SDS_PLAY_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary player buffer // Default: 8192 -#define SDS_PLAY_MAX_RECORD_SIZE 8192U +#define SDS_PLAY_BUF_SIZE 8192U // diff --git a/examples/sds_player/RTE/SDS/sds_play_config.h.base@1.0.0 b/examples/sds_player/RTE/SDS/sds_play_config.h.base@2.0.0 similarity index 82% rename from examples/sds_player/RTE/SDS/sds_play_config.h.base@1.0.0 rename to examples/sds_player/RTE/SDS/sds_play_config.h.base@2.0.0 index 666c192..4b0f3f5 100644 --- a/examples/sds_player/RTE/SDS/sds_play_config.h.base@1.0.0 +++ b/examples/sds_player/RTE/SDS/sds_play_config.h.base@2.0.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_play_config.h * Purpose: SDS Player configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of player streams <1-31> // Default: 16 -#define SDS_PLAY_MAX_STREAMS 16U +#define SDS_PLAY_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary player buffer // Default: 8192 -#define SDS_PLAY_MAX_RECORD_SIZE 8192U +#define SDS_PLAY_BUF_SIZE 8192U // diff --git a/examples/sds_player/SDS_Player.cproject.yml b/examples/sds_player/SDS_Player.cproject.yml index 218c965..e243630 100644 --- a/examples/sds_player/SDS_Player.cproject.yml +++ b/examples/sds_player/SDS_Player.cproject.yml @@ -1,6 +1,8 @@ project: packs: - pack: ARM::SDS + - pack: ARM::CMSIS@>=6.0.0 + - pack: ARM::CMSIS-RTX@>=5.8.0 connections: - connect: Demo Application @@ -14,6 +16,7 @@ project: components: - component: ARM::CMSIS:RTOS2:Keil RTX5&Source + - component: ARM::CMSIS:OS Tick - component: ARM::SDS:Buffer - component: ARM::SDS:IO:File System&Semihosting - component: ARM::SDS:Player diff --git a/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.c b/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.c index 737078a..d21fa0a 100644 --- a/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.c +++ b/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_player/RTE/CMSIS/RTX_Config.c.base@5.1.1 b/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.c.base@5.2.0 similarity index 91% rename from examples/sds_player/RTE/CMSIS/RTX_Config.c.base@5.1.1 rename to examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.c.base@5.2.0 index 737078a..d21fa0a 100644 --- a/examples/sds_player/RTE/CMSIS/RTX_Config.c.base@5.1.1 +++ b/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.c.base@5.2.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.h b/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.h index 4d2f501..d9631b2 100644 --- a/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.h +++ b/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,6 +197,20 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. @@ -156,10 +225,10 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE #define OS_PRIVILEGE_MODE 1 #endif @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.h.base@5.5.2 b/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.h.base@5.6.0 similarity index 85% rename from examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.h.base@5.5.2 rename to examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.h.base@5.6.0 index 4d2f501..fe0c57b 100644 --- a/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.h.base@5.5.2 +++ b/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.h.base@5.6.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,11 +197,25 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. #ifndef OS_STACK_CHECK -#define OS_STACK_CHECK 0 +#define OS_STACK_CHECK 1 #endif // Stack usage watermark @@ -156,12 +225,12 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE -#define OS_PRIVILEGE_MODE 1 +#define OS_PRIVILEGE_MODE 0 #endif // @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_recorder/fs/mdk/RTE/File_System/FS_Config.c b/examples/sds_recorder/fs/mdk/RTE/File_System/FS_Config.c index 21f42a7..6701614 100644 --- a/examples/sds_recorder/fs/mdk/RTE/File_System/FS_Config.c +++ b/examples/sds_recorder/fs/mdk/RTE/File_System/FS_Config.c @@ -1,10 +1,10 @@ /*------------------------------------------------------------------------------ * MDK Middleware - Component ::File System - * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. + * Copyright (c) 2004-2023 Arm Limited (or its affiliates). All rights reserved. *------------------------------------------------------------------------------ * Name: FS_Config.c * Purpose: File System Configuration - * Rev.: V6.3.0 + * Rev.: V6.4.0 *----------------------------------------------------------------------------*/ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -38,41 +38,4 @@ // that are invoked with the "" string and can be altered anytime during run-time. #define FS_INITIAL_CDRIVE 2 -#include "RTE_Components.h" - -#ifdef RTE_FileSystem_Drive_RAM_0 -#include "FS_Config_RAM_0.h" -#endif -#ifdef RTE_FileSystem_Drive_RAM_1 -#include "FS_Config_RAM_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NOR_0 -#include "FS_Config_NOR_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NOR_1 -#include "FS_Config_NOR_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NAND_0 -#include "FS_Config_NAND_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NAND_1 -#include "FS_Config_NAND_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_MC_0 -#include "FS_Config_MC_0.h" -#endif -#ifdef RTE_FileSystem_Drive_MC_1 -#include "FS_Config_MC_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_USB_0 -#include "FS_Config_USB_0.h" -#endif -#ifdef RTE_FileSystem_Drive_USB_1 -#include "FS_Config_USB_1.h" -#endif - #include "fs_config.h" diff --git a/examples/sds_recorder/fs/mdk/RTE/File_System/FS_Config.c.base@6.3.0 b/examples/sds_recorder/fs/mdk/RTE/File_System/FS_Config.c.base@6.4.0 similarity index 62% rename from examples/sds_recorder/fs/mdk/RTE/File_System/FS_Config.c.base@6.3.0 rename to examples/sds_recorder/fs/mdk/RTE/File_System/FS_Config.c.base@6.4.0 index 21f42a7..6701614 100644 --- a/examples/sds_recorder/fs/mdk/RTE/File_System/FS_Config.c.base@6.3.0 +++ b/examples/sds_recorder/fs/mdk/RTE/File_System/FS_Config.c.base@6.4.0 @@ -1,10 +1,10 @@ /*------------------------------------------------------------------------------ * MDK Middleware - Component ::File System - * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. + * Copyright (c) 2004-2023 Arm Limited (or its affiliates). All rights reserved. *------------------------------------------------------------------------------ * Name: FS_Config.c * Purpose: File System Configuration - * Rev.: V6.3.0 + * Rev.: V6.4.0 *----------------------------------------------------------------------------*/ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -38,41 +38,4 @@ // that are invoked with the "" string and can be altered anytime during run-time. #define FS_INITIAL_CDRIVE 2 -#include "RTE_Components.h" - -#ifdef RTE_FileSystem_Drive_RAM_0 -#include "FS_Config_RAM_0.h" -#endif -#ifdef RTE_FileSystem_Drive_RAM_1 -#include "FS_Config_RAM_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NOR_0 -#include "FS_Config_NOR_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NOR_1 -#include "FS_Config_NOR_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NAND_0 -#include "FS_Config_NAND_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NAND_1 -#include "FS_Config_NAND_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_MC_0 -#include "FS_Config_MC_0.h" -#endif -#ifdef RTE_FileSystem_Drive_MC_1 -#include "FS_Config_MC_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_USB_0 -#include "FS_Config_USB_0.h" -#endif -#ifdef RTE_FileSystem_Drive_USB_1 -#include "FS_Config_USB_1.h" -#endif - #include "fs_config.h" diff --git a/examples/sds_recorder/fs/mdk/RTE/SDS/sds_rec_config.h b/examples/sds_recorder/fs/mdk/RTE/SDS/sds_rec_config.h index 2c1a96a..0e65ec6 100644 --- a/examples/sds_recorder/fs/mdk/RTE/SDS/sds_rec_config.h +++ b/examples/sds_recorder/fs/mdk/RTE/SDS/sds_rec_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_rec_config.h * Purpose: SDS Recorder configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of recorder streams <1-31> // Default: 16 -#define SDS_REC_MAX_STREAMS 16U +#define SDS_REC_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary recorder buffer // Default: 8192 -#define SDS_REC_MAX_RECORD_SIZE 8192U +#define SDS_REC_BUF_SIZE 8192U // diff --git a/examples/sds_recorder/fs/mdk/RTE/SDS/sds_rec_config.h.base@1.0.0 b/examples/sds_recorder/fs/mdk/RTE/SDS/sds_rec_config.h.base@2.0.0 similarity index 82% rename from examples/sds_recorder/fs/mdk/RTE/SDS/sds_rec_config.h.base@1.0.0 rename to examples/sds_recorder/fs/mdk/RTE/SDS/sds_rec_config.h.base@2.0.0 index 2c1a96a..0e65ec6 100644 --- a/examples/sds_recorder/fs/mdk/RTE/SDS/sds_rec_config.h.base@1.0.0 +++ b/examples/sds_recorder/fs/mdk/RTE/SDS/sds_rec_config.h.base@2.0.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_rec_config.h * Purpose: SDS Recorder configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of recorder streams <1-31> // Default: 16 -#define SDS_REC_MAX_STREAMS 16U +#define SDS_REC_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary recorder buffer // Default: 8192 -#define SDS_REC_MAX_RECORD_SIZE 8192U +#define SDS_REC_BUF_SIZE 8192U // diff --git a/examples/sds_recorder/fs/mdk/SDS_Recorder.cproject.yml b/examples/sds_recorder/fs/mdk/SDS_Recorder.cproject.yml index bd1aa39..51d6bec 100644 --- a/examples/sds_recorder/fs/mdk/SDS_Recorder.cproject.yml +++ b/examples/sds_recorder/fs/mdk/SDS_Recorder.cproject.yml @@ -1,8 +1,10 @@ project: packs: - pack: ARM::SDS - - pack: Keil::ARM_Compiler@1.7.2 - - pack: Keil::MDK-Middleware@7.16.0 + - pack: ARM::CMSIS@>=6.0.0 + - pack: ARM::CMSIS-RTX@>=5.8.0 + - pack: ARM::CMSIS-Compiler@>=2.0.0 + - pack: Keil::MDK-Middleware@7.17.0 connections: - connect: Demo Application @@ -16,16 +18,17 @@ project: components: - component: ARM::CMSIS:RTOS2:Keil RTX5&Source + - component: ARM::CMSIS:OS Tick - component: ARM::SDS:Buffer - component: ARM::SDS:IO:File System&MDK FS - component: ARM::SDS:Recorder - - component: Keil::Compiler&ARM Compiler:I/O:File&File System + - component: Keil::CMSIS-Compiler:File Interface:MDK-MW File System - component: Keil::File System&MDK-Plus:CORE&LFN - component: Keil::File System&MDK-Plus:Drive:Memory Card groups: - group: Documentation - files: + files: - file: ./README.md - group: Source Files files: diff --git a/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.c b/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.c index 737078a..d21fa0a 100644 --- a/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.c +++ b/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.c.base@5.1.1 b/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.c.base@5.2.0 similarity index 91% rename from examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.c.base@5.1.1 rename to examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.c.base@5.2.0 index 737078a..d21fa0a 100644 --- a/examples/sds_recorder/fs/mdk/RTE/CMSIS/RTX_Config.c.base@5.1.1 +++ b/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.c.base@5.2.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.h b/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.h index 4d2f501..d9631b2 100644 --- a/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.h +++ b/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,6 +197,20 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. @@ -156,10 +225,10 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE #define OS_PRIVILEGE_MODE 1 #endif @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_player/RTE/CMSIS/RTX_Config.h.base@5.5.2 b/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.h.base@5.6.0 similarity index 85% rename from examples/sds_player/RTE/CMSIS/RTX_Config.h.base@5.5.2 rename to examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.h.base@5.6.0 index 4d2f501..fe0c57b 100644 --- a/examples/sds_player/RTE/CMSIS/RTX_Config.h.base@5.5.2 +++ b/examples/sds_recorder/fs/semihosting/RTE/CMSIS/RTX_Config.h.base@5.6.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,11 +197,25 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. #ifndef OS_STACK_CHECK -#define OS_STACK_CHECK 0 +#define OS_STACK_CHECK 1 #endif // Stack usage watermark @@ -156,12 +225,12 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE -#define OS_PRIVILEGE_MODE 1 +#define OS_PRIVILEGE_MODE 0 #endif // @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_recorder/fs/semihosting/RTE/SDS/sds_rec_config.h b/examples/sds_recorder/fs/semihosting/RTE/SDS/sds_rec_config.h index 2c1a96a..0e65ec6 100644 --- a/examples/sds_recorder/fs/semihosting/RTE/SDS/sds_rec_config.h +++ b/examples/sds_recorder/fs/semihosting/RTE/SDS/sds_rec_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_rec_config.h * Purpose: SDS Recorder configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of recorder streams <1-31> // Default: 16 -#define SDS_REC_MAX_STREAMS 16U +#define SDS_REC_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary recorder buffer // Default: 8192 -#define SDS_REC_MAX_RECORD_SIZE 8192U +#define SDS_REC_BUF_SIZE 8192U // diff --git a/examples/sds_recorder/socket/RTE/SDS/sds_rec_config.h.base@1.0.0 b/examples/sds_recorder/fs/semihosting/RTE/SDS/sds_rec_config.h.base@2.0.0 similarity index 82% rename from examples/sds_recorder/socket/RTE/SDS/sds_rec_config.h.base@1.0.0 rename to examples/sds_recorder/fs/semihosting/RTE/SDS/sds_rec_config.h.base@2.0.0 index 2c1a96a..0e65ec6 100644 --- a/examples/sds_recorder/socket/RTE/SDS/sds_rec_config.h.base@1.0.0 +++ b/examples/sds_recorder/fs/semihosting/RTE/SDS/sds_rec_config.h.base@2.0.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_rec_config.h * Purpose: SDS Recorder configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of recorder streams <1-31> // Default: 16 -#define SDS_REC_MAX_STREAMS 16U +#define SDS_REC_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary recorder buffer // Default: 8192 -#define SDS_REC_MAX_RECORD_SIZE 8192U +#define SDS_REC_BUF_SIZE 8192U // diff --git a/examples/sds_recorder/fs/semihosting/SDS_Recorder.cproject.yml b/examples/sds_recorder/fs/semihosting/SDS_Recorder.cproject.yml index 2f0037c..7ba9b13 100644 --- a/examples/sds_recorder/fs/semihosting/SDS_Recorder.cproject.yml +++ b/examples/sds_recorder/fs/semihosting/SDS_Recorder.cproject.yml @@ -1,6 +1,8 @@ project: packs: - pack: ARM::SDS + - pack: ARM::CMSIS@>=6.0.0 + - pack: ARM::CMSIS-RTX@>=5.8.0 connections: - connect: Demo Application @@ -14,6 +16,7 @@ project: components: - component: ARM::CMSIS:RTOS2:Keil RTX5&Source + - component: ARM::CMSIS:OS Tick - component: ARM::SDS:Buffer - component: ARM::SDS:IO:File System&Semihosting - component: ARM::SDS:Recorder diff --git a/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.c b/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.c index 737078a..d21fa0a 100644 --- a/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.c +++ b/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.c.base@5.1.1 b/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.c.base@5.1.1 deleted file mode 100644 index 737078a..0000000 --- a/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.c.base@5.1.1 +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ----------------------------------------------------------------------------- - * - * $Revision: V5.1.1 - * - * Project: CMSIS-RTOS RTX - * Title: RTX Configuration - * - * ----------------------------------------------------------------------------- - */ - -#include "cmsis_compiler.h" -#include "rtx_os.h" - -// OS Idle Thread -__WEAK __NO_RETURN void osRtxIdleThread (void *argument) { - (void)argument; - - for (;;) {} -} - -// OS Error Callback function -__WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { - (void)object_id; - - switch (code) { - case osRtxErrorStackOverflow: - // Stack overflow detected for thread (thread_id=object_id) - break; - case osRtxErrorISRQueueOverflow: - // ISR Queue overflow detected when inserting object (object_id) - break; - case osRtxErrorTimerQueueOverflow: - // User Timer Callback Queue overflow detected for timer (timer_id=object_id) - break; - case osRtxErrorClibSpace: - // Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM - break; - case osRtxErrorClibMutex: - // Standard C/C++ library mutex initialization failed - break; - default: - // Reserved - break; - } - for (;;) {} -//return 0U; -} diff --git a/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.c.base@5.2.0 b/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.c.base@5.2.0 new file mode 100644 index 0000000..d21fa0a --- /dev/null +++ b/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.c.base@5.2.0 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ----------------------------------------------------------------------------- + * + * $Revision: V5.2.0 + * + * Project: CMSIS-RTOS RTX + * Title: RTX Configuration + * + * ----------------------------------------------------------------------------- + */ + +#include "cmsis_compiler.h" +#include "rtx_os.h" + +// OS Idle Thread +__WEAK __NO_RETURN void osRtxIdleThread (void *argument) { + (void)argument; + + for (;;) {} +} + +// OS Error Callback function +__WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { + (void)object_id; + + switch (code) { + case osRtxErrorStackOverflow: + // Stack overflow detected for thread (thread_id=object_id) + break; + case osRtxErrorISRQueueOverflow: + // ISR Queue overflow detected when inserting object (object_id) + break; + case osRtxErrorTimerQueueOverflow: + // User Timer Callback Queue overflow detected for timer (timer_id=object_id) + break; + case osRtxErrorClibSpace: + // Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM + break; + case osRtxErrorClibMutex: + // Standard C/C++ library mutex initialization failed + break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; + default: + // Reserved + break; + } + for (;;) {} +//return 0U; +} diff --git a/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.h b/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.h index 4d2f501..d9631b2 100644 --- a/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.h +++ b/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,6 +197,20 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. @@ -156,10 +225,10 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE #define OS_PRIVILEGE_MODE 1 #endif @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.h.base@5.5.2 b/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.h.base@5.5.2 deleted file mode 100644 index 4d2f501..0000000 --- a/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.h.base@5.5.2 +++ /dev/null @@ -1,580 +0,0 @@ -/* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ----------------------------------------------------------------------------- - * - * $Revision: V5.5.2 - * - * Project: CMSIS-RTOS RTX - * Title: RTX Configuration definitions - * - * ----------------------------------------------------------------------------- - */ - -#ifndef RTX_CONFIG_H_ -#define RTX_CONFIG_H_ - -#ifdef _RTE_ -#include "RTE_Components.h" -#ifdef RTE_RTX_CONFIG_H -#include RTE_RTX_CONFIG_H -#endif -#endif - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// System Configuration -// ======================= - -// Global Dynamic Memory size [bytes] <0-1073741824:8> -// Defines the combined global dynamic memory size. -// Default: 32768 -#ifndef OS_DYNAMIC_MEM_SIZE -#define OS_DYNAMIC_MEM_SIZE 32768 -#endif - -// Kernel Tick Frequency [Hz] <1-1000000> -// Defines base time unit for delays and timeouts. -// Default: 1000 (1ms tick) -#ifndef OS_TICK_FREQ -#define OS_TICK_FREQ 1000 -#endif - -// Round-Robin Thread switching -// Enables Round-Robin Thread switching. -#ifndef OS_ROBIN_ENABLE -#define OS_ROBIN_ENABLE 1 -#endif - -// Round-Robin Timeout <1-1000> -// Defines how many ticks a thread will execute before a thread switch. -// Default: 5 -#ifndef OS_ROBIN_TIMEOUT -#define OS_ROBIN_TIMEOUT 5 -#endif - -// - -// ISR FIFO Queue -// <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries -// <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries -// <96=> 96 entries <128=> 128 entries <196=> 196 entries <256=> 256 entries -// RTOS Functions called from ISR store requests to this buffer. -// Default: 16 entries -#ifndef OS_ISR_FIFO_QUEUE -#define OS_ISR_FIFO_QUEUE 16 -#endif - -// Object Memory usage counters -// Enables object memory usage counters (requires RTX source variant). -#ifndef OS_OBJ_MEM_USAGE -#define OS_OBJ_MEM_USAGE 0 -#endif - -// - -// Thread Configuration -// ======================= - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_THREAD_OBJ_MEM -#define OS_THREAD_OBJ_MEM 0 -#endif - -// Number of user Threads <1-1000> -// Defines maximum number of user threads that can be active at the same time. -// Applies to user threads with system provided memory for control blocks. -#ifndef OS_THREAD_NUM -#define OS_THREAD_NUM 1 -#endif - -// Number of user Threads with default Stack size <0-1000> -// Defines maximum number of user threads with default stack size. -// Applies to user threads with zero stack size specified. -#ifndef OS_THREAD_DEF_STACK_NUM -#define OS_THREAD_DEF_STACK_NUM 0 -#endif - -// Total Stack size [bytes] for user Threads with user-provided Stack size <0-1073741824:8> -// Defines the combined stack size for user threads with user-provided stack size. -// Applies to user threads with user-provided stack size and system provided memory for stack. -// Default: 0 -#ifndef OS_THREAD_USER_STACK_SIZE -#define OS_THREAD_USER_STACK_SIZE 0 -#endif - -// - -// Default Thread Stack size [bytes] <96-1073741824:8> -// Defines stack size for threads with zero stack size specified. -// Default: 3072 -#ifndef OS_STACK_SIZE -#define OS_STACK_SIZE 3072 -#endif - -// Idle Thread Stack size [bytes] <72-1073741824:8> -// Defines stack size for Idle thread. -// Default: 512 -#ifndef OS_IDLE_THREAD_STACK_SIZE -#define OS_IDLE_THREAD_STACK_SIZE 512 -#endif - -// Idle Thread TrustZone Module Identifier -// Defines TrustZone Thread Context Management Identifier. -// Applies only to cores with TrustZone technology. -// Default: 0 (not used) -#ifndef OS_IDLE_THREAD_TZ_MOD_ID -#define OS_IDLE_THREAD_TZ_MOD_ID 0 -#endif - -// Stack overrun checking -// Enables stack overrun check at thread switch (requires RTX source variant). -// Enabling this option increases slightly the execution time of a thread switch. -#ifndef OS_STACK_CHECK -#define OS_STACK_CHECK 0 -#endif - -// Stack usage watermark -// Initializes thread stack with watermark pattern for analyzing stack usage. -// Enabling this option increases significantly the execution time of thread creation. -#ifndef OS_STACK_WATERMARK -#define OS_STACK_WATERMARK 0 -#endif - -// Processor mode for Thread execution -// <0=> Unprivileged mode -// <1=> Privileged mode -// Default: Privileged mode -#ifndef OS_PRIVILEGE_MODE -#define OS_PRIVILEGE_MODE 1 -#endif - -// - -// Timer Configuration -// ====================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_TIMER_OBJ_MEM -#define OS_TIMER_OBJ_MEM 0 -#endif - -// Number of Timer objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_TIMER_NUM -#define OS_TIMER_NUM 1 -#endif - -// - -// Timer Thread Priority -// <8=> Low -// <16=> Below Normal <24=> Normal <32=> Above Normal -// <40=> High -// <48=> Realtime -// Defines priority for timer thread -// Default: High -#ifndef OS_TIMER_THREAD_PRIO -#define OS_TIMER_THREAD_PRIO 40 -#endif - -// Timer Thread Stack size [bytes] <0-1073741824:8> -// Defines stack size for Timer thread. -// May be set to 0 when timers are not used. -// Default: 512 -#ifndef OS_TIMER_THREAD_STACK_SIZE -#define OS_TIMER_THREAD_STACK_SIZE 512 -#endif - -// Timer Thread TrustZone Module Identifier -// Defines TrustZone Thread Context Management Identifier. -// Applies only to cores with TrustZone technology. -// Default: 0 (not used) -#ifndef OS_TIMER_THREAD_TZ_MOD_ID -#define OS_TIMER_THREAD_TZ_MOD_ID 0 -#endif - -// Timer Callback Queue entries <0-256> -// Number of concurrent active timer callback functions. -// May be set to 0 when timers are not used. -// Default: 4 -#ifndef OS_TIMER_CB_QUEUE -#define OS_TIMER_CB_QUEUE 4 -#endif - -// - -// Event Flags Configuration -// ============================ - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_EVFLAGS_OBJ_MEM -#define OS_EVFLAGS_OBJ_MEM 0 -#endif - -// Number of Event Flags objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_EVFLAGS_NUM -#define OS_EVFLAGS_NUM 1 -#endif - -// - -// - -// Mutex Configuration -// ====================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_MUTEX_OBJ_MEM -#define OS_MUTEX_OBJ_MEM 0 -#endif - -// Number of Mutex objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_MUTEX_NUM -#define OS_MUTEX_NUM 1 -#endif - -// - -// - -// Semaphore Configuration -// ========================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_SEMAPHORE_OBJ_MEM -#define OS_SEMAPHORE_OBJ_MEM 0 -#endif - -// Number of Semaphore objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_SEMAPHORE_NUM -#define OS_SEMAPHORE_NUM 1 -#endif - -// - -// - -// Memory Pool Configuration -// ============================ - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_MEMPOOL_OBJ_MEM -#define OS_MEMPOOL_OBJ_MEM 0 -#endif - -// Number of Memory Pool objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_MEMPOOL_NUM -#define OS_MEMPOOL_NUM 1 -#endif - -// Data Storage Memory size [bytes] <0-1073741824:8> -// Defines the combined data storage memory size. -// Applies to objects with system provided memory for data storage. -// Default: 0 -#ifndef OS_MEMPOOL_DATA_SIZE -#define OS_MEMPOOL_DATA_SIZE 0 -#endif - -// - -// - -// Message Queue Configuration -// ============================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_MSGQUEUE_OBJ_MEM -#define OS_MSGQUEUE_OBJ_MEM 0 -#endif - -// Number of Message Queue objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_MSGQUEUE_NUM -#define OS_MSGQUEUE_NUM 1 -#endif - -// Data Storage Memory size [bytes] <0-1073741824:8> -// Defines the combined data storage memory size. -// Applies to objects with system provided memory for data storage. -// Default: 0 -#ifndef OS_MSGQUEUE_DATA_SIZE -#define OS_MSGQUEUE_DATA_SIZE 0 -#endif - -// - -// - -// Event Recorder Configuration -// =============================== - -// Global Initialization -// Initialize Event Recorder during 'osKernelInitialize'. -#ifndef OS_EVR_INIT -#define OS_EVR_INIT 0 -#endif - -// Start recording -// Start event recording after initialization. -#ifndef OS_EVR_START -#define OS_EVR_START 1 -#endif - -// Global Event Filter Setup -// Initial recording level applied to all components. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_LEVEL -#define OS_EVR_LEVEL 0x00U -#endif - -// RTOS Event Filter Setup -// Recording levels for RTX components. -// Only applicable if events for the respective component are generated. - -// Memory Management -// Recording level for Memory Management events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MEMORY_LEVEL -#define OS_EVR_MEMORY_LEVEL 0x81U -#endif - -// Kernel -// Recording level for Kernel events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_KERNEL_LEVEL -#define OS_EVR_KERNEL_LEVEL 0x81U -#endif - -// Thread -// Recording level for Thread events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_THREAD_LEVEL -#define OS_EVR_THREAD_LEVEL 0x85U -#endif - -// Generic Wait -// Recording level for Generic Wait events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_WAIT_LEVEL -#define OS_EVR_WAIT_LEVEL 0x81U -#endif - -// Thread Flags -// Recording level for Thread Flags events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_THFLAGS_LEVEL -#define OS_EVR_THFLAGS_LEVEL 0x81U -#endif - -// Event Flags -// Recording level for Event Flags events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_EVFLAGS_LEVEL -#define OS_EVR_EVFLAGS_LEVEL 0x81U -#endif - -// Timer -// Recording level for Timer events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_TIMER_LEVEL -#define OS_EVR_TIMER_LEVEL 0x81U -#endif - -// Mutex -// Recording level for Mutex events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MUTEX_LEVEL -#define OS_EVR_MUTEX_LEVEL 0x81U -#endif - -// Semaphore -// Recording level for Semaphore events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_SEMAPHORE_LEVEL -#define OS_EVR_SEMAPHORE_LEVEL 0x81U -#endif - -// Memory Pool -// Recording level for Memory Pool events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MEMPOOL_LEVEL -#define OS_EVR_MEMPOOL_LEVEL 0x81U -#endif - -// Message Queue -// Recording level for Message Queue events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MSGQUEUE_LEVEL -#define OS_EVR_MSGQUEUE_LEVEL 0x81U -#endif - -// - -// - -// RTOS Event Generation -// Enables event generation for RTX components (requires RTX source variant). - -// Memory Management -// Enables Memory Management event generation. -#ifndef OS_EVR_MEMORY -#define OS_EVR_MEMORY 1 -#endif - -// Kernel -// Enables Kernel event generation. -#ifndef OS_EVR_KERNEL -#define OS_EVR_KERNEL 1 -#endif - -// Thread -// Enables Thread event generation. -#ifndef OS_EVR_THREAD -#define OS_EVR_THREAD 1 -#endif - -// Generic Wait -// Enables Generic Wait event generation. -#ifndef OS_EVR_WAIT -#define OS_EVR_WAIT 1 -#endif - -// Thread Flags -// Enables Thread Flags event generation. -#ifndef OS_EVR_THFLAGS -#define OS_EVR_THFLAGS 1 -#endif - -// Event Flags -// Enables Event Flags event generation. -#ifndef OS_EVR_EVFLAGS -#define OS_EVR_EVFLAGS 1 -#endif - -// Timer -// Enables Timer event generation. -#ifndef OS_EVR_TIMER -#define OS_EVR_TIMER 1 -#endif - -// Mutex -// Enables Mutex event generation. -#ifndef OS_EVR_MUTEX -#define OS_EVR_MUTEX 1 -#endif - -// Semaphore -// Enables Semaphore event generation. -#ifndef OS_EVR_SEMAPHORE -#define OS_EVR_SEMAPHORE 1 -#endif - -// Memory Pool -// Enables Memory Pool event generation. -#ifndef OS_EVR_MEMPOOL -#define OS_EVR_MEMPOOL 1 -#endif - -// Message Queue -// Enables Message Queue event generation. -#ifndef OS_EVR_MSGQUEUE -#define OS_EVR_MSGQUEUE 1 -#endif - -// - -// - -// Number of Threads which use standard C/C++ library libspace -// (when thread specific memory allocation is not used). -#if (OS_THREAD_OBJ_MEM == 0) -#ifndef OS_THREAD_LIBSPACE_NUM -#define OS_THREAD_LIBSPACE_NUM 4 -#endif -#else -#define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM -#endif - -//------------- <<< end of configuration section >>> --------------------------- - -#endif // RTX_CONFIG_H_ diff --git a/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.h.base@5.6.0 b/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.h.base@5.6.0 new file mode 100644 index 0000000..fe0c57b --- /dev/null +++ b/examples/sds_recorder/serial/usart/RTE/CMSIS/RTX_Config.h.base@5.6.0 @@ -0,0 +1,663 @@ +/* + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ----------------------------------------------------------------------------- + * + * $Revision: V5.6.0 + * + * Project: CMSIS-RTOS RTX + * Title: RTX Configuration definitions + * + * ----------------------------------------------------------------------------- + */ + +#ifndef RTX_CONFIG_H_ +#define RTX_CONFIG_H_ + +#ifdef _RTE_ +#include "RTE_Components.h" +#ifdef RTE_RTX_CONFIG_H +#include RTE_RTX_CONFIG_H +#endif +#endif + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// System Configuration +// ======================= + +// Global Dynamic Memory size [bytes] <0-1073741824:8> +// Defines the combined global dynamic memory size. +// Default: 32768 +#ifndef OS_DYNAMIC_MEM_SIZE +#define OS_DYNAMIC_MEM_SIZE 32768 +#endif + +// Kernel Tick Frequency [Hz] <1-1000000> +// Defines base time unit for delays and timeouts. +// Default: 1000 (1ms tick) +#ifndef OS_TICK_FREQ +#define OS_TICK_FREQ 1000 +#endif + +// Round-Robin Thread switching +// Enables Round-Robin Thread switching. +#ifndef OS_ROBIN_ENABLE +#define OS_ROBIN_ENABLE 1 +#endif + +// Round-Robin Timeout <1-1000> +// Defines how many ticks a thread will execute before a thread switch. +// Default: 5 +#ifndef OS_ROBIN_TIMEOUT +#define OS_ROBIN_TIMEOUT 5 +#endif + +// + +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + +// ISR FIFO Queue +// <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries +// <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries +// <96=> 96 entries <128=> 128 entries <196=> 196 entries <256=> 256 entries +// RTOS Functions called from ISR store requests to this buffer. +// Default: 16 entries +#ifndef OS_ISR_FIFO_QUEUE +#define OS_ISR_FIFO_QUEUE 16 +#endif + +// Object Memory usage counters +// Enables object memory usage counters (requires RTX source variant). +#ifndef OS_OBJ_MEM_USAGE +#define OS_OBJ_MEM_USAGE 0 +#endif + +// + +// Thread Configuration +// ======================= + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_THREAD_OBJ_MEM +#define OS_THREAD_OBJ_MEM 0 +#endif + +// Number of user Threads <1-1000> +// Defines maximum number of user threads that can be active at the same time. +// Applies to user threads with system provided memory for control blocks. +#ifndef OS_THREAD_NUM +#define OS_THREAD_NUM 1 +#endif + +// Number of user Threads with default Stack size <0-1000> +// Defines maximum number of user threads with default stack size. +// Applies to user threads with zero stack size specified. +#ifndef OS_THREAD_DEF_STACK_NUM +#define OS_THREAD_DEF_STACK_NUM 0 +#endif + +// Total Stack size [bytes] for user Threads with user-provided Stack size <0-1073741824:8> +// Defines the combined stack size for user threads with user-provided stack size. +// Applies to user threads with user-provided stack size and system provided memory for stack. +// Default: 0 +#ifndef OS_THREAD_USER_STACK_SIZE +#define OS_THREAD_USER_STACK_SIZE 0 +#endif + +// + +// Default Thread Stack size [bytes] <96-1073741824:8> +// Defines stack size for threads with zero stack size specified. +// Default: 3072 +#ifndef OS_STACK_SIZE +#define OS_STACK_SIZE 3072 +#endif + +// Idle Thread Stack size [bytes] <72-1073741824:8> +// Defines stack size for Idle thread. +// Default: 512 +#ifndef OS_IDLE_THREAD_STACK_SIZE +#define OS_IDLE_THREAD_STACK_SIZE 512 +#endif + +// Idle Thread TrustZone Module Identifier +// Defines TrustZone Thread Context Management Identifier. +// Applies only to cores with TrustZone technology. +// Default: 0 (not used) +#ifndef OS_IDLE_THREAD_TZ_MOD_ID +#define OS_IDLE_THREAD_TZ_MOD_ID 0 +#endif + +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + +// Stack overrun checking +// Enables stack overrun check at thread switch (requires RTX source variant). +// Enabling this option increases slightly the execution time of a thread switch. +#ifndef OS_STACK_CHECK +#define OS_STACK_CHECK 1 +#endif + +// Stack usage watermark +// Initializes thread stack with watermark pattern for analyzing stack usage. +// Enabling this option increases significantly the execution time of thread creation. +#ifndef OS_STACK_WATERMARK +#define OS_STACK_WATERMARK 0 +#endif + +// Default Processor mode for Thread execution +// <0=> Unprivileged mode +// <1=> Privileged mode +// Default: Unprivileged mode +#ifndef OS_PRIVILEGE_MODE +#define OS_PRIVILEGE_MODE 0 +#endif + +// + +// Timer Configuration +// ====================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_TIMER_OBJ_MEM +#define OS_TIMER_OBJ_MEM 0 +#endif + +// Number of Timer objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_TIMER_NUM +#define OS_TIMER_NUM 1 +#endif + +// + +// Timer Thread Priority +// <8=> Low +// <16=> Below Normal <24=> Normal <32=> Above Normal +// <40=> High +// <48=> Realtime +// Defines priority for timer thread +// Default: High +#ifndef OS_TIMER_THREAD_PRIO +#define OS_TIMER_THREAD_PRIO 40 +#endif + +// Timer Thread Stack size [bytes] <0-1073741824:8> +// Defines stack size for Timer thread. +// May be set to 0 when timers are not used. +// Default: 512 +#ifndef OS_TIMER_THREAD_STACK_SIZE +#define OS_TIMER_THREAD_STACK_SIZE 512 +#endif + +// Timer Thread TrustZone Module Identifier +// Defines TrustZone Thread Context Management Identifier. +// Applies only to cores with TrustZone technology. +// Default: 0 (not used) +#ifndef OS_TIMER_THREAD_TZ_MOD_ID +#define OS_TIMER_THREAD_TZ_MOD_ID 0 +#endif + +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + +// Timer Callback Queue entries <0-256> +// Number of concurrent active timer callback functions. +// May be set to 0 when timers are not used. +// Default: 4 +#ifndef OS_TIMER_CB_QUEUE +#define OS_TIMER_CB_QUEUE 4 +#endif + +// + +// Event Flags Configuration +// ============================ + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_EVFLAGS_OBJ_MEM +#define OS_EVFLAGS_OBJ_MEM 0 +#endif + +// Number of Event Flags objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_EVFLAGS_NUM +#define OS_EVFLAGS_NUM 1 +#endif + +// + +// + +// Mutex Configuration +// ====================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_MUTEX_OBJ_MEM +#define OS_MUTEX_OBJ_MEM 0 +#endif + +// Number of Mutex objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_MUTEX_NUM +#define OS_MUTEX_NUM 1 +#endif + +// + +// + +// Semaphore Configuration +// ========================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_SEMAPHORE_OBJ_MEM +#define OS_SEMAPHORE_OBJ_MEM 0 +#endif + +// Number of Semaphore objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_SEMAPHORE_NUM +#define OS_SEMAPHORE_NUM 1 +#endif + +// + +// + +// Memory Pool Configuration +// ============================ + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_MEMPOOL_OBJ_MEM +#define OS_MEMPOOL_OBJ_MEM 0 +#endif + +// Number of Memory Pool objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_MEMPOOL_NUM +#define OS_MEMPOOL_NUM 1 +#endif + +// Data Storage Memory size [bytes] <0-1073741824:8> +// Defines the combined data storage memory size. +// Applies to objects with system provided memory for data storage. +// Default: 0 +#ifndef OS_MEMPOOL_DATA_SIZE +#define OS_MEMPOOL_DATA_SIZE 0 +#endif + +// + +// + +// Message Queue Configuration +// ============================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_MSGQUEUE_OBJ_MEM +#define OS_MSGQUEUE_OBJ_MEM 0 +#endif + +// Number of Message Queue objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_MSGQUEUE_NUM +#define OS_MSGQUEUE_NUM 1 +#endif + +// Data Storage Memory size [bytes] <0-1073741824:8> +// Defines the combined data storage memory size. +// Applies to objects with system provided memory for data storage. +// Default: 0 +#ifndef OS_MSGQUEUE_DATA_SIZE +#define OS_MSGQUEUE_DATA_SIZE 0 +#endif + +// + +// + +// Event Recorder Configuration +// =============================== + +// Global Initialization +// Initialize Event Recorder during 'osKernelInitialize'. +#ifndef OS_EVR_INIT +#define OS_EVR_INIT 0 +#endif + +// Start recording +// Start event recording after initialization. +#ifndef OS_EVR_START +#define OS_EVR_START 1 +#endif + +// Global Event Filter Setup +// Initial recording level applied to all components. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_LEVEL +#define OS_EVR_LEVEL 0x00U +#endif + +// RTOS Event Filter Setup +// Recording levels for RTX components. +// Only applicable if events for the respective component are generated. + +// Memory Management +// Recording level for Memory Management events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MEMORY_LEVEL +#define OS_EVR_MEMORY_LEVEL 0x81U +#endif + +// Kernel +// Recording level for Kernel events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_KERNEL_LEVEL +#define OS_EVR_KERNEL_LEVEL 0x81U +#endif + +// Thread +// Recording level for Thread events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_THREAD_LEVEL +#define OS_EVR_THREAD_LEVEL 0x85U +#endif + +// Generic Wait +// Recording level for Generic Wait events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_WAIT_LEVEL +#define OS_EVR_WAIT_LEVEL 0x81U +#endif + +// Thread Flags +// Recording level for Thread Flags events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_THFLAGS_LEVEL +#define OS_EVR_THFLAGS_LEVEL 0x81U +#endif + +// Event Flags +// Recording level for Event Flags events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_EVFLAGS_LEVEL +#define OS_EVR_EVFLAGS_LEVEL 0x81U +#endif + +// Timer +// Recording level for Timer events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_TIMER_LEVEL +#define OS_EVR_TIMER_LEVEL 0x81U +#endif + +// Mutex +// Recording level for Mutex events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MUTEX_LEVEL +#define OS_EVR_MUTEX_LEVEL 0x81U +#endif + +// Semaphore +// Recording level for Semaphore events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_SEMAPHORE_LEVEL +#define OS_EVR_SEMAPHORE_LEVEL 0x81U +#endif + +// Memory Pool +// Recording level for Memory Pool events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MEMPOOL_LEVEL +#define OS_EVR_MEMPOOL_LEVEL 0x81U +#endif + +// Message Queue +// Recording level for Message Queue events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MSGQUEUE_LEVEL +#define OS_EVR_MSGQUEUE_LEVEL 0x81U +#endif + +// + +// + +// RTOS Event Generation +// Enables event generation for RTX components (requires RTX source variant). + +// Memory Management +// Enables Memory Management event generation. +#ifndef OS_EVR_MEMORY +#define OS_EVR_MEMORY 1 +#endif + +// Kernel +// Enables Kernel event generation. +#ifndef OS_EVR_KERNEL +#define OS_EVR_KERNEL 1 +#endif + +// Thread +// Enables Thread event generation. +#ifndef OS_EVR_THREAD +#define OS_EVR_THREAD 1 +#endif + +// Generic Wait +// Enables Generic Wait event generation. +#ifndef OS_EVR_WAIT +#define OS_EVR_WAIT 1 +#endif + +// Thread Flags +// Enables Thread Flags event generation. +#ifndef OS_EVR_THFLAGS +#define OS_EVR_THFLAGS 1 +#endif + +// Event Flags +// Enables Event Flags event generation. +#ifndef OS_EVR_EVFLAGS +#define OS_EVR_EVFLAGS 1 +#endif + +// Timer +// Enables Timer event generation. +#ifndef OS_EVR_TIMER +#define OS_EVR_TIMER 1 +#endif + +// Mutex +// Enables Mutex event generation. +#ifndef OS_EVR_MUTEX +#define OS_EVR_MUTEX 1 +#endif + +// Semaphore +// Enables Semaphore event generation. +#ifndef OS_EVR_SEMAPHORE +#define OS_EVR_SEMAPHORE 1 +#endif + +// Memory Pool +// Enables Memory Pool event generation. +#ifndef OS_EVR_MEMPOOL +#define OS_EVR_MEMPOOL 1 +#endif + +// Message Queue +// Enables Message Queue event generation. +#ifndef OS_EVR_MSGQUEUE +#define OS_EVR_MSGQUEUE 1 +#endif + +// + +// + +// Number of Threads which use standard C/C++ library libspace +// (when thread specific memory allocation is not used). +#if (OS_THREAD_OBJ_MEM == 0) +#ifndef OS_THREAD_LIBSPACE_NUM +#define OS_THREAD_LIBSPACE_NUM 4 +#endif +#else +#define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM +#endif + +//------------- <<< end of configuration section >>> --------------------------- + +#endif // RTX_CONFIG_H_ diff --git a/examples/sds_recorder/serial/usart/RTE/SDS/sds_rec_config.h b/examples/sds_recorder/serial/usart/RTE/SDS/sds_rec_config.h index 2c1a96a..0e65ec6 100644 --- a/examples/sds_recorder/serial/usart/RTE/SDS/sds_rec_config.h +++ b/examples/sds_recorder/serial/usart/RTE/SDS/sds_rec_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_rec_config.h * Purpose: SDS Recorder configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of recorder streams <1-31> // Default: 16 -#define SDS_REC_MAX_STREAMS 16U +#define SDS_REC_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary recorder buffer // Default: 8192 -#define SDS_REC_MAX_RECORD_SIZE 8192U +#define SDS_REC_BUF_SIZE 8192U // diff --git a/examples/sds_recorder/fs/semihosting/RTE/SDS/sds_rec_config.h.base@1.0.0 b/examples/sds_recorder/serial/usart/RTE/SDS/sds_rec_config.h.base@2.0.0 similarity index 82% rename from examples/sds_recorder/fs/semihosting/RTE/SDS/sds_rec_config.h.base@1.0.0 rename to examples/sds_recorder/serial/usart/RTE/SDS/sds_rec_config.h.base@2.0.0 index 2c1a96a..0e65ec6 100644 --- a/examples/sds_recorder/fs/semihosting/RTE/SDS/sds_rec_config.h.base@1.0.0 +++ b/examples/sds_recorder/serial/usart/RTE/SDS/sds_rec_config.h.base@2.0.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_rec_config.h * Purpose: SDS Recorder configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of recorder streams <1-31> // Default: 16 -#define SDS_REC_MAX_STREAMS 16U +#define SDS_REC_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary recorder buffer // Default: 8192 -#define SDS_REC_MAX_RECORD_SIZE 8192U +#define SDS_REC_BUF_SIZE 8192U // diff --git a/examples/sds_recorder/serial/usart/SDS_Recorder.cproject.yml b/examples/sds_recorder/serial/usart/SDS_Recorder.cproject.yml index 8341045..abbedea 100644 --- a/examples/sds_recorder/serial/usart/SDS_Recorder.cproject.yml +++ b/examples/sds_recorder/serial/usart/SDS_Recorder.cproject.yml @@ -1,6 +1,8 @@ project: packs: - pack: ARM::SDS + - pack: ARM::CMSIS@>=6.0.0 + - pack: ARM::CMSIS-RTX@>=5.8.0 connections: - connect: Demo Application @@ -14,6 +16,7 @@ project: components: - component: ARM::CMSIS:RTOS2:Keil RTX5&Source + - component: ARM::CMSIS:OS Tick - component: ARM::SDS:Buffer - component: ARM::SDS:IO:Serial&CMSIS USART - component: ARM::SDS:Recorder diff --git a/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.c b/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.c index 737078a..d21fa0a 100644 --- a/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.c +++ b/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.c.base@5.1.1 b/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.c.base@5.1.1 deleted file mode 100644 index 737078a..0000000 --- a/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.c.base@5.1.1 +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ----------------------------------------------------------------------------- - * - * $Revision: V5.1.1 - * - * Project: CMSIS-RTOS RTX - * Title: RTX Configuration - * - * ----------------------------------------------------------------------------- - */ - -#include "cmsis_compiler.h" -#include "rtx_os.h" - -// OS Idle Thread -__WEAK __NO_RETURN void osRtxIdleThread (void *argument) { - (void)argument; - - for (;;) {} -} - -// OS Error Callback function -__WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { - (void)object_id; - - switch (code) { - case osRtxErrorStackOverflow: - // Stack overflow detected for thread (thread_id=object_id) - break; - case osRtxErrorISRQueueOverflow: - // ISR Queue overflow detected when inserting object (object_id) - break; - case osRtxErrorTimerQueueOverflow: - // User Timer Callback Queue overflow detected for timer (timer_id=object_id) - break; - case osRtxErrorClibSpace: - // Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM - break; - case osRtxErrorClibMutex: - // Standard C/C++ library mutex initialization failed - break; - default: - // Reserved - break; - } - for (;;) {} -//return 0U; -} diff --git a/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.c.base@5.2.0 b/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.c.base@5.2.0 new file mode 100644 index 0000000..d21fa0a --- /dev/null +++ b/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.c.base@5.2.0 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ----------------------------------------------------------------------------- + * + * $Revision: V5.2.0 + * + * Project: CMSIS-RTOS RTX + * Title: RTX Configuration + * + * ----------------------------------------------------------------------------- + */ + +#include "cmsis_compiler.h" +#include "rtx_os.h" + +// OS Idle Thread +__WEAK __NO_RETURN void osRtxIdleThread (void *argument) { + (void)argument; + + for (;;) {} +} + +// OS Error Callback function +__WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { + (void)object_id; + + switch (code) { + case osRtxErrorStackOverflow: + // Stack overflow detected for thread (thread_id=object_id) + break; + case osRtxErrorISRQueueOverflow: + // ISR Queue overflow detected when inserting object (object_id) + break; + case osRtxErrorTimerQueueOverflow: + // User Timer Callback Queue overflow detected for timer (timer_id=object_id) + break; + case osRtxErrorClibSpace: + // Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM + break; + case osRtxErrorClibMutex: + // Standard C/C++ library mutex initialization failed + break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; + default: + // Reserved + break; + } + for (;;) {} +//return 0U; +} diff --git a/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.h b/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.h index 4d2f501..d9631b2 100644 --- a/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.h +++ b/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,6 +197,20 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. @@ -156,10 +225,10 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE #define OS_PRIVILEGE_MODE 1 #endif @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.h.base@5.5.2 b/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.h.base@5.5.2 deleted file mode 100644 index 4d2f501..0000000 --- a/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.h.base@5.5.2 +++ /dev/null @@ -1,580 +0,0 @@ -/* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ----------------------------------------------------------------------------- - * - * $Revision: V5.5.2 - * - * Project: CMSIS-RTOS RTX - * Title: RTX Configuration definitions - * - * ----------------------------------------------------------------------------- - */ - -#ifndef RTX_CONFIG_H_ -#define RTX_CONFIG_H_ - -#ifdef _RTE_ -#include "RTE_Components.h" -#ifdef RTE_RTX_CONFIG_H -#include RTE_RTX_CONFIG_H -#endif -#endif - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// System Configuration -// ======================= - -// Global Dynamic Memory size [bytes] <0-1073741824:8> -// Defines the combined global dynamic memory size. -// Default: 32768 -#ifndef OS_DYNAMIC_MEM_SIZE -#define OS_DYNAMIC_MEM_SIZE 32768 -#endif - -// Kernel Tick Frequency [Hz] <1-1000000> -// Defines base time unit for delays and timeouts. -// Default: 1000 (1ms tick) -#ifndef OS_TICK_FREQ -#define OS_TICK_FREQ 1000 -#endif - -// Round-Robin Thread switching -// Enables Round-Robin Thread switching. -#ifndef OS_ROBIN_ENABLE -#define OS_ROBIN_ENABLE 1 -#endif - -// Round-Robin Timeout <1-1000> -// Defines how many ticks a thread will execute before a thread switch. -// Default: 5 -#ifndef OS_ROBIN_TIMEOUT -#define OS_ROBIN_TIMEOUT 5 -#endif - -// - -// ISR FIFO Queue -// <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries -// <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries -// <96=> 96 entries <128=> 128 entries <196=> 196 entries <256=> 256 entries -// RTOS Functions called from ISR store requests to this buffer. -// Default: 16 entries -#ifndef OS_ISR_FIFO_QUEUE -#define OS_ISR_FIFO_QUEUE 16 -#endif - -// Object Memory usage counters -// Enables object memory usage counters (requires RTX source variant). -#ifndef OS_OBJ_MEM_USAGE -#define OS_OBJ_MEM_USAGE 0 -#endif - -// - -// Thread Configuration -// ======================= - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_THREAD_OBJ_MEM -#define OS_THREAD_OBJ_MEM 0 -#endif - -// Number of user Threads <1-1000> -// Defines maximum number of user threads that can be active at the same time. -// Applies to user threads with system provided memory for control blocks. -#ifndef OS_THREAD_NUM -#define OS_THREAD_NUM 1 -#endif - -// Number of user Threads with default Stack size <0-1000> -// Defines maximum number of user threads with default stack size. -// Applies to user threads with zero stack size specified. -#ifndef OS_THREAD_DEF_STACK_NUM -#define OS_THREAD_DEF_STACK_NUM 0 -#endif - -// Total Stack size [bytes] for user Threads with user-provided Stack size <0-1073741824:8> -// Defines the combined stack size for user threads with user-provided stack size. -// Applies to user threads with user-provided stack size and system provided memory for stack. -// Default: 0 -#ifndef OS_THREAD_USER_STACK_SIZE -#define OS_THREAD_USER_STACK_SIZE 0 -#endif - -// - -// Default Thread Stack size [bytes] <96-1073741824:8> -// Defines stack size for threads with zero stack size specified. -// Default: 3072 -#ifndef OS_STACK_SIZE -#define OS_STACK_SIZE 3072 -#endif - -// Idle Thread Stack size [bytes] <72-1073741824:8> -// Defines stack size for Idle thread. -// Default: 512 -#ifndef OS_IDLE_THREAD_STACK_SIZE -#define OS_IDLE_THREAD_STACK_SIZE 512 -#endif - -// Idle Thread TrustZone Module Identifier -// Defines TrustZone Thread Context Management Identifier. -// Applies only to cores with TrustZone technology. -// Default: 0 (not used) -#ifndef OS_IDLE_THREAD_TZ_MOD_ID -#define OS_IDLE_THREAD_TZ_MOD_ID 0 -#endif - -// Stack overrun checking -// Enables stack overrun check at thread switch (requires RTX source variant). -// Enabling this option increases slightly the execution time of a thread switch. -#ifndef OS_STACK_CHECK -#define OS_STACK_CHECK 0 -#endif - -// Stack usage watermark -// Initializes thread stack with watermark pattern for analyzing stack usage. -// Enabling this option increases significantly the execution time of thread creation. -#ifndef OS_STACK_WATERMARK -#define OS_STACK_WATERMARK 0 -#endif - -// Processor mode for Thread execution -// <0=> Unprivileged mode -// <1=> Privileged mode -// Default: Privileged mode -#ifndef OS_PRIVILEGE_MODE -#define OS_PRIVILEGE_MODE 1 -#endif - -// - -// Timer Configuration -// ====================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_TIMER_OBJ_MEM -#define OS_TIMER_OBJ_MEM 0 -#endif - -// Number of Timer objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_TIMER_NUM -#define OS_TIMER_NUM 1 -#endif - -// - -// Timer Thread Priority -// <8=> Low -// <16=> Below Normal <24=> Normal <32=> Above Normal -// <40=> High -// <48=> Realtime -// Defines priority for timer thread -// Default: High -#ifndef OS_TIMER_THREAD_PRIO -#define OS_TIMER_THREAD_PRIO 40 -#endif - -// Timer Thread Stack size [bytes] <0-1073741824:8> -// Defines stack size for Timer thread. -// May be set to 0 when timers are not used. -// Default: 512 -#ifndef OS_TIMER_THREAD_STACK_SIZE -#define OS_TIMER_THREAD_STACK_SIZE 512 -#endif - -// Timer Thread TrustZone Module Identifier -// Defines TrustZone Thread Context Management Identifier. -// Applies only to cores with TrustZone technology. -// Default: 0 (not used) -#ifndef OS_TIMER_THREAD_TZ_MOD_ID -#define OS_TIMER_THREAD_TZ_MOD_ID 0 -#endif - -// Timer Callback Queue entries <0-256> -// Number of concurrent active timer callback functions. -// May be set to 0 when timers are not used. -// Default: 4 -#ifndef OS_TIMER_CB_QUEUE -#define OS_TIMER_CB_QUEUE 4 -#endif - -// - -// Event Flags Configuration -// ============================ - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_EVFLAGS_OBJ_MEM -#define OS_EVFLAGS_OBJ_MEM 0 -#endif - -// Number of Event Flags objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_EVFLAGS_NUM -#define OS_EVFLAGS_NUM 1 -#endif - -// - -// - -// Mutex Configuration -// ====================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_MUTEX_OBJ_MEM -#define OS_MUTEX_OBJ_MEM 0 -#endif - -// Number of Mutex objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_MUTEX_NUM -#define OS_MUTEX_NUM 1 -#endif - -// - -// - -// Semaphore Configuration -// ========================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_SEMAPHORE_OBJ_MEM -#define OS_SEMAPHORE_OBJ_MEM 0 -#endif - -// Number of Semaphore objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_SEMAPHORE_NUM -#define OS_SEMAPHORE_NUM 1 -#endif - -// - -// - -// Memory Pool Configuration -// ============================ - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_MEMPOOL_OBJ_MEM -#define OS_MEMPOOL_OBJ_MEM 0 -#endif - -// Number of Memory Pool objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_MEMPOOL_NUM -#define OS_MEMPOOL_NUM 1 -#endif - -// Data Storage Memory size [bytes] <0-1073741824:8> -// Defines the combined data storage memory size. -// Applies to objects with system provided memory for data storage. -// Default: 0 -#ifndef OS_MEMPOOL_DATA_SIZE -#define OS_MEMPOOL_DATA_SIZE 0 -#endif - -// - -// - -// Message Queue Configuration -// ============================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_MSGQUEUE_OBJ_MEM -#define OS_MSGQUEUE_OBJ_MEM 0 -#endif - -// Number of Message Queue objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_MSGQUEUE_NUM -#define OS_MSGQUEUE_NUM 1 -#endif - -// Data Storage Memory size [bytes] <0-1073741824:8> -// Defines the combined data storage memory size. -// Applies to objects with system provided memory for data storage. -// Default: 0 -#ifndef OS_MSGQUEUE_DATA_SIZE -#define OS_MSGQUEUE_DATA_SIZE 0 -#endif - -// - -// - -// Event Recorder Configuration -// =============================== - -// Global Initialization -// Initialize Event Recorder during 'osKernelInitialize'. -#ifndef OS_EVR_INIT -#define OS_EVR_INIT 0 -#endif - -// Start recording -// Start event recording after initialization. -#ifndef OS_EVR_START -#define OS_EVR_START 1 -#endif - -// Global Event Filter Setup -// Initial recording level applied to all components. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_LEVEL -#define OS_EVR_LEVEL 0x00U -#endif - -// RTOS Event Filter Setup -// Recording levels for RTX components. -// Only applicable if events for the respective component are generated. - -// Memory Management -// Recording level for Memory Management events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MEMORY_LEVEL -#define OS_EVR_MEMORY_LEVEL 0x81U -#endif - -// Kernel -// Recording level for Kernel events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_KERNEL_LEVEL -#define OS_EVR_KERNEL_LEVEL 0x81U -#endif - -// Thread -// Recording level for Thread events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_THREAD_LEVEL -#define OS_EVR_THREAD_LEVEL 0x85U -#endif - -// Generic Wait -// Recording level for Generic Wait events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_WAIT_LEVEL -#define OS_EVR_WAIT_LEVEL 0x81U -#endif - -// Thread Flags -// Recording level for Thread Flags events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_THFLAGS_LEVEL -#define OS_EVR_THFLAGS_LEVEL 0x81U -#endif - -// Event Flags -// Recording level for Event Flags events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_EVFLAGS_LEVEL -#define OS_EVR_EVFLAGS_LEVEL 0x81U -#endif - -// Timer -// Recording level for Timer events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_TIMER_LEVEL -#define OS_EVR_TIMER_LEVEL 0x81U -#endif - -// Mutex -// Recording level for Mutex events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MUTEX_LEVEL -#define OS_EVR_MUTEX_LEVEL 0x81U -#endif - -// Semaphore -// Recording level for Semaphore events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_SEMAPHORE_LEVEL -#define OS_EVR_SEMAPHORE_LEVEL 0x81U -#endif - -// Memory Pool -// Recording level for Memory Pool events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MEMPOOL_LEVEL -#define OS_EVR_MEMPOOL_LEVEL 0x81U -#endif - -// Message Queue -// Recording level for Message Queue events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MSGQUEUE_LEVEL -#define OS_EVR_MSGQUEUE_LEVEL 0x81U -#endif - -// - -// - -// RTOS Event Generation -// Enables event generation for RTX components (requires RTX source variant). - -// Memory Management -// Enables Memory Management event generation. -#ifndef OS_EVR_MEMORY -#define OS_EVR_MEMORY 1 -#endif - -// Kernel -// Enables Kernel event generation. -#ifndef OS_EVR_KERNEL -#define OS_EVR_KERNEL 1 -#endif - -// Thread -// Enables Thread event generation. -#ifndef OS_EVR_THREAD -#define OS_EVR_THREAD 1 -#endif - -// Generic Wait -// Enables Generic Wait event generation. -#ifndef OS_EVR_WAIT -#define OS_EVR_WAIT 1 -#endif - -// Thread Flags -// Enables Thread Flags event generation. -#ifndef OS_EVR_THFLAGS -#define OS_EVR_THFLAGS 1 -#endif - -// Event Flags -// Enables Event Flags event generation. -#ifndef OS_EVR_EVFLAGS -#define OS_EVR_EVFLAGS 1 -#endif - -// Timer -// Enables Timer event generation. -#ifndef OS_EVR_TIMER -#define OS_EVR_TIMER 1 -#endif - -// Mutex -// Enables Mutex event generation. -#ifndef OS_EVR_MUTEX -#define OS_EVR_MUTEX 1 -#endif - -// Semaphore -// Enables Semaphore event generation. -#ifndef OS_EVR_SEMAPHORE -#define OS_EVR_SEMAPHORE 1 -#endif - -// Memory Pool -// Enables Memory Pool event generation. -#ifndef OS_EVR_MEMPOOL -#define OS_EVR_MEMPOOL 1 -#endif - -// Message Queue -// Enables Message Queue event generation. -#ifndef OS_EVR_MSGQUEUE -#define OS_EVR_MSGQUEUE 1 -#endif - -// - -// - -// Number of Threads which use standard C/C++ library libspace -// (when thread specific memory allocation is not used). -#if (OS_THREAD_OBJ_MEM == 0) -#ifndef OS_THREAD_LIBSPACE_NUM -#define OS_THREAD_LIBSPACE_NUM 4 -#endif -#else -#define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM -#endif - -//------------- <<< end of configuration section >>> --------------------------- - -#endif // RTX_CONFIG_H_ diff --git a/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.h.base@5.6.0 b/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.h.base@5.6.0 new file mode 100644 index 0000000..fe0c57b --- /dev/null +++ b/examples/sds_recorder/socket/RTE/CMSIS/RTX_Config.h.base@5.6.0 @@ -0,0 +1,663 @@ +/* + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ----------------------------------------------------------------------------- + * + * $Revision: V5.6.0 + * + * Project: CMSIS-RTOS RTX + * Title: RTX Configuration definitions + * + * ----------------------------------------------------------------------------- + */ + +#ifndef RTX_CONFIG_H_ +#define RTX_CONFIG_H_ + +#ifdef _RTE_ +#include "RTE_Components.h" +#ifdef RTE_RTX_CONFIG_H +#include RTE_RTX_CONFIG_H +#endif +#endif + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// System Configuration +// ======================= + +// Global Dynamic Memory size [bytes] <0-1073741824:8> +// Defines the combined global dynamic memory size. +// Default: 32768 +#ifndef OS_DYNAMIC_MEM_SIZE +#define OS_DYNAMIC_MEM_SIZE 32768 +#endif + +// Kernel Tick Frequency [Hz] <1-1000000> +// Defines base time unit for delays and timeouts. +// Default: 1000 (1ms tick) +#ifndef OS_TICK_FREQ +#define OS_TICK_FREQ 1000 +#endif + +// Round-Robin Thread switching +// Enables Round-Robin Thread switching. +#ifndef OS_ROBIN_ENABLE +#define OS_ROBIN_ENABLE 1 +#endif + +// Round-Robin Timeout <1-1000> +// Defines how many ticks a thread will execute before a thread switch. +// Default: 5 +#ifndef OS_ROBIN_TIMEOUT +#define OS_ROBIN_TIMEOUT 5 +#endif + +// + +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + +// ISR FIFO Queue +// <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries +// <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries +// <96=> 96 entries <128=> 128 entries <196=> 196 entries <256=> 256 entries +// RTOS Functions called from ISR store requests to this buffer. +// Default: 16 entries +#ifndef OS_ISR_FIFO_QUEUE +#define OS_ISR_FIFO_QUEUE 16 +#endif + +// Object Memory usage counters +// Enables object memory usage counters (requires RTX source variant). +#ifndef OS_OBJ_MEM_USAGE +#define OS_OBJ_MEM_USAGE 0 +#endif + +// + +// Thread Configuration +// ======================= + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_THREAD_OBJ_MEM +#define OS_THREAD_OBJ_MEM 0 +#endif + +// Number of user Threads <1-1000> +// Defines maximum number of user threads that can be active at the same time. +// Applies to user threads with system provided memory for control blocks. +#ifndef OS_THREAD_NUM +#define OS_THREAD_NUM 1 +#endif + +// Number of user Threads with default Stack size <0-1000> +// Defines maximum number of user threads with default stack size. +// Applies to user threads with zero stack size specified. +#ifndef OS_THREAD_DEF_STACK_NUM +#define OS_THREAD_DEF_STACK_NUM 0 +#endif + +// Total Stack size [bytes] for user Threads with user-provided Stack size <0-1073741824:8> +// Defines the combined stack size for user threads with user-provided stack size. +// Applies to user threads with user-provided stack size and system provided memory for stack. +// Default: 0 +#ifndef OS_THREAD_USER_STACK_SIZE +#define OS_THREAD_USER_STACK_SIZE 0 +#endif + +// + +// Default Thread Stack size [bytes] <96-1073741824:8> +// Defines stack size for threads with zero stack size specified. +// Default: 3072 +#ifndef OS_STACK_SIZE +#define OS_STACK_SIZE 3072 +#endif + +// Idle Thread Stack size [bytes] <72-1073741824:8> +// Defines stack size for Idle thread. +// Default: 512 +#ifndef OS_IDLE_THREAD_STACK_SIZE +#define OS_IDLE_THREAD_STACK_SIZE 512 +#endif + +// Idle Thread TrustZone Module Identifier +// Defines TrustZone Thread Context Management Identifier. +// Applies only to cores with TrustZone technology. +// Default: 0 (not used) +#ifndef OS_IDLE_THREAD_TZ_MOD_ID +#define OS_IDLE_THREAD_TZ_MOD_ID 0 +#endif + +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + +// Stack overrun checking +// Enables stack overrun check at thread switch (requires RTX source variant). +// Enabling this option increases slightly the execution time of a thread switch. +#ifndef OS_STACK_CHECK +#define OS_STACK_CHECK 1 +#endif + +// Stack usage watermark +// Initializes thread stack with watermark pattern for analyzing stack usage. +// Enabling this option increases significantly the execution time of thread creation. +#ifndef OS_STACK_WATERMARK +#define OS_STACK_WATERMARK 0 +#endif + +// Default Processor mode for Thread execution +// <0=> Unprivileged mode +// <1=> Privileged mode +// Default: Unprivileged mode +#ifndef OS_PRIVILEGE_MODE +#define OS_PRIVILEGE_MODE 0 +#endif + +// + +// Timer Configuration +// ====================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_TIMER_OBJ_MEM +#define OS_TIMER_OBJ_MEM 0 +#endif + +// Number of Timer objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_TIMER_NUM +#define OS_TIMER_NUM 1 +#endif + +// + +// Timer Thread Priority +// <8=> Low +// <16=> Below Normal <24=> Normal <32=> Above Normal +// <40=> High +// <48=> Realtime +// Defines priority for timer thread +// Default: High +#ifndef OS_TIMER_THREAD_PRIO +#define OS_TIMER_THREAD_PRIO 40 +#endif + +// Timer Thread Stack size [bytes] <0-1073741824:8> +// Defines stack size for Timer thread. +// May be set to 0 when timers are not used. +// Default: 512 +#ifndef OS_TIMER_THREAD_STACK_SIZE +#define OS_TIMER_THREAD_STACK_SIZE 512 +#endif + +// Timer Thread TrustZone Module Identifier +// Defines TrustZone Thread Context Management Identifier. +// Applies only to cores with TrustZone technology. +// Default: 0 (not used) +#ifndef OS_TIMER_THREAD_TZ_MOD_ID +#define OS_TIMER_THREAD_TZ_MOD_ID 0 +#endif + +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + +// Timer Callback Queue entries <0-256> +// Number of concurrent active timer callback functions. +// May be set to 0 when timers are not used. +// Default: 4 +#ifndef OS_TIMER_CB_QUEUE +#define OS_TIMER_CB_QUEUE 4 +#endif + +// + +// Event Flags Configuration +// ============================ + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_EVFLAGS_OBJ_MEM +#define OS_EVFLAGS_OBJ_MEM 0 +#endif + +// Number of Event Flags objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_EVFLAGS_NUM +#define OS_EVFLAGS_NUM 1 +#endif + +// + +// + +// Mutex Configuration +// ====================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_MUTEX_OBJ_MEM +#define OS_MUTEX_OBJ_MEM 0 +#endif + +// Number of Mutex objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_MUTEX_NUM +#define OS_MUTEX_NUM 1 +#endif + +// + +// + +// Semaphore Configuration +// ========================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_SEMAPHORE_OBJ_MEM +#define OS_SEMAPHORE_OBJ_MEM 0 +#endif + +// Number of Semaphore objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_SEMAPHORE_NUM +#define OS_SEMAPHORE_NUM 1 +#endif + +// + +// + +// Memory Pool Configuration +// ============================ + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_MEMPOOL_OBJ_MEM +#define OS_MEMPOOL_OBJ_MEM 0 +#endif + +// Number of Memory Pool objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_MEMPOOL_NUM +#define OS_MEMPOOL_NUM 1 +#endif + +// Data Storage Memory size [bytes] <0-1073741824:8> +// Defines the combined data storage memory size. +// Applies to objects with system provided memory for data storage. +// Default: 0 +#ifndef OS_MEMPOOL_DATA_SIZE +#define OS_MEMPOOL_DATA_SIZE 0 +#endif + +// + +// + +// Message Queue Configuration +// ============================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_MSGQUEUE_OBJ_MEM +#define OS_MSGQUEUE_OBJ_MEM 0 +#endif + +// Number of Message Queue objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_MSGQUEUE_NUM +#define OS_MSGQUEUE_NUM 1 +#endif + +// Data Storage Memory size [bytes] <0-1073741824:8> +// Defines the combined data storage memory size. +// Applies to objects with system provided memory for data storage. +// Default: 0 +#ifndef OS_MSGQUEUE_DATA_SIZE +#define OS_MSGQUEUE_DATA_SIZE 0 +#endif + +// + +// + +// Event Recorder Configuration +// =============================== + +// Global Initialization +// Initialize Event Recorder during 'osKernelInitialize'. +#ifndef OS_EVR_INIT +#define OS_EVR_INIT 0 +#endif + +// Start recording +// Start event recording after initialization. +#ifndef OS_EVR_START +#define OS_EVR_START 1 +#endif + +// Global Event Filter Setup +// Initial recording level applied to all components. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_LEVEL +#define OS_EVR_LEVEL 0x00U +#endif + +// RTOS Event Filter Setup +// Recording levels for RTX components. +// Only applicable if events for the respective component are generated. + +// Memory Management +// Recording level for Memory Management events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MEMORY_LEVEL +#define OS_EVR_MEMORY_LEVEL 0x81U +#endif + +// Kernel +// Recording level for Kernel events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_KERNEL_LEVEL +#define OS_EVR_KERNEL_LEVEL 0x81U +#endif + +// Thread +// Recording level for Thread events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_THREAD_LEVEL +#define OS_EVR_THREAD_LEVEL 0x85U +#endif + +// Generic Wait +// Recording level for Generic Wait events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_WAIT_LEVEL +#define OS_EVR_WAIT_LEVEL 0x81U +#endif + +// Thread Flags +// Recording level for Thread Flags events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_THFLAGS_LEVEL +#define OS_EVR_THFLAGS_LEVEL 0x81U +#endif + +// Event Flags +// Recording level for Event Flags events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_EVFLAGS_LEVEL +#define OS_EVR_EVFLAGS_LEVEL 0x81U +#endif + +// Timer +// Recording level for Timer events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_TIMER_LEVEL +#define OS_EVR_TIMER_LEVEL 0x81U +#endif + +// Mutex +// Recording level for Mutex events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MUTEX_LEVEL +#define OS_EVR_MUTEX_LEVEL 0x81U +#endif + +// Semaphore +// Recording level for Semaphore events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_SEMAPHORE_LEVEL +#define OS_EVR_SEMAPHORE_LEVEL 0x81U +#endif + +// Memory Pool +// Recording level for Memory Pool events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MEMPOOL_LEVEL +#define OS_EVR_MEMPOOL_LEVEL 0x81U +#endif + +// Message Queue +// Recording level for Message Queue events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MSGQUEUE_LEVEL +#define OS_EVR_MSGQUEUE_LEVEL 0x81U +#endif + +// + +// + +// RTOS Event Generation +// Enables event generation for RTX components (requires RTX source variant). + +// Memory Management +// Enables Memory Management event generation. +#ifndef OS_EVR_MEMORY +#define OS_EVR_MEMORY 1 +#endif + +// Kernel +// Enables Kernel event generation. +#ifndef OS_EVR_KERNEL +#define OS_EVR_KERNEL 1 +#endif + +// Thread +// Enables Thread event generation. +#ifndef OS_EVR_THREAD +#define OS_EVR_THREAD 1 +#endif + +// Generic Wait +// Enables Generic Wait event generation. +#ifndef OS_EVR_WAIT +#define OS_EVR_WAIT 1 +#endif + +// Thread Flags +// Enables Thread Flags event generation. +#ifndef OS_EVR_THFLAGS +#define OS_EVR_THFLAGS 1 +#endif + +// Event Flags +// Enables Event Flags event generation. +#ifndef OS_EVR_EVFLAGS +#define OS_EVR_EVFLAGS 1 +#endif + +// Timer +// Enables Timer event generation. +#ifndef OS_EVR_TIMER +#define OS_EVR_TIMER 1 +#endif + +// Mutex +// Enables Mutex event generation. +#ifndef OS_EVR_MUTEX +#define OS_EVR_MUTEX 1 +#endif + +// Semaphore +// Enables Semaphore event generation. +#ifndef OS_EVR_SEMAPHORE +#define OS_EVR_SEMAPHORE 1 +#endif + +// Memory Pool +// Enables Memory Pool event generation. +#ifndef OS_EVR_MEMPOOL +#define OS_EVR_MEMPOOL 1 +#endif + +// Message Queue +// Enables Message Queue event generation. +#ifndef OS_EVR_MSGQUEUE +#define OS_EVR_MSGQUEUE 1 +#endif + +// + +// + +// Number of Threads which use standard C/C++ library libspace +// (when thread specific memory allocation is not used). +#if (OS_THREAD_OBJ_MEM == 0) +#ifndef OS_THREAD_LIBSPACE_NUM +#define OS_THREAD_LIBSPACE_NUM 4 +#endif +#else +#define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM +#endif + +//------------- <<< end of configuration section >>> --------------------------- + +#endif // RTX_CONFIG_H_ diff --git a/examples/sds_recorder/socket/RTE/SDS/sds_rec_config.h b/examples/sds_recorder/socket/RTE/SDS/sds_rec_config.h index 2c1a96a..0e65ec6 100644 --- a/examples/sds_recorder/socket/RTE/SDS/sds_rec_config.h +++ b/examples/sds_recorder/socket/RTE/SDS/sds_rec_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_rec_config.h * Purpose: SDS Recorder configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of recorder streams <1-31> // Default: 16 -#define SDS_REC_MAX_STREAMS 16U +#define SDS_REC_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary recorder buffer // Default: 8192 -#define SDS_REC_MAX_RECORD_SIZE 8192U +#define SDS_REC_BUF_SIZE 8192U // diff --git a/examples/sds_recorder/serial/usart/RTE/SDS/sds_rec_config.h.base@1.0.0 b/examples/sds_recorder/socket/RTE/SDS/sds_rec_config.h.base@2.0.0 similarity index 82% rename from examples/sds_recorder/serial/usart/RTE/SDS/sds_rec_config.h.base@1.0.0 rename to examples/sds_recorder/socket/RTE/SDS/sds_rec_config.h.base@2.0.0 index 2c1a96a..0e65ec6 100644 --- a/examples/sds_recorder/serial/usart/RTE/SDS/sds_rec_config.h.base@1.0.0 +++ b/examples/sds_recorder/socket/RTE/SDS/sds_rec_config.h.base@2.0.0 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_rec_config.h * Purpose: SDS Recorder configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of recorder streams <1-31> // Default: 16 -#define SDS_REC_MAX_STREAMS 16U +#define SDS_REC_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary recorder buffer // Default: 8192 -#define SDS_REC_MAX_RECORD_SIZE 8192U +#define SDS_REC_BUF_SIZE 8192U // diff --git a/examples/sds_recorder/socket/SDS_Recorder.cproject.yml b/examples/sds_recorder/socket/SDS_Recorder.cproject.yml index 4851479..bd03177 100644 --- a/examples/sds_recorder/socket/SDS_Recorder.cproject.yml +++ b/examples/sds_recorder/socket/SDS_Recorder.cproject.yml @@ -1,7 +1,9 @@ project: packs: - pack: ARM::SDS - - pack: Keil::MDK-Middleware + - pack: ARM::CMSIS@>=6.0.0 + - pack: ARM::CMSIS-RTX@>=5.8.0 + - pack: Keil::MDK-Middleware@7.17.0 connections: - connect: Demo Application @@ -15,6 +17,7 @@ project: components: - component: ARM::CMSIS:RTOS2:Keil RTX5&Source + - component: ARM::CMSIS:OS Tick - component: ARM::SDS:Buffer - component: ARM::SDS:IO:Socket - component: ARM::SDS:Recorder diff --git a/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.c b/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.c index 737078a..d21fa0a 100644 --- a/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.c +++ b/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.1.1 + * $Revision: V5.2.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration @@ -55,6 +55,9 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { case osRtxErrorClibMutex: // Standard C/C++ library mutex initialization failed break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; default: // Reserved break; diff --git a/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.c.base@5.1.1 b/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.c.base@5.1.1 deleted file mode 100644 index 737078a..0000000 --- a/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.c.base@5.1.1 +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ----------------------------------------------------------------------------- - * - * $Revision: V5.1.1 - * - * Project: CMSIS-RTOS RTX - * Title: RTX Configuration - * - * ----------------------------------------------------------------------------- - */ - -#include "cmsis_compiler.h" -#include "rtx_os.h" - -// OS Idle Thread -__WEAK __NO_RETURN void osRtxIdleThread (void *argument) { - (void)argument; - - for (;;) {} -} - -// OS Error Callback function -__WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { - (void)object_id; - - switch (code) { - case osRtxErrorStackOverflow: - // Stack overflow detected for thread (thread_id=object_id) - break; - case osRtxErrorISRQueueOverflow: - // ISR Queue overflow detected when inserting object (object_id) - break; - case osRtxErrorTimerQueueOverflow: - // User Timer Callback Queue overflow detected for timer (timer_id=object_id) - break; - case osRtxErrorClibSpace: - // Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM - break; - case osRtxErrorClibMutex: - // Standard C/C++ library mutex initialization failed - break; - default: - // Reserved - break; - } - for (;;) {} -//return 0U; -} diff --git a/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.c.base@5.2.0 b/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.c.base@5.2.0 new file mode 100644 index 0000000..d21fa0a --- /dev/null +++ b/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.c.base@5.2.0 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ----------------------------------------------------------------------------- + * + * $Revision: V5.2.0 + * + * Project: CMSIS-RTOS RTX + * Title: RTX Configuration + * + * ----------------------------------------------------------------------------- + */ + +#include "cmsis_compiler.h" +#include "rtx_os.h" + +// OS Idle Thread +__WEAK __NO_RETURN void osRtxIdleThread (void *argument) { + (void)argument; + + for (;;) {} +} + +// OS Error Callback function +__WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { + (void)object_id; + + switch (code) { + case osRtxErrorStackOverflow: + // Stack overflow detected for thread (thread_id=object_id) + break; + case osRtxErrorISRQueueOverflow: + // ISR Queue overflow detected when inserting object (object_id) + break; + case osRtxErrorTimerQueueOverflow: + // User Timer Callback Queue overflow detected for timer (timer_id=object_id) + break; + case osRtxErrorClibSpace: + // Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM + break; + case osRtxErrorClibMutex: + // Standard C/C++ library mutex initialization failed + break; + case osRtxErrorSVC: + // Invalid SVC function called (function=object_id) + break; + default: + // Reserved + break; + } + for (;;) {} +//return 0U; +} diff --git a/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.h b/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.h index 4d2f501..d9631b2 100644 --- a/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.h +++ b/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * ----------------------------------------------------------------------------- * - * $Revision: V5.5.2 + * $Revision: V5.6.0 * * Project: CMSIS-RTOS RTX * Title: RTX Configuration definitions @@ -69,6 +69,61 @@ // +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + // ISR FIFO Queue // <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries // <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries @@ -142,6 +197,20 @@ #define OS_IDLE_THREAD_TZ_MOD_ID 0 #endif +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + // Stack overrun checking // Enables stack overrun check at thread switch (requires RTX source variant). // Enabling this option increases slightly the execution time of a thread switch. @@ -156,10 +225,10 @@ #define OS_STACK_WATERMARK 0 #endif -// Processor mode for Thread execution +// Default Processor mode for Thread execution // <0=> Unprivileged mode // <1=> Privileged mode -// Default: Privileged mode +// Default: Unprivileged mode #ifndef OS_PRIVILEGE_MODE #define OS_PRIVILEGE_MODE 1 #endif @@ -211,6 +280,20 @@ #define OS_TIMER_THREAD_TZ_MOD_ID 0 #endif +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + // Timer Callback Queue entries <0-256> // Number of concurrent active timer callback functions. // May be set to 0 when timers are not used. diff --git a/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.h.base@5.5.2 b/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.h.base@5.5.2 deleted file mode 100644 index 4d2f501..0000000 --- a/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.h.base@5.5.2 +++ /dev/null @@ -1,580 +0,0 @@ -/* - * Copyright (c) 2013-2021 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ----------------------------------------------------------------------------- - * - * $Revision: V5.5.2 - * - * Project: CMSIS-RTOS RTX - * Title: RTX Configuration definitions - * - * ----------------------------------------------------------------------------- - */ - -#ifndef RTX_CONFIG_H_ -#define RTX_CONFIG_H_ - -#ifdef _RTE_ -#include "RTE_Components.h" -#ifdef RTE_RTX_CONFIG_H -#include RTE_RTX_CONFIG_H -#endif -#endif - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// System Configuration -// ======================= - -// Global Dynamic Memory size [bytes] <0-1073741824:8> -// Defines the combined global dynamic memory size. -// Default: 32768 -#ifndef OS_DYNAMIC_MEM_SIZE -#define OS_DYNAMIC_MEM_SIZE 32768 -#endif - -// Kernel Tick Frequency [Hz] <1-1000000> -// Defines base time unit for delays and timeouts. -// Default: 1000 (1ms tick) -#ifndef OS_TICK_FREQ -#define OS_TICK_FREQ 1000 -#endif - -// Round-Robin Thread switching -// Enables Round-Robin Thread switching. -#ifndef OS_ROBIN_ENABLE -#define OS_ROBIN_ENABLE 1 -#endif - -// Round-Robin Timeout <1-1000> -// Defines how many ticks a thread will execute before a thread switch. -// Default: 5 -#ifndef OS_ROBIN_TIMEOUT -#define OS_ROBIN_TIMEOUT 5 -#endif - -// - -// ISR FIFO Queue -// <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries -// <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries -// <96=> 96 entries <128=> 128 entries <196=> 196 entries <256=> 256 entries -// RTOS Functions called from ISR store requests to this buffer. -// Default: 16 entries -#ifndef OS_ISR_FIFO_QUEUE -#define OS_ISR_FIFO_QUEUE 16 -#endif - -// Object Memory usage counters -// Enables object memory usage counters (requires RTX source variant). -#ifndef OS_OBJ_MEM_USAGE -#define OS_OBJ_MEM_USAGE 0 -#endif - -// - -// Thread Configuration -// ======================= - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_THREAD_OBJ_MEM -#define OS_THREAD_OBJ_MEM 0 -#endif - -// Number of user Threads <1-1000> -// Defines maximum number of user threads that can be active at the same time. -// Applies to user threads with system provided memory for control blocks. -#ifndef OS_THREAD_NUM -#define OS_THREAD_NUM 1 -#endif - -// Number of user Threads with default Stack size <0-1000> -// Defines maximum number of user threads with default stack size. -// Applies to user threads with zero stack size specified. -#ifndef OS_THREAD_DEF_STACK_NUM -#define OS_THREAD_DEF_STACK_NUM 0 -#endif - -// Total Stack size [bytes] for user Threads with user-provided Stack size <0-1073741824:8> -// Defines the combined stack size for user threads with user-provided stack size. -// Applies to user threads with user-provided stack size and system provided memory for stack. -// Default: 0 -#ifndef OS_THREAD_USER_STACK_SIZE -#define OS_THREAD_USER_STACK_SIZE 0 -#endif - -// - -// Default Thread Stack size [bytes] <96-1073741824:8> -// Defines stack size for threads with zero stack size specified. -// Default: 3072 -#ifndef OS_STACK_SIZE -#define OS_STACK_SIZE 3072 -#endif - -// Idle Thread Stack size [bytes] <72-1073741824:8> -// Defines stack size for Idle thread. -// Default: 512 -#ifndef OS_IDLE_THREAD_STACK_SIZE -#define OS_IDLE_THREAD_STACK_SIZE 512 -#endif - -// Idle Thread TrustZone Module Identifier -// Defines TrustZone Thread Context Management Identifier. -// Applies only to cores with TrustZone technology. -// Default: 0 (not used) -#ifndef OS_IDLE_THREAD_TZ_MOD_ID -#define OS_IDLE_THREAD_TZ_MOD_ID 0 -#endif - -// Stack overrun checking -// Enables stack overrun check at thread switch (requires RTX source variant). -// Enabling this option increases slightly the execution time of a thread switch. -#ifndef OS_STACK_CHECK -#define OS_STACK_CHECK 0 -#endif - -// Stack usage watermark -// Initializes thread stack with watermark pattern for analyzing stack usage. -// Enabling this option increases significantly the execution time of thread creation. -#ifndef OS_STACK_WATERMARK -#define OS_STACK_WATERMARK 0 -#endif - -// Processor mode for Thread execution -// <0=> Unprivileged mode -// <1=> Privileged mode -// Default: Privileged mode -#ifndef OS_PRIVILEGE_MODE -#define OS_PRIVILEGE_MODE 1 -#endif - -// - -// Timer Configuration -// ====================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_TIMER_OBJ_MEM -#define OS_TIMER_OBJ_MEM 0 -#endif - -// Number of Timer objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_TIMER_NUM -#define OS_TIMER_NUM 1 -#endif - -// - -// Timer Thread Priority -// <8=> Low -// <16=> Below Normal <24=> Normal <32=> Above Normal -// <40=> High -// <48=> Realtime -// Defines priority for timer thread -// Default: High -#ifndef OS_TIMER_THREAD_PRIO -#define OS_TIMER_THREAD_PRIO 40 -#endif - -// Timer Thread Stack size [bytes] <0-1073741824:8> -// Defines stack size for Timer thread. -// May be set to 0 when timers are not used. -// Default: 512 -#ifndef OS_TIMER_THREAD_STACK_SIZE -#define OS_TIMER_THREAD_STACK_SIZE 512 -#endif - -// Timer Thread TrustZone Module Identifier -// Defines TrustZone Thread Context Management Identifier. -// Applies only to cores with TrustZone technology. -// Default: 0 (not used) -#ifndef OS_TIMER_THREAD_TZ_MOD_ID -#define OS_TIMER_THREAD_TZ_MOD_ID 0 -#endif - -// Timer Callback Queue entries <0-256> -// Number of concurrent active timer callback functions. -// May be set to 0 when timers are not used. -// Default: 4 -#ifndef OS_TIMER_CB_QUEUE -#define OS_TIMER_CB_QUEUE 4 -#endif - -// - -// Event Flags Configuration -// ============================ - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_EVFLAGS_OBJ_MEM -#define OS_EVFLAGS_OBJ_MEM 0 -#endif - -// Number of Event Flags objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_EVFLAGS_NUM -#define OS_EVFLAGS_NUM 1 -#endif - -// - -// - -// Mutex Configuration -// ====================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_MUTEX_OBJ_MEM -#define OS_MUTEX_OBJ_MEM 0 -#endif - -// Number of Mutex objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_MUTEX_NUM -#define OS_MUTEX_NUM 1 -#endif - -// - -// - -// Semaphore Configuration -// ========================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_SEMAPHORE_OBJ_MEM -#define OS_SEMAPHORE_OBJ_MEM 0 -#endif - -// Number of Semaphore objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_SEMAPHORE_NUM -#define OS_SEMAPHORE_NUM 1 -#endif - -// - -// - -// Memory Pool Configuration -// ============================ - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_MEMPOOL_OBJ_MEM -#define OS_MEMPOOL_OBJ_MEM 0 -#endif - -// Number of Memory Pool objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_MEMPOOL_NUM -#define OS_MEMPOOL_NUM 1 -#endif - -// Data Storage Memory size [bytes] <0-1073741824:8> -// Defines the combined data storage memory size. -// Applies to objects with system provided memory for data storage. -// Default: 0 -#ifndef OS_MEMPOOL_DATA_SIZE -#define OS_MEMPOOL_DATA_SIZE 0 -#endif - -// - -// - -// Message Queue Configuration -// ============================== - -// Object specific Memory allocation -// Enables object specific memory allocation. -#ifndef OS_MSGQUEUE_OBJ_MEM -#define OS_MSGQUEUE_OBJ_MEM 0 -#endif - -// Number of Message Queue objects <1-1000> -// Defines maximum number of objects that can be active at the same time. -// Applies to objects with system provided memory for control blocks. -#ifndef OS_MSGQUEUE_NUM -#define OS_MSGQUEUE_NUM 1 -#endif - -// Data Storage Memory size [bytes] <0-1073741824:8> -// Defines the combined data storage memory size. -// Applies to objects with system provided memory for data storage. -// Default: 0 -#ifndef OS_MSGQUEUE_DATA_SIZE -#define OS_MSGQUEUE_DATA_SIZE 0 -#endif - -// - -// - -// Event Recorder Configuration -// =============================== - -// Global Initialization -// Initialize Event Recorder during 'osKernelInitialize'. -#ifndef OS_EVR_INIT -#define OS_EVR_INIT 0 -#endif - -// Start recording -// Start event recording after initialization. -#ifndef OS_EVR_START -#define OS_EVR_START 1 -#endif - -// Global Event Filter Setup -// Initial recording level applied to all components. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_LEVEL -#define OS_EVR_LEVEL 0x00U -#endif - -// RTOS Event Filter Setup -// Recording levels for RTX components. -// Only applicable if events for the respective component are generated. - -// Memory Management -// Recording level for Memory Management events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MEMORY_LEVEL -#define OS_EVR_MEMORY_LEVEL 0x81U -#endif - -// Kernel -// Recording level for Kernel events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_KERNEL_LEVEL -#define OS_EVR_KERNEL_LEVEL 0x81U -#endif - -// Thread -// Recording level for Thread events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_THREAD_LEVEL -#define OS_EVR_THREAD_LEVEL 0x85U -#endif - -// Generic Wait -// Recording level for Generic Wait events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_WAIT_LEVEL -#define OS_EVR_WAIT_LEVEL 0x81U -#endif - -// Thread Flags -// Recording level for Thread Flags events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_THFLAGS_LEVEL -#define OS_EVR_THFLAGS_LEVEL 0x81U -#endif - -// Event Flags -// Recording level for Event Flags events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_EVFLAGS_LEVEL -#define OS_EVR_EVFLAGS_LEVEL 0x81U -#endif - -// Timer -// Recording level for Timer events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_TIMER_LEVEL -#define OS_EVR_TIMER_LEVEL 0x81U -#endif - -// Mutex -// Recording level for Mutex events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MUTEX_LEVEL -#define OS_EVR_MUTEX_LEVEL 0x81U -#endif - -// Semaphore -// Recording level for Semaphore events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_SEMAPHORE_LEVEL -#define OS_EVR_SEMAPHORE_LEVEL 0x81U -#endif - -// Memory Pool -// Recording level for Memory Pool events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MEMPOOL_LEVEL -#define OS_EVR_MEMPOOL_LEVEL 0x81U -#endif - -// Message Queue -// Recording level for Message Queue events. -// Error events -// API function call events -// Operation events -// Detailed operation events -// -#ifndef OS_EVR_MSGQUEUE_LEVEL -#define OS_EVR_MSGQUEUE_LEVEL 0x81U -#endif - -// - -// - -// RTOS Event Generation -// Enables event generation for RTX components (requires RTX source variant). - -// Memory Management -// Enables Memory Management event generation. -#ifndef OS_EVR_MEMORY -#define OS_EVR_MEMORY 1 -#endif - -// Kernel -// Enables Kernel event generation. -#ifndef OS_EVR_KERNEL -#define OS_EVR_KERNEL 1 -#endif - -// Thread -// Enables Thread event generation. -#ifndef OS_EVR_THREAD -#define OS_EVR_THREAD 1 -#endif - -// Generic Wait -// Enables Generic Wait event generation. -#ifndef OS_EVR_WAIT -#define OS_EVR_WAIT 1 -#endif - -// Thread Flags -// Enables Thread Flags event generation. -#ifndef OS_EVR_THFLAGS -#define OS_EVR_THFLAGS 1 -#endif - -// Event Flags -// Enables Event Flags event generation. -#ifndef OS_EVR_EVFLAGS -#define OS_EVR_EVFLAGS 1 -#endif - -// Timer -// Enables Timer event generation. -#ifndef OS_EVR_TIMER -#define OS_EVR_TIMER 1 -#endif - -// Mutex -// Enables Mutex event generation. -#ifndef OS_EVR_MUTEX -#define OS_EVR_MUTEX 1 -#endif - -// Semaphore -// Enables Semaphore event generation. -#ifndef OS_EVR_SEMAPHORE -#define OS_EVR_SEMAPHORE 1 -#endif - -// Memory Pool -// Enables Memory Pool event generation. -#ifndef OS_EVR_MEMPOOL -#define OS_EVR_MEMPOOL 1 -#endif - -// Message Queue -// Enables Message Queue event generation. -#ifndef OS_EVR_MSGQUEUE -#define OS_EVR_MSGQUEUE 1 -#endif - -// - -// - -// Number of Threads which use standard C/C++ library libspace -// (when thread specific memory allocation is not used). -#if (OS_THREAD_OBJ_MEM == 0) -#ifndef OS_THREAD_LIBSPACE_NUM -#define OS_THREAD_LIBSPACE_NUM 4 -#endif -#else -#define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM -#endif - -//------------- <<< end of configuration section >>> --------------------------- - -#endif // RTX_CONFIG_H_ diff --git a/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.h.base@5.6.0 b/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.h.base@5.6.0 new file mode 100644 index 0000000..fe0c57b --- /dev/null +++ b/examples/sds_recorder/vcom/mdk/RTE/CMSIS/RTX_Config.h.base@5.6.0 @@ -0,0 +1,663 @@ +/* + * Copyright (c) 2013-2023 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ----------------------------------------------------------------------------- + * + * $Revision: V5.6.0 + * + * Project: CMSIS-RTOS RTX + * Title: RTX Configuration definitions + * + * ----------------------------------------------------------------------------- + */ + +#ifndef RTX_CONFIG_H_ +#define RTX_CONFIG_H_ + +#ifdef _RTE_ +#include "RTE_Components.h" +#ifdef RTE_RTX_CONFIG_H +#include RTE_RTX_CONFIG_H +#endif +#endif + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// System Configuration +// ======================= + +// Global Dynamic Memory size [bytes] <0-1073741824:8> +// Defines the combined global dynamic memory size. +// Default: 32768 +#ifndef OS_DYNAMIC_MEM_SIZE +#define OS_DYNAMIC_MEM_SIZE 32768 +#endif + +// Kernel Tick Frequency [Hz] <1-1000000> +// Defines base time unit for delays and timeouts. +// Default: 1000 (1ms tick) +#ifndef OS_TICK_FREQ +#define OS_TICK_FREQ 1000 +#endif + +// Round-Robin Thread switching +// Enables Round-Robin Thread switching. +#ifndef OS_ROBIN_ENABLE +#define OS_ROBIN_ENABLE 1 +#endif + +// Round-Robin Timeout <1-1000> +// Defines how many ticks a thread will execute before a thread switch. +// Default: 5 +#ifndef OS_ROBIN_TIMEOUT +#define OS_ROBIN_TIMEOUT 5 +#endif + +// + +// Safety features (Source variant only) +// Enables FuSa related features. +// Requires RTX Source variant. +// Enables: +// - selected features from this group +// - Thread functions: osThreadProtectPrivileged +#ifndef OS_SAFETY_FEATURES +#define OS_SAFETY_FEATURES 0 +#endif + +// Safety Class +// Threads assigned to lower classes cannot modify higher class threads. +// Enables: +// - Object attributes: osSafetyClass +// - Kernel functions: osKernelProtect, osKernelDestroyClass +// - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass +#ifndef OS_SAFETY_CLASS +#define OS_SAFETY_CLASS 1 +#endif + +// MPU Protected Zone +// Access protection via MPU (Spatial isolation). +// Enables: +// - Thread attributes: osThreadZone +// - Thread functions: osThreadGetZone, osThreadTerminateZone +// - Zone Management: osZoneSetup_Callback +#ifndef OS_EXECUTION_ZONE +#define OS_EXECUTION_ZONE 1 +#endif + +// Thread Watchdog +// Watchdog alerts ensure timing for critical threads (Temporal isolation). +// Enables: +// - Thread functions: osThreadFeedWatchdog +// - Handler functions: osWatchdogAlarm_Handler +#ifndef OS_THREAD_WATCHDOG +#define OS_THREAD_WATCHDOG 1 +#endif + +// Object Pointer checking +// Check object pointer alignment and memory region. +#ifndef OS_OBJ_PTR_CHECK +#define OS_OBJ_PTR_CHECK 0 +#endif + +// SVC Function Pointer checking +// Check SVC function pointer alignment and memory region. +// User needs to define a linker execution region RTX_SVC_VENEERS +// containing input sections: rtx_*.o (.text.os.svc.veneer.*) +#ifndef OS_SVC_PTR_CHECK +#define OS_SVC_PTR_CHECK 0 +#endif + +// + +// ISR FIFO Queue +// <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries +// <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries +// <96=> 96 entries <128=> 128 entries <196=> 196 entries <256=> 256 entries +// RTOS Functions called from ISR store requests to this buffer. +// Default: 16 entries +#ifndef OS_ISR_FIFO_QUEUE +#define OS_ISR_FIFO_QUEUE 16 +#endif + +// Object Memory usage counters +// Enables object memory usage counters (requires RTX source variant). +#ifndef OS_OBJ_MEM_USAGE +#define OS_OBJ_MEM_USAGE 0 +#endif + +// + +// Thread Configuration +// ======================= + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_THREAD_OBJ_MEM +#define OS_THREAD_OBJ_MEM 0 +#endif + +// Number of user Threads <1-1000> +// Defines maximum number of user threads that can be active at the same time. +// Applies to user threads with system provided memory for control blocks. +#ifndef OS_THREAD_NUM +#define OS_THREAD_NUM 1 +#endif + +// Number of user Threads with default Stack size <0-1000> +// Defines maximum number of user threads with default stack size. +// Applies to user threads with zero stack size specified. +#ifndef OS_THREAD_DEF_STACK_NUM +#define OS_THREAD_DEF_STACK_NUM 0 +#endif + +// Total Stack size [bytes] for user Threads with user-provided Stack size <0-1073741824:8> +// Defines the combined stack size for user threads with user-provided stack size. +// Applies to user threads with user-provided stack size and system provided memory for stack. +// Default: 0 +#ifndef OS_THREAD_USER_STACK_SIZE +#define OS_THREAD_USER_STACK_SIZE 0 +#endif + +// + +// Default Thread Stack size [bytes] <96-1073741824:8> +// Defines stack size for threads with zero stack size specified. +// Default: 3072 +#ifndef OS_STACK_SIZE +#define OS_STACK_SIZE 3072 +#endif + +// Idle Thread Stack size [bytes] <72-1073741824:8> +// Defines stack size for Idle thread. +// Default: 512 +#ifndef OS_IDLE_THREAD_STACK_SIZE +#define OS_IDLE_THREAD_STACK_SIZE 512 +#endif + +// Idle Thread TrustZone Module Identifier +// Defines TrustZone Thread Context Management Identifier. +// Applies only to cores with TrustZone technology. +// Default: 0 (not used) +#ifndef OS_IDLE_THREAD_TZ_MOD_ID +#define OS_IDLE_THREAD_TZ_MOD_ID 0 +#endif + +// Idle Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_IDLE_THREAD_CLASS +#define OS_IDLE_THREAD_CLASS 0 +#endif + +// Idle Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_IDLE_THREAD_ZONE +#define OS_IDLE_THREAD_ZONE 0 +#endif + +// Stack overrun checking +// Enables stack overrun check at thread switch (requires RTX source variant). +// Enabling this option increases slightly the execution time of a thread switch. +#ifndef OS_STACK_CHECK +#define OS_STACK_CHECK 1 +#endif + +// Stack usage watermark +// Initializes thread stack with watermark pattern for analyzing stack usage. +// Enabling this option increases significantly the execution time of thread creation. +#ifndef OS_STACK_WATERMARK +#define OS_STACK_WATERMARK 0 +#endif + +// Default Processor mode for Thread execution +// <0=> Unprivileged mode +// <1=> Privileged mode +// Default: Unprivileged mode +#ifndef OS_PRIVILEGE_MODE +#define OS_PRIVILEGE_MODE 0 +#endif + +// + +// Timer Configuration +// ====================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_TIMER_OBJ_MEM +#define OS_TIMER_OBJ_MEM 0 +#endif + +// Number of Timer objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_TIMER_NUM +#define OS_TIMER_NUM 1 +#endif + +// + +// Timer Thread Priority +// <8=> Low +// <16=> Below Normal <24=> Normal <32=> Above Normal +// <40=> High +// <48=> Realtime +// Defines priority for timer thread +// Default: High +#ifndef OS_TIMER_THREAD_PRIO +#define OS_TIMER_THREAD_PRIO 40 +#endif + +// Timer Thread Stack size [bytes] <0-1073741824:8> +// Defines stack size for Timer thread. +// May be set to 0 when timers are not used. +// Default: 512 +#ifndef OS_TIMER_THREAD_STACK_SIZE +#define OS_TIMER_THREAD_STACK_SIZE 512 +#endif + +// Timer Thread TrustZone Module Identifier +// Defines TrustZone Thread Context Management Identifier. +// Applies only to cores with TrustZone technology. +// Default: 0 (not used) +#ifndef OS_TIMER_THREAD_TZ_MOD_ID +#define OS_TIMER_THREAD_TZ_MOD_ID 0 +#endif + +// Timer Thread Safety Class <0-15> +// Defines the Safety Class number. +// Default: 0 +#ifndef OS_TIMER_THREAD_CLASS +#define OS_TIMER_THREAD_CLASS 0 +#endif + +// Timer Thread Zone <0-127> +// Defines Thread Zone. +// Default: 0 +#ifndef OS_TIMER_THREAD_ZONE +#define OS_TIMER_THREAD_ZONE 0 +#endif + +// Timer Callback Queue entries <0-256> +// Number of concurrent active timer callback functions. +// May be set to 0 when timers are not used. +// Default: 4 +#ifndef OS_TIMER_CB_QUEUE +#define OS_TIMER_CB_QUEUE 4 +#endif + +// + +// Event Flags Configuration +// ============================ + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_EVFLAGS_OBJ_MEM +#define OS_EVFLAGS_OBJ_MEM 0 +#endif + +// Number of Event Flags objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_EVFLAGS_NUM +#define OS_EVFLAGS_NUM 1 +#endif + +// + +// + +// Mutex Configuration +// ====================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_MUTEX_OBJ_MEM +#define OS_MUTEX_OBJ_MEM 0 +#endif + +// Number of Mutex objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_MUTEX_NUM +#define OS_MUTEX_NUM 1 +#endif + +// + +// + +// Semaphore Configuration +// ========================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_SEMAPHORE_OBJ_MEM +#define OS_SEMAPHORE_OBJ_MEM 0 +#endif + +// Number of Semaphore objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_SEMAPHORE_NUM +#define OS_SEMAPHORE_NUM 1 +#endif + +// + +// + +// Memory Pool Configuration +// ============================ + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_MEMPOOL_OBJ_MEM +#define OS_MEMPOOL_OBJ_MEM 0 +#endif + +// Number of Memory Pool objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_MEMPOOL_NUM +#define OS_MEMPOOL_NUM 1 +#endif + +// Data Storage Memory size [bytes] <0-1073741824:8> +// Defines the combined data storage memory size. +// Applies to objects with system provided memory for data storage. +// Default: 0 +#ifndef OS_MEMPOOL_DATA_SIZE +#define OS_MEMPOOL_DATA_SIZE 0 +#endif + +// + +// + +// Message Queue Configuration +// ============================== + +// Object specific Memory allocation +// Enables object specific memory allocation. +#ifndef OS_MSGQUEUE_OBJ_MEM +#define OS_MSGQUEUE_OBJ_MEM 0 +#endif + +// Number of Message Queue objects <1-1000> +// Defines maximum number of objects that can be active at the same time. +// Applies to objects with system provided memory for control blocks. +#ifndef OS_MSGQUEUE_NUM +#define OS_MSGQUEUE_NUM 1 +#endif + +// Data Storage Memory size [bytes] <0-1073741824:8> +// Defines the combined data storage memory size. +// Applies to objects with system provided memory for data storage. +// Default: 0 +#ifndef OS_MSGQUEUE_DATA_SIZE +#define OS_MSGQUEUE_DATA_SIZE 0 +#endif + +// + +// + +// Event Recorder Configuration +// =============================== + +// Global Initialization +// Initialize Event Recorder during 'osKernelInitialize'. +#ifndef OS_EVR_INIT +#define OS_EVR_INIT 0 +#endif + +// Start recording +// Start event recording after initialization. +#ifndef OS_EVR_START +#define OS_EVR_START 1 +#endif + +// Global Event Filter Setup +// Initial recording level applied to all components. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_LEVEL +#define OS_EVR_LEVEL 0x00U +#endif + +// RTOS Event Filter Setup +// Recording levels for RTX components. +// Only applicable if events for the respective component are generated. + +// Memory Management +// Recording level for Memory Management events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MEMORY_LEVEL +#define OS_EVR_MEMORY_LEVEL 0x81U +#endif + +// Kernel +// Recording level for Kernel events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_KERNEL_LEVEL +#define OS_EVR_KERNEL_LEVEL 0x81U +#endif + +// Thread +// Recording level for Thread events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_THREAD_LEVEL +#define OS_EVR_THREAD_LEVEL 0x85U +#endif + +// Generic Wait +// Recording level for Generic Wait events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_WAIT_LEVEL +#define OS_EVR_WAIT_LEVEL 0x81U +#endif + +// Thread Flags +// Recording level for Thread Flags events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_THFLAGS_LEVEL +#define OS_EVR_THFLAGS_LEVEL 0x81U +#endif + +// Event Flags +// Recording level for Event Flags events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_EVFLAGS_LEVEL +#define OS_EVR_EVFLAGS_LEVEL 0x81U +#endif + +// Timer +// Recording level for Timer events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_TIMER_LEVEL +#define OS_EVR_TIMER_LEVEL 0x81U +#endif + +// Mutex +// Recording level for Mutex events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MUTEX_LEVEL +#define OS_EVR_MUTEX_LEVEL 0x81U +#endif + +// Semaphore +// Recording level for Semaphore events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_SEMAPHORE_LEVEL +#define OS_EVR_SEMAPHORE_LEVEL 0x81U +#endif + +// Memory Pool +// Recording level for Memory Pool events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MEMPOOL_LEVEL +#define OS_EVR_MEMPOOL_LEVEL 0x81U +#endif + +// Message Queue +// Recording level for Message Queue events. +// Error events +// API function call events +// Operation events +// Detailed operation events +// +#ifndef OS_EVR_MSGQUEUE_LEVEL +#define OS_EVR_MSGQUEUE_LEVEL 0x81U +#endif + +// + +// + +// RTOS Event Generation +// Enables event generation for RTX components (requires RTX source variant). + +// Memory Management +// Enables Memory Management event generation. +#ifndef OS_EVR_MEMORY +#define OS_EVR_MEMORY 1 +#endif + +// Kernel +// Enables Kernel event generation. +#ifndef OS_EVR_KERNEL +#define OS_EVR_KERNEL 1 +#endif + +// Thread +// Enables Thread event generation. +#ifndef OS_EVR_THREAD +#define OS_EVR_THREAD 1 +#endif + +// Generic Wait +// Enables Generic Wait event generation. +#ifndef OS_EVR_WAIT +#define OS_EVR_WAIT 1 +#endif + +// Thread Flags +// Enables Thread Flags event generation. +#ifndef OS_EVR_THFLAGS +#define OS_EVR_THFLAGS 1 +#endif + +// Event Flags +// Enables Event Flags event generation. +#ifndef OS_EVR_EVFLAGS +#define OS_EVR_EVFLAGS 1 +#endif + +// Timer +// Enables Timer event generation. +#ifndef OS_EVR_TIMER +#define OS_EVR_TIMER 1 +#endif + +// Mutex +// Enables Mutex event generation. +#ifndef OS_EVR_MUTEX +#define OS_EVR_MUTEX 1 +#endif + +// Semaphore +// Enables Semaphore event generation. +#ifndef OS_EVR_SEMAPHORE +#define OS_EVR_SEMAPHORE 1 +#endif + +// Memory Pool +// Enables Memory Pool event generation. +#ifndef OS_EVR_MEMPOOL +#define OS_EVR_MEMPOOL 1 +#endif + +// Message Queue +// Enables Message Queue event generation. +#ifndef OS_EVR_MSGQUEUE +#define OS_EVR_MSGQUEUE 1 +#endif + +// + +// + +// Number of Threads which use standard C/C++ library libspace +// (when thread specific memory allocation is not used). +#if (OS_THREAD_OBJ_MEM == 0) +#ifndef OS_THREAD_LIBSPACE_NUM +#define OS_THREAD_LIBSPACE_NUM 4 +#endif +#else +#define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM +#endif + +//------------- <<< end of configuration section >>> --------------------------- + +#endif // RTX_CONFIG_H_ diff --git a/examples/sds_recorder/vcom/mdk/RTE/SDS/sds_rec_config.h b/examples/sds_recorder/vcom/mdk/RTE/SDS/sds_rec_config.h index 2c1a96a..0e65ec6 100644 --- a/examples/sds_recorder/vcom/mdk/RTE/SDS/sds_rec_config.h +++ b/examples/sds_recorder/vcom/mdk/RTE/SDS/sds_rec_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. All rights reserved. + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ * * Name: sds_rec_config.h * Purpose: SDS Recorder configuration options - * Rev.: V1.0.0 + * Rev.: V2.0.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -26,11 +26,11 @@ // Maximum number of recorder streams <1-31> // Default: 16 -#define SDS_REC_MAX_STREAMS 16U +#define SDS_REC_MAX_STREAMS 16U -// Maximum size of a record +// Size of a temporary recorder buffer // Default: 8192 -#define SDS_REC_MAX_RECORD_SIZE 8192U +#define SDS_REC_BUF_SIZE 8192U // diff --git a/examples/sds_recorder/vcom/mdk/RTE/SDS/sds_rec_config.h.base@1.0.0 b/examples/sds_recorder/vcom/mdk/RTE/SDS/sds_rec_config.h.base@1.0.0 deleted file mode 100644 index 2c1a96a..0000000 --- a/examples/sds_recorder/vcom/mdk/RTE/SDS/sds_rec_config.h.base@1.0.0 +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2023 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Name: sds_rec_config.h - * Purpose: SDS Recorder configuration options - * Rev.: V1.0.0 - */ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// SDS Recorder - -// Maximum number of recorder streams <1-31> -// Default: 16 -#define SDS_REC_MAX_STREAMS 16U - -// Maximum size of a record -// Default: 8192 -#define SDS_REC_MAX_RECORD_SIZE 8192U - -// - -//------------- <<< end of configuration section >>> --------------------------- diff --git a/examples/sds_recorder/vcom/mdk/RTE/SDS/sds_rec_config.h.base@2.0.0 b/examples/sds_recorder/vcom/mdk/RTE/SDS/sds_rec_config.h.base@2.0.0 new file mode 100644 index 0000000..0e65ec6 --- /dev/null +++ b/examples/sds_recorder/vcom/mdk/RTE/SDS/sds_rec_config.h.base@2.0.0 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2023-2024 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Name: sds_rec_config.h + * Purpose: SDS Recorder configuration options + * Rev.: V2.0.0 + */ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// SDS Recorder + +// Maximum number of recorder streams <1-31> +// Default: 16 +#define SDS_REC_MAX_STREAMS 16U + +// Size of a temporary recorder buffer +// Default: 8192 +#define SDS_REC_BUF_SIZE 8192U + +// + +//------------- <<< end of configuration section >>> --------------------------- diff --git a/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_0.c b/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_0.c index 743aee2..210b1ff 100644 --- a/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_0.c +++ b/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_0.c @@ -1,10 +1,10 @@ /*------------------------------------------------------------------------------ * MDK Middleware - Component ::USB:Device - * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. + * Copyright (c) 2004-2023 Arm Limited (or its affiliates). All rights reserved. *------------------------------------------------------------------------------ * Name: USBD_Config_0.c * Purpose: USB Device Configuration - * Rev.: V5.2.0 + * Rev.: V5.3.0 *------------------------------------------------------------------------------ * Use the following configuration settings in the Device Class configuration * files to assign a Device Class to this USB Device 0. @@ -71,11 +71,11 @@ // Manufacturer String // String Descriptor describing Manufacturer. -#define USBD0_STR_DESC_MAN L"ARM" +#define USBD0_STR_DESC_MAN_RAW "ARM" // Product String // String Descriptor describing Product. -#define USBD0_STR_DESC_PROD L"SDS Recorder" +#define USBD0_STR_DESC_PROD_RAW "SDS Recorder" // Serial Number String // Enable Serial Number String. @@ -84,7 +84,7 @@ // Default value // Default device's Serial Number String. -#define USBD0_STR_DESC_SER L"0001A0000000" +#define USBD0_STR_DESC_SER_RAW "0001A0000000" // Maximum Length (in characters) <0-126> // Specifies the maximum number of Serial Number String characters that can be set at run-time. @@ -124,83 +124,4 @@ // -#include "RTE_Components.h" - -#ifdef RTE_USB_Device_CustomClass_0 -#include "USBD_Config_CustomClass_0.h" -#endif -#ifdef RTE_USB_Device_CustomClass_1 -#include "USBD_Config_CustomClass_1.h" -#endif -#ifdef RTE_USB_Device_CustomClass_2 -#include "USBD_Config_CustomClass_2.h" -#endif -#ifdef RTE_USB_Device_CustomClass_3 -#include "USBD_Config_CustomClass_3.h" -#endif - -#ifdef RTE_USB_Device_HID_0 -#include "USBD_Config_HID_0.h" -#endif -#ifdef RTE_USB_Device_HID_1 -#include "USBD_Config_HID_1.h" -#endif -#ifdef RTE_USB_Device_HID_2 -#include "USBD_Config_HID_2.h" -#endif -#ifdef RTE_USB_Device_HID_3 -#include "USBD_Config_HID_3.h" -#endif - -#ifdef RTE_USB_Device_MSC_0 -#include "USBD_Config_MSC_0.h" -#endif -#ifdef RTE_USB_Device_MSC_1 -#include "USBD_Config_MSC_1.h" -#endif -#ifdef RTE_USB_Device_MSC_2 -#include "USBD_Config_MSC_2.h" -#endif -#ifdef RTE_USB_Device_MSC_3 -#include "USBD_Config_MSC_3.h" -#endif - -#ifdef RTE_USB_Device_CDC_0 -#include "USBD_Config_CDC_0.h" -#endif -#ifdef RTE_USB_Device_CDC_1 -#include "USBD_Config_CDC_1.h" -#endif -#ifdef RTE_USB_Device_CDC_2 -#include "USBD_Config_CDC_2.h" -#endif -#ifdef RTE_USB_Device_CDC_3 -#include "USBD_Config_CDC_3.h" -#endif -#ifdef RTE_USB_Device_CDC_4 -#include "USBD_Config_CDC_4.h" -#endif -#ifdef RTE_USB_Device_CDC_5 -#include "USBD_Config_CDC_5.h" -#endif -#ifdef RTE_USB_Device_CDC_6 -#include "USBD_Config_CDC_6.h" -#endif -#ifdef RTE_USB_Device_CDC_7 -#include "USBD_Config_CDC_7.h" -#endif - -#ifdef RTE_USB_Device_ADC_0 -#include "USBD_Config_ADC_0.h" -#endif -#ifdef RTE_USB_Device_ADC_1 -#include "USBD_Config_ADC_1.h" -#endif -#ifdef RTE_USB_Device_ADC_2 -#include "USBD_Config_ADC_2.h" -#endif -#ifdef RTE_USB_Device_ADC_3 -#include "USBD_Config_ADC_3.h" -#endif - #include "usbd_config.h" diff --git a/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_0.c.base@5.2.0 b/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_0.c.base@5.3.0 similarity index 70% rename from examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_0.c.base@5.2.0 rename to examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_0.c.base@5.3.0 index 5c3903c..c64230c 100644 --- a/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_0.c.base@5.2.0 +++ b/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_0.c.base@5.3.0 @@ -1,10 +1,10 @@ /*------------------------------------------------------------------------------ * MDK Middleware - Component ::USB:Device - * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. + * Copyright (c) 2004-2023 Arm Limited (or its affiliates). All rights reserved. *------------------------------------------------------------------------------ * Name: USBD_Config_%Instance%.c * Purpose: USB Device Configuration - * Rev.: V5.2.0 + * Rev.: V5.3.0 *------------------------------------------------------------------------------ * Use the following configuration settings in the Device Class configuration * files to assign a Device Class to this USB Device %Instance%. @@ -71,11 +71,11 @@ // Manufacturer String // String Descriptor describing Manufacturer. -#define USBD%Instance%_STR_DESC_MAN L"Keil Software" +#define USBD%Instance%_STR_DESC_MAN_RAW "Keil Software" // Product String // String Descriptor describing Product. -#define USBD%Instance%_STR_DESC_PROD L"Keil USB Device %Instance%" +#define USBD%Instance%_STR_DESC_PROD_RAW "Keil USB Device %Instance%" // Serial Number String // Enable Serial Number String. @@ -84,7 +84,7 @@ // Default value // Default device's Serial Number String. -#define USBD%Instance%_STR_DESC_SER L"0001A0000000" +#define USBD%Instance%_STR_DESC_SER_RAW "0001A0000000" // Maximum Length (in characters) <0-126> // Specifies the maximum number of Serial Number String characters that can be set at run-time. @@ -124,83 +124,4 @@ // -#include "RTE_Components.h" - -#ifdef RTE_USB_Device_CustomClass_0 -#include "USBD_Config_CustomClass_0.h" -#endif -#ifdef RTE_USB_Device_CustomClass_1 -#include "USBD_Config_CustomClass_1.h" -#endif -#ifdef RTE_USB_Device_CustomClass_2 -#include "USBD_Config_CustomClass_2.h" -#endif -#ifdef RTE_USB_Device_CustomClass_3 -#include "USBD_Config_CustomClass_3.h" -#endif - -#ifdef RTE_USB_Device_HID_0 -#include "USBD_Config_HID_0.h" -#endif -#ifdef RTE_USB_Device_HID_1 -#include "USBD_Config_HID_1.h" -#endif -#ifdef RTE_USB_Device_HID_2 -#include "USBD_Config_HID_2.h" -#endif -#ifdef RTE_USB_Device_HID_3 -#include "USBD_Config_HID_3.h" -#endif - -#ifdef RTE_USB_Device_MSC_0 -#include "USBD_Config_MSC_0.h" -#endif -#ifdef RTE_USB_Device_MSC_1 -#include "USBD_Config_MSC_1.h" -#endif -#ifdef RTE_USB_Device_MSC_2 -#include "USBD_Config_MSC_2.h" -#endif -#ifdef RTE_USB_Device_MSC_3 -#include "USBD_Config_MSC_3.h" -#endif - -#ifdef RTE_USB_Device_CDC_0 -#include "USBD_Config_CDC_0.h" -#endif -#ifdef RTE_USB_Device_CDC_1 -#include "USBD_Config_CDC_1.h" -#endif -#ifdef RTE_USB_Device_CDC_2 -#include "USBD_Config_CDC_2.h" -#endif -#ifdef RTE_USB_Device_CDC_3 -#include "USBD_Config_CDC_3.h" -#endif -#ifdef RTE_USB_Device_CDC_4 -#include "USBD_Config_CDC_4.h" -#endif -#ifdef RTE_USB_Device_CDC_5 -#include "USBD_Config_CDC_5.h" -#endif -#ifdef RTE_USB_Device_CDC_6 -#include "USBD_Config_CDC_6.h" -#endif -#ifdef RTE_USB_Device_CDC_7 -#include "USBD_Config_CDC_7.h" -#endif - -#ifdef RTE_USB_Device_ADC_0 -#include "USBD_Config_ADC_0.h" -#endif -#ifdef RTE_USB_Device_ADC_1 -#include "USBD_Config_ADC_1.h" -#endif -#ifdef RTE_USB_Device_ADC_2 -#include "USBD_Config_ADC_2.h" -#endif -#ifdef RTE_USB_Device_ADC_3 -#include "USBD_Config_ADC_3.h" -#endif - #include "usbd_config.h" diff --git a/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_CDC_0.h b/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_CDC_0.h index a180a56..00b5775 100644 --- a/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_CDC_0.h +++ b/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_CDC_0.h @@ -1,10 +1,10 @@ /*------------------------------------------------------------------------------ * MDK Middleware - Component ::USB:Device - * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. + * Copyright (c) 2004-2023 Arm Limited (or its affiliates). All rights reserved. *------------------------------------------------------------------------------ * Name: USBD_Config_CDC_0.h * Purpose: USB Device Communication Device Class (CDC) Configuration - * Rev.: V5.2.0 + * Rev.: V5.3.0 *----------------------------------------------------------------------------*/ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -129,10 +129,10 @@ // in the USB component. // // Communication Class Interface String -#define USBD_CDC0_CIF_STR_DESC L"USB_CDC0_0" +#define USBD_CDC0_CIF_STR_DESC_RAW "USB_CDC0_0" // Data Class Interface String -#define USBD_CDC0_DIF_STR_DESC L"USB_CDC0_1" +#define USBD_CDC0_DIF_STR_DESC_RAW "USB_CDC0_1" // Abstract Control Model Settings @@ -183,7 +183,7 @@ // MAC Address String // Specifies 48-bit Ethernet MAC address. -#define USBD_CDC0_NCM_MAC_ADDRESS L"1E306CA2455E" +#define USBD_CDC0_NCM_MAC_ADDRESS_RAW "1E306CA2455E" // Ethernet Statistics // Specifies Ethernet statistic functions supported. diff --git a/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_CDC_0.h.base@5.2.0 b/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_CDC_0.h.base@5.3.0 similarity index 98% rename from examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_CDC_0.h.base@5.2.0 rename to examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_CDC_0.h.base@5.3.0 index 1d84c24..dcff851 100644 --- a/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_CDC_0.h.base@5.2.0 +++ b/examples/sds_recorder/vcom/mdk/RTE/USB/USBD_Config_CDC_0.h.base@5.3.0 @@ -1,10 +1,10 @@ /*------------------------------------------------------------------------------ * MDK Middleware - Component ::USB:Device - * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. + * Copyright (c) 2004-2023 Arm Limited (or its affiliates). All rights reserved. *------------------------------------------------------------------------------ * Name: USBD_Config_CDC_%Instance%.h * Purpose: USB Device Communication Device Class (CDC) Configuration - * Rev.: V5.2.0 + * Rev.: V5.3.0 *----------------------------------------------------------------------------*/ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -129,10 +129,10 @@ // in the USB component. // // Communication Class Interface String -#define USBD_CDC%Instance%_CIF_STR_DESC L"USB_CDC%Instance%_0" +#define USBD_CDC%Instance%_CIF_STR_DESC_RAW "USB_CDC%Instance%_0" // Data Class Interface String -#define USBD_CDC%Instance%_DIF_STR_DESC L"USB_CDC%Instance%_1" +#define USBD_CDC%Instance%_DIF_STR_DESC_RAW "USB_CDC%Instance%_1" // Abstract Control Model Settings @@ -183,7 +183,7 @@ // MAC Address String // Specifies 48-bit Ethernet MAC address. -#define USBD_CDC%Instance%_NCM_MAC_ADDRESS L"1E306CA2455E" +#define USBD_CDC%Instance%_NCM_MAC_ADDRESS_RAW "1E306CA2455E" // Ethernet Statistics // Specifies Ethernet statistic functions supported. diff --git a/examples/sds_recorder/vcom/mdk/SDS_Recorder.cproject.yml b/examples/sds_recorder/vcom/mdk/SDS_Recorder.cproject.yml index 7402aeb..992dc3e 100644 --- a/examples/sds_recorder/vcom/mdk/SDS_Recorder.cproject.yml +++ b/examples/sds_recorder/vcom/mdk/SDS_Recorder.cproject.yml @@ -1,7 +1,9 @@ project: packs: - pack: ARM::SDS - - pack: Keil::MDK-Middleware + - pack: ARM::CMSIS@>=6.0.0 + - pack: ARM::CMSIS-RTX@>=5.8.0 + - pack: Keil::MDK-Middleware@7.17.0 connections: - connect: Demo Application @@ -15,6 +17,7 @@ project: components: - component: ARM::CMSIS:RTOS2:Keil RTX5&Source + - component: ARM::CMSIS:OS Tick - component: ARM::SDS:Buffer - component: ARM::SDS:IO:VCOM&MDK USB - component: ARM::SDS:Recorder