Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ARM.CMSIS-FreeRTOS.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<release version="11.2.1-dev">
Active Development ...
- Add CMSIS-RTOS2 Blinky reference application
- Correct osThreadNew to also handle osThreadPrivileged attribute
- Correct osKernelGetInfo() to properly return the kernel version number
- Correct osMessageQueueGetSpace to use uxQueueMessagesWaitingFromISR when in ISR
- Use ulTaskNotifyValueClear to implement osThreadFlagsClear
Expand Down Expand Up @@ -878,7 +879,7 @@

<components>
<!-- CMSIS-RTOS2 FreeRTOS component -->
<component Cclass="CMSIS" Cgroup="RTOS2" Csub="FreeRTOS" Cvariant="Cortex-M" Cversion="11.2.1" Capiversion="2.3.0" condition="CMSIS RTOS2 FreeRTOS CortexM">
<component Cclass="CMSIS" Cgroup="RTOS2" Csub="FreeRTOS" Cvariant="Cortex-M" Cversion="11.2.2" Capiversion="2.3.0" condition="CMSIS RTOS2 FreeRTOS CortexM">
<description>CMSIS-RTOS2 implementation for Cortex-M based on FreeRTOS</description>
<RTE_Components_h>
#define RTE_CMSIS_RTOS2 /* CMSIS-RTOS2 */
Expand All @@ -892,7 +893,7 @@
</files>
</component>

<component Cclass="CMSIS" Cgroup="RTOS2" Csub="FreeRTOS" Cvariant="Cortex-A" Cversion="11.2.1" Capiversion="2.3.0" condition="CMSIS RTOS2 FreeRTOS CortexA">
<component Cclass="CMSIS" Cgroup="RTOS2" Csub="FreeRTOS" Cvariant="Cortex-A" Cversion="11.2.2" Capiversion="2.3.0" condition="CMSIS RTOS2 FreeRTOS CortexA">
<description>CMSIS-RTOS2 implementation for Cortex-A based on FreeRTOS</description>
<RTE_Components_h>
#define RTE_CMSIS_RTOS2 /* CMSIS-RTOS2 */
Expand Down
5 changes: 5 additions & 0 deletions CMSIS/RTOS2/FreeRTOS/Source/cmsis_os2.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,11 @@ osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAtt
return (NULL);
}

if ((attr->attr_bits & osThreadPrivileged) == osThreadPrivileged) {
/* Set privilege bit to create a privileged task */
prio |= portPRIVILEGE_BIT;
}

if (attr->stack_size > 0U) {
/* In FreeRTOS stack is not in bytes, but in sizeof(StackType_t) which is 4 on ARM ports. */
/* Stack size should be therefore 4 byte aligned in order to avoid division caused side effects */
Expand Down
Loading