Download FreeRTOS
 

Quality RTOS & Embedded Software

KERNEL
WHAT'S NEW
Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.

Upgrading to FreeRTOS V8.x.x
From FreeRTOS V7.x.x


FreeRTOS V8 is Backward Compatible with FreeRTOS V7

FreeRTOS V8.x.x is a drop-in compatible replacement for FreeRTOS V7.x, although a change to the type used to reference character strings may result in application code generating a few (easily clearable) compiler warnings after the upgrade, and an updated typedef naming convention means use of the old typedef names is now discouraged (see config configENABLE_BACKWARD_COMPATIBILITY).


New and updated in FreeRTOS V8


Introducing Event Groups (or Event Flags)

FreeRTOS V8 includes a brand new feature - Event Groups. The event groups implementation is contained in a new source file named event_groups.c. Like the existing timers.c source file, event_groups.c is optional and need only be included in the project if your application is using event groups.

Read more:


Centralised Deferred Interrupt Processing

Ideally an interrupt service routine (ISR) is kept as short as possible, but sometimes an ISR either has a lot of processing to do, or needs to perform processing that is not deterministic. Historically in these cases it was common to use a semaphore to unblock a high priority application task from the interrupt, deferring the actually processing to the application task (so called deferred interrupt processing). FreeRTOS allows the interrupt to return directly to the unblocked task to ensure the processing happenes immediately.

FreeRTOS V8 provides a centralised deferred interrupt processing mechanism - allowing deferred processing to be performed in the RTOS daemon task (formally called the timer daemon task), removing the burden of implementing deferred interrupt mechanisms from the user.

Read more:


Use of stdint.h

Other than for character pointers (see below) all standard C types have been replaced with their equivalent typedef from the stdint.h header file. For example, unsigned long has been replaced by uint32_t, short has been replaced by int16_t, etc.


Character Pointers

Character pointers are used to reference text strings, such as the name allocated to a task.

Previously, and in line with good software engineering practice, the FreeRTOS coding standard did not permit the use of char types that were not explicitly qualified as either signed or unsigned. As a result char pointers used to reference strings required casts, as did the use of any standard string handling functions. The casts ensured compiler warnings were not generated by compilers that defaulted unqualified char types to be signed or compilers that defaulted unqualified char types to be unsigned.

As it has in later MISRA standards, this rule has now been relaxed, and unqualified char types are now permitted, but only when:

  • The char is used to point to a human readable text string.
  • The char is used to hold a single ASCII character.


Trace and Visualisation

Trace functionality has been enhanced and now covers both heap usage and the new event groups feature.

Note: FreeRTOS v8.0.0 requires FreeRTOS-Plus-Trace version 2.6 or later.


New FreeRTOS Defined typedefs Names

To ensure consistency with the newer FreeRTOS-Plus software components, provide consistency with the stdint.h defined typedefs, and to accommodate multiple user requests, the names assigned to typedefs within the core FreeRTOS code have changed as per the table below. All typedefed types now end with '_t'.

NOTE: To ensure backward compatibility the old names are maintained within the code, but the use of the old names is strongly discouraged (see config configENABLE_BACKWARD_COMPATIBILITY).

Old Name New Name Description
xTaskHandle TaskHandle_t Used to reference tasks.
xQueueHandle QueueHandle_t Used to reference queues.
xSemaphoreHandle SemaphoreHandle_t Used to reference binary, counting, recursive and mutex type semaphores.
xTimerHandle TimerHandle_t Used to reference software timers.
xCoRoutineHandle CoRoutineHandle_t Used to reference co-routines.
portTickType TickType_t Used to hold tick count values
portBASE_TYPE BaseType_t Defined to the most efficient signed type for the architecture.
unsigned portBASE_TYPE UBaseType_t Defined to the most efficient unsigned type for the architecture.
xQueueSetHandle QueueSetHandle_t Used to reference a queue set.
xQueueSetMemberHandle QueueSetMemberHandle_t Used to reference a member of a queue set, which can be a queue or any of the semaphore types.
xMemoryRegion MemoryRegion_t Used with ports that support memory protection.
xTaskParameters TaskParameters_t Used with ports that support memory protection.
xTaskStatusType TaskStatus_t Used in with the uxTaskGetSystemState() function.
pdTASK_HOOK_CODE TaskHookFunction_t Used with the task tag functions (for example vTaskSetApplicationTag().
pdTASK_CODE TaskFunction_t Used with the xTaskCreate() function.
tmrTIMER_CALLBACK TimerCallbackFunction_t Used with the xTimerCreate() function.
xTimeOutType TimeOut_t For advanced users only.





Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.