Skip to content

Commit c48d9b0

Browse files
authored
Merge branch 'main' into agent/timer-system-state
2 parents 98dcb8f + 8be86d4 commit c48d9b0

81 files changed

Lines changed: 2125 additions & 893 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

History.txt

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,140 @@
11
Documentation and download available at https://www.FreeRTOS.org/
22

3+
Changes between FreeRTOS V11.3.0 and FreeRTOS V11.3.1 released August 2026
4+
5+
+ Add Symmetric Multiprocessing (SMP) support to the Armv8-M ports for the
6+
GCC, ArmClang and IAR toolchains. This adds per core critical nesting
7+
state, spinlocks, inter-core yield and wakeup using SEV/WFE, primary and
8+
secondary core bring up synchronization, and a core safe PendSV context
9+
switch. Single core builds are unchanged. We thank @AhmedIsmail02 for
10+
their contribution.
11+
+ Add new xTaskPeriodicDelay API for periodic tasks. It supersedes
12+
xTaskDelayUntil by preventing run away of pxPreviousWakeTime, catching up
13+
skipped periods immediately while returning the number of periods skipped,
14+
and returning 0 when not enough ticks have elapsed. We thank @ntd for
15+
their contribution.
16+
+ Add uxTaskCallForEachTask API, which invokes a caller supplied callback
17+
for each task in the system, and refactor uxTaskGetSystemState to use it.
18+
We thank @DRNadler for their contribution.
19+
+ Add configIDLE_AFFINITY configuration option, which pins each Idle task to
20+
its corresponding core in SMP systems. It defaults to 0, which allows the
21+
scheduler to run Idle tasks on any available core. We thank @rus084 for
22+
their contribution.
23+
+ Add validation to SecureContext_AllocateContext in the ARMv8-M secure side
24+
ports to ensure that the requested secure stack size plus the stack seal
25+
size does not overflow before allocating. We thank Jordan Mecom (Block,
26+
Inc.) for reporting this issue.
27+
+ Add assertions to vQueueDelete to check that no tasks are blocked on the
28+
queue being deleted.
29+
+ Add a link to the FreeRTOS Kernel threat model in SECURITY.md.
30+
+ Add documentation clarifying that the MemoryRegion_t ulParameters macros
31+
are port specific, so applications must use the tskMPU_REGION_* or
32+
portMPU_REGION_* values that match their MPU port. We thank @Old-Ding for
33+
their contribution.
34+
+ Add a comment documenting that a privileged task must revoke access
35+
permissions before deleting a kernel object when using Access Control
36+
Lists.
37+
+ Update the ARM_CRx_No_GIC port to declare vPortYield as a weak symbol so
38+
that devices with a dedicated software interrupt register can substitute
39+
their own yield trigger. The default behavior is unchanged. We thank
40+
@maximdeclercq for their contribution.
41+
+ Update the FreeRTOSConfig.h template to use a 32-bit tick type, which
42+
avoids compiler warnings on Windows where a 64-bit tick resolves to
43+
unsigned long long.
44+
+ Update the deprecated CMake configuration warning to use INTERFACE rather
45+
than PUBLIC for the freertos_config interface library. We thank @Isla-jq
46+
for their contribution.
47+
+ Fix vPortFreeSecureContext in the ARMv8-M ports to read xSecureContext at
48+
the correct offset. When the MPU is enabled, the first item in the TCB is
49+
the stored context location rather than the top of stack, so
50+
xSecureContext is located at a negative offset from that position.
51+
+ Fix SecureContext_AllocateContext in the ARMv8-M secure side ports to
52+
reject a secure stack size smaller than the stack seal size.
53+
+ Fix SecureContext_FreeContext in the ARMv8-M secure side ports to refuse
54+
to free the secure context that is currently loaded, as indicated by
55+
PSPLIM. Freeing it left the running task referencing freed secure memory.
56+
The task handle supplied by the non-secure side is untrusted, so it is
57+
now used only as an additional ownership check.
58+
+ Fix the ARMv8-M ports to service the portSVC_START_SCHEDULER and
59+
portSVC_FREE_SECURE_CONTEXT supervisor calls only when they are raised
60+
from privileged code. When the MPU is enabled, both requests are now
61+
ignored unless the calling program counter lies within the privileged
62+
functions section.
63+
+ Fix a type confusion in xQueueAddToSet by verifying that the object
64+
passed as the queue set really is a queue set, that is, that its item
65+
size is sizeof( Queue_t * ). Passing an ordinary queue now returns
66+
pdFAIL rather than allowing prvNotifyQueueSetContainer to copy item size
67+
bytes from a single pointer on the stack.
68+
+ Fix xTimerGenericCommandFromTask to validate the lower bound of
69+
xCommandID in addition to the existing upper bound, so that only the
70+
valid task command range from tmrCOMMAND_START_DONT_TRACE to
71+
tmrCOMMAND_DELETE is accepted. Rejected commands return pdFAIL, and
72+
behavior for valid commands and for xTimerGenericCommandFromISR is
73+
unchanged.
74+
+ Fix a kernel object pool entry leak by adding an MPU wrapper for the
75+
xTimerDelete API, so that the pool index is freed when a timer is deleted
76+
with MPU wrappers version 2.
77+
+ Fix the MPU wrapper macro mapping for the ARMv8-M ports.
78+
+ Fix silently failing critical sections in unprivileged tasks by
79+
disallowing configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS with MPU wrappers
80+
version 2 in the ARMv7-M MPU ports. The option now defaults to 0 under
81+
version 2, and explicitly setting it to 1 raises a compile time error.
82+
Behavior with MPU wrappers version 1 is unchanged.
83+
+ Fix a time of check to time of use race condition in vTaskListTasks, where
84+
reading the volatile task count twice allowed a task to be created between
85+
the reads, resulting in an undersized allocation and a possible buffer
86+
overflow in uxTaskGetSystemState. We thank @srpatcha for their
87+
contribution.
88+
+ Fix a spurious heap_5 assertion when configENABLE_HEAP_PROTECTOR is 1 and
89+
an allocation cannot be satisfied. The free block search reaching the end
90+
marker is a normal out of memory condition, so pvPortMalloc now returns
91+
NULL and invokes the malloc failed hook instead of asserting.
92+
+ Fix batching stream buffers to unblock a receiver only after the buffered
93+
byte count exceeds, rather than reaches, the trigger level. Previously a
94+
receiver could be woken early and xStreamBufferReceive could return 0
95+
bytes. Stream buffer and message buffer semantics are unchanged. We thank
96+
@officialasishkumar for their contribution.
97+
+ Fix MISRA C 2012 Rule 20.4 violation by replacing `#define static` with a
98+
STATIC macro, which also keeps the static variables in
99+
vApplicationGetIdleTaskMemory and vApplicationGetPassiveIdleTaskMemory
100+
static when portREMOVE_STATIC_QUALIFIER is defined. We thank @elsonwei for
101+
their contribution.
102+
+ Fix undefined behavior in the MSVC-MingW port caused by left shifting a
103+
signed int by 31 or more bits.
104+
+ Fix a duplicate Doxygen \defgroup identifier by giving
105+
uxTaskBasePriorityGet its own group instead of reusing the
106+
uxTaskPriorityGet group.
107+
+ Fix the incorrect #endif comment after vPortSetupTimerInterrupt in the GCC
108+
and IAR RISC-V ports, which duplicated configMTIME_BASE_ADDRESS and
109+
omitted configMTIMECMP_BASE_ADDRESS. We thank @cuiweixie for their
110+
contribution.
111+
+ Fix incorrect #endif comments in croutine.c and queue.c, which reversed
112+
the configUSE_CO_ROUTINES condition and named the wrong configuration
113+
option for configSUPPORT_DYNAMIC_ALLOCATION. We thank @Zepp-Hanzj for
114+
their contribution.
115+
+ Fix the configLIST_VOLATILE #endif comment and the documented parameter
116+
names for uxListRemove in include/list.h. We thank @rakeshr-source for
117+
their contribution.
118+
+ Fix the type and timeout values used in the xStreamBufferSend and
119+
xMessageBufferSend documentation examples. We thank @Isla-jq for their
120+
contribution.
121+
+ Fix copy and paste comment typos in xTaskGetApplicationTaskTag and
122+
xTaskGetApplicationTaskTagFromISR, and a typo in the
123+
xTaskGenericNotifyWait comment. We thank @wanghengZzz for their
124+
contributions.
125+
+ Fix comment typos in the queue.h, list.h and task.h documentation,
126+
including the xQueueReceiveFromISR and xQueueGenericSend examples, the
127+
listGET_ITEM_VALUE_OF_HEAD_ENTRY \page tag, and the uxIndexToCLear typo.
128+
We thank @zepp-chen for their contribution.
129+
+ Fix the FreeRTOSConfig.h template path referenced in README.md. We thank
130+
@IClementI for their contribution.
131+
+ Fix the missing V prefix in the release_tag and namespace-prefix inputs of
132+
the auto release workflow.
133+
+ Fix long path failures in the Windows kernel demo builds by enabling
134+
Windows long path support in CI.
135+
+ Remove an unnecessary const variable from the GCC and IAR RISC-V ports. We
136+
thank @IClementI for their contribution.
137+
3138
Changes between FreeRTOS V11.2.0 and FreeRTOS V11.3.0 released March 2026
4139

5140
+ Correct minor mistakes in code comments in event_groups.c, include/queue.h,

examples/template_configuration/FreeRTOSConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@
577577
/* Defines the kernel provided implementation of
578578
* vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory()
579579
* to provide the memory that is used by the Idle task and Timer task
580-
* respectively. The application can provide it's own implementation of
580+
* respectively. The application can provide its own implementation of
581581
* vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory() by
582582
* setting configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. */
583583
#define configKERNEL_PROVIDED_STATIC_MEMORY 1

include/FreeRTOS.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,6 +1786,14 @@
17861786
#define traceRETURN_vTaskDelete()
17871787
#endif
17881788

1789+
#ifndef traceENTER_xTaskPeriodicDelay
1790+
#define traceENTER_xTaskPeriodicDelay( pxPreviousWakeTime, xTimeIncrement )
1791+
#endif
1792+
1793+
#ifndef traceRETURN_xTaskPeriodicDelay
1794+
#define traceRETURN_xTaskPeriodicDelay( xIncrements )
1795+
#endif
1796+
17891797
#ifndef traceENTER_xTaskDelayUntil
17901798
#define traceENTER_xTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement )
17911799
#endif

include/croutine.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ void vCoRoutineSchedule( void );
528528
* functions used by tasks.
529529
*
530530
* crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() can only be used to
531-
* pass data between a co-routine and and ISR, whereas xQueueSendFromISR() and
531+
* pass data between a co-routine and ISR, whereas xQueueSendFromISR() and
532532
* xQueueReceiveFromISR() can only be used to pass data between a task and and
533533
* ISR.
534534
*
@@ -628,7 +628,7 @@ void vCoRoutineSchedule( void );
628628
* functions used by tasks.
629629
*
630630
* crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() can only be used to
631-
* pass data between a co-routine and and ISR, whereas xQueueSendFromISR() and
631+
* pass data between a co-routine and ISR, whereas xQueueSendFromISR() and
632632
* xQueueReceiveFromISR() can only be used to pass data between a task and and
633633
* ISR.
634634
*

include/list.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* heavily for the schedulers needs, it is also available for use by
3232
* application code.
3333
*
34-
* list_ts can only store pointers to list_item_ts. Each ListItem_t contains a
34+
* List_t can only store pointers to ListItem_t. Each ListItem_t contains a
3535
* numeric value (xItemValue). Most of the time the lists are sorted in
3636
* ascending item value order.
3737
*
@@ -42,7 +42,7 @@
4242
* is because the tail contains a wrap back pointer to the true head of
4343
* the list.
4444
*
45-
* In addition to it's value, each list item contains a pointer to the next
45+
* In addition to its value, each list item contains a pointer to the next
4646
* item in the list (pxNext), a pointer to the list it is in (pxContainer)
4747
* and a pointer back to the object that contains it. These later two
4848
* pointers are included for efficiency of list manipulation. There is
@@ -74,7 +74,7 @@
7474
* compiler's options were set for maximum optimisation has been inspected and
7575
* deemed to be as intended. That said, as compiler technology advances, and
7676
* especially if aggressive cross module optimisation is used (a use case that
77-
* has not been exercised to any great extend) then it is feasible that the
77+
* has not been exercised to any great extent) then it is feasible that the
7878
* volatile qualifier will be needed for correct optimisation. It is expected
7979
* that a compiler removing essential code because, without the volatile
8080
* qualifier on the list structure members and with aggressive cross module
@@ -219,7 +219,7 @@ typedef struct xLIST
219219
* Access macro to retrieve the value of the list item at the head of a given
220220
* list.
221221
*
222-
* \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE
222+
* \page listGET_ITEM_VALUE_OF_HEAD_ENTRY listGET_ITEM_VALUE_OF_HEAD_ENTRY
223223
* \ingroup LinkedList
224224
*/
225225
#define listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext->xItemValue )

include/mpu_wrappers.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,17 @@
286286

287287
#else /* portUSING_MPU_WRAPPERS */
288288

289-
#define PRIVILEGED_FUNCTION
290-
#define PRIVILEGED_DATA
291-
#define FREERTOS_SYSTEM_CALL
289+
#ifndef PRIVILEGED_FUNCTION
290+
#define PRIVILEGED_FUNCTION
291+
#endif
292+
293+
#ifndef PRIVILEGED_DATA
294+
#define PRIVILEGED_DATA
295+
#endif
296+
297+
#ifndef FREERTOS_SYSTEM_CALL
298+
#define FREERTOS_SYSTEM_CALL
299+
#endif
292300

293301
#endif /* portUSING_MPU_WRAPPERS */
294302

include/queue.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
/**
4646
* Type by which queues are referenced. For example, a call to xQueueCreate()
47-
* returns an QueueHandle_t variable that can then be used as a parameter to
47+
* returns a QueueHandle_t variable that can then be used as a parameter to
4848
* xQueueSend(), xQueueReceive(), etc.
4949
*/
5050
struct QueueDefinition; /* Using old naming convention so as not to break kernel aware debuggers. */
@@ -60,7 +60,7 @@ typedef struct QueueDefinition * QueueSetHandle_t;
6060
/**
6161
* Queue sets can contain both queues and semaphores, so the
6262
* QueueSetMemberHandle_t is defined as a type to be used where a parameter or
63-
* return value can be either an QueueHandle_t or an SemaphoreHandle_t.
63+
* return value can be either a QueueHandle_t or a SemaphoreHandle_t.
6464
*/
6565
typedef struct QueueDefinition * QueueSetMemberHandle_t;
6666

@@ -185,7 +185,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
185185
* @param pucQueueStorage If uxItemSize is not zero then
186186
* pucQueueStorage must point to a uint8_t array that is at least large
187187
* enough to hold the maximum number of items that can be in the queue at any
188-
* one time - which is ( uxQueueLength * uxItemsSize ) bytes. If uxItemSize is
188+
* one time - which is ( uxQueueLength * uxItemSize ) bytes. If uxItemSize is
189189
* zero then pucQueueStorage can be NULL.
190190
*
191191
* @param pxQueueBuffer Must point to a variable of type StaticQueue_t, which
@@ -604,7 +604,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
604604
* BaseType_t xQueueGenericSend(
605605
* QueueHandle_t xQueue,
606606
* const void * pvItemToQueue,
607-
* TickType_t xTicksToWait
607+
* TickType_t xTicksToWait,
608608
* BaseType_t xCopyPosition
609609
* );
610610
* @endcode
@@ -1189,7 +1189,7 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
11891189
*
11901190
* // ...
11911191
*
1192-
* if( xHigherPrioritytaskWoken == pdTRUE )
1192+
* if( xHigherPriorityTaskWoken == pdTRUE )
11931193
* {
11941194
* // Writing to the queue caused a task to unblock and the unblocked task
11951195
* // has a priority higher than or equal to the priority of the currently
@@ -1451,7 +1451,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
14511451
* // task will be woken.
14521452
* }
14531453
*
1454-
* if( xHigherPrioritytaskWoken == pdTRUE );
1454+
* if( xHigherPriorityTaskWoken == pdTRUE )
14551455
* {
14561456
* // As xHigherPriorityTaskWoken is now set to pdTRUE then a context
14571457
* // switch should be requested. The macro used is port specific and
@@ -1664,7 +1664,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
16641664
* Note 2: Blocking on a queue set that contains a mutex will not cause the
16651665
* mutex holder to inherit the priority of the blocked task.
16661666
*
1667-
* Note 3: An additional 4 bytes of RAM is required for each space in a every
1667+
* Note 3: An additional 4 bytes of RAM is required for each space in every
16681668
* queue added to a queue set. Therefore counting semaphores that have a high
16691669
* maximum count value should not be added to a queue set.
16701670
*
@@ -1716,7 +1716,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
17161716
* Note 2: Blocking on a queue set that contains a mutex will not cause the
17171717
* mutex holder to inherit the priority of the blocked task.
17181718
*
1719-
* Note 3: An additional 4 bytes of RAM is required for each space in a every
1719+
* Note 3: An additional 4 bytes of RAM is required for each space in every
17201720
* queue added to a queue set. Therefore counting semaphores that have a high
17211721
* maximum count value should not be added to a queue set.
17221722
*
@@ -1767,7 +1767,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
17671767
* a call to xQueueSelectFromSet() has first returned a handle to that set member.
17681768
*
17691769
* @param xQueueOrSemaphore The handle of the queue or semaphore being added to
1770-
* the queue set (cast to an QueueSetMemberHandle_t type).
1770+
* the queue set (cast to a QueueSetMemberHandle_t type).
17711771
*
17721772
* @param xQueueSet The handle of the queue set to which the queue or semaphore
17731773
* is being added.
@@ -1790,7 +1790,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
17901790
* function.
17911791
*
17921792
* @param xQueueOrSemaphore The handle of the queue or semaphore being removed
1793-
* from the queue set (cast to an QueueSetMemberHandle_t type).
1793+
* from the queue set (cast to a QueueSetMemberHandle_t type).
17941794
*
17951795
* @param xQueueSet The handle of the queue set in which the queue or semaphore
17961796
* is included.
@@ -1836,7 +1836,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
18361836
* a QueueSetMemberHandle_t type) contained in the queue set that contains data,
18371837
* or the handle of a semaphore (cast to a QueueSetMemberHandle_t type) contained
18381838
* in the queue set that is available, or NULL if no such queue or semaphore
1839-
* exists before before the specified block time expires.
1839+
* exists before the specified block time expires.
18401840
*/
18411841
#if ( configUSE_QUEUE_SETS == 1 )
18421842
QueueSetMemberHandle_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet,

0 commit comments

Comments
 (0)