Skip to content

Commit

Permalink
Update FreeRTOS-Kernel to v11.0.1 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirUmek committed Mar 8, 2024
1 parent 3479f7d commit 4c2983f
Show file tree
Hide file tree
Showing 737 changed files with 70,979 additions and 54,177 deletions.
10 changes: 5 additions & 5 deletions ARM.CMSIS-FreeRTOS.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@

<components>
<!-- CMSIS-RTOS FreeRTOS component -->
<component Cclass="CMSIS" Cgroup="RTOS" Csub="FreeRTOS" Cversion="10.6.2" Capiversion="1.0.0" condition="CMSIS RTOS FreeRTOS">
<component Cclass="CMSIS" Cgroup="RTOS" Csub="FreeRTOS" Cversion="11.0.1" Capiversion="1.0.0" condition="CMSIS RTOS FreeRTOS">
<description>CMSIS-RTOS implementation for Cortex-M based on FreeRTOS</description>
<RTE_Components_h>
#define RTE_CMSIS_RTOS /* CMSIS-RTOS */
Expand All @@ -942,7 +942,7 @@
</component>

<!-- CMSIS-RTOS2 FreeRTOS component -->
<component Cclass="CMSIS" Cgroup="RTOS2" Csub="FreeRTOS" Cvariant="Cortex-M" Cversion="10.6.2" Capiversion="2.2.0" condition="CMSIS RTOS2 FreeRTOS CortexM">
<component Cclass="CMSIS" Cgroup="RTOS2" Csub="FreeRTOS" Cvariant="Cortex-M" Cversion="11.0.1" Capiversion="2.2.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 @@ -959,7 +959,7 @@
</files>
</component>

<component Cclass="CMSIS" Cgroup="RTOS2" Csub="FreeRTOS" Cvariant="Cortex-A" Cversion="10.6.2" Capiversion="2.2.0" condition="CMSIS RTOS2 FreeRTOS CortexA">
<component Cclass="CMSIS" Cgroup="RTOS2" Csub="FreeRTOS" Cvariant="Cortex-A" Cversion="11.0.1" Capiversion="2.2.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 All @@ -976,9 +976,9 @@
</files>
</component>

<bundle Cbundle="FreeRTOS" Cclass="RTOS" Cversion="10.6.2">
<bundle Cbundle="FreeRTOS" Cclass="RTOS" Cversion="11.0.1">
<description>FreeRTOS Real Time Kernel</description>
<doc>https://www.freertos.org/Documentation/FreeRTOS_Reference_Manual_V10.0.0.pdf</doc>
<doc>https://www.freertos.org/RTOS.html</doc>

<component Cgroup="Core" Cvariant="Cortex-M" isDefaultVariant="true" condition="FreeRTOS Core CM">
<description>Core API (Kernel, Tasks, Semaphores, Mutexes, Queues) for Cortex-M</description>
Expand Down
69 changes: 22 additions & 47 deletions Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ cmake_minimum_required(VERSION 3.15)
# FREERTOS_PORT, if not specified and native port detected, uses the native compile.
#
# User is responsible for one library target:
# freertos_config ,typcially an INTERFACE library
# freertos_config ,typically an INTERFACE library
#
# DEPRECATED: FREERTOS_CONFIG_FILE_DIRECTORY - but still supported if no freertos_config defined for now.
# May be removed at some point in the future.
#
# User can choose which heap implementation to use (either the implementations
# included with FreeRTOS [1..5] or a custom implementation ) by providing the
# option FREERTOS_HEAP. If the option is not set, the cmake will default to
# using heap_4.c.
# included with FreeRTOS [1..5] or a custom implementation) by providing the
# option FREERTOS_HEAP. When dynamic allocation is used, the user must specify a
# heap implementation. If the option is not set, the cmake will use no heap
# implementation (e.g. when only static allocation is used).

# `freertos_config` target defines the path to FreeRTOSConfig.h and optionally other freertos based config files
if(NOT TARGET freertos_config )
Expand All @@ -37,9 +39,6 @@ if(NOT TARGET freertos_config )
endif()
endif()

# Heap number or absolute path to custom heap implementation provided by user
set(FREERTOS_HEAP "4" CACHE STRING "FreeRTOS heap model number. 1 .. 5. Or absolute path to custom heap source file")

# FreeRTOS port option
if(NOT FREERTOS_PORT)
message(WARNING " FREERTOS_PORT is not set. Please specify it from top-level CMake file (example):\n"
Expand All @@ -59,8 +58,8 @@ if(NOT FREERTOS_PORT)
" CODEWARRIOR_COLDFIRE_V2 - Compiler: CoreWarrior Target: ColdFire V2\n"
" CODEWARRIOR_HCS12 - Compiler: CoreWarrior Target: HCS12\n"
" GCC_ARM_CA9 - Compiler: GCC Target: ARM Cortex-A9\n"
" GCC_ARM_CA53_64_BIT - Compiler: GCC Target: ARM Cortex-A53 64 bit\n"
" GCC_ARM_CA53_64_BIT_SRE - Compiler: GCC Target: ARM Cortex-A53 64 bit SRE\n"
" GCC_ARM_AARCH64 - Compiler: GCC Target: ARM v8-A\n"
" GCC_ARM_AARCH64_SRE - Compiler: GCC Target: ARM v8-A SRE\n"
" GCC_ARM_CM0 - Compiler: GCC Target: ARM Cortex-M0\n"
" GCC_ARM_CM3 - Compiler: GCC Target: ARM Cortex-M3\n"
" GCC_ARM_CM3_MPU - Compiler: GCC Target: ARM Cortex-M3 with MPU\n"
Expand Down Expand Up @@ -107,6 +106,7 @@ if(NOT FREERTOS_PORT)
" GCC_PPC440_XILINX - Compiler: GCC Target: Xilinx PPC440\n"
" GCC_RISC_V - Compiler: GCC Target: RISC-V\n"
" GCC_RISC_V_PULPINO_VEGA_RV32M1RM - Compiler: GCC Target: RISC-V Pulpino Vega RV32M1RM\n"
" GCC_RISC_V_GENERIC - Compiler: GCC Target: RISC-V with FREERTOS_RISCV_EXTENSION\n"
" GCC_RL78 - Compiler: GCC Target: Renesas RL78\n"
" GCC_RX100 - Compiler: GCC Target: Renesas RX100\n"
" GCC_RX200 - Compiler: GCC Target: Renesas RX200\n"
Expand Down Expand Up @@ -157,6 +157,7 @@ if(NOT FREERTOS_PORT)
" IAR_MSP430 - Compiler: IAR Target: MSP430\n"
" IAR_MSP430X - Compiler: IAR Target: MSP430X\n"
" IAR_RISC_V - Compiler: IAR Target: RISC-V\n"
" IAR_RISC_V_GENERIC - Compiler: IAR Target: RISC-V with FREERTOS_RISCV_EXTENSION\n"
" IAR_RL78 - Compiler: IAR Target: Renesas RL78\n"
" IAR_RX100 - Compiler: IAR Target: Renesas RX100\n"
" IAR_RX600 - Compiler: IAR Target: Renesas RX600\n"
Expand Down Expand Up @@ -196,6 +197,7 @@ if(NOT FREERTOS_PORT)
" SOFTUNE_MB91460 - Compiler: Softune Target: MB91460\n"
" SOFTUNE_MB96340 - Compiler: Softune Target: MB96340\n"
" TASKING_ARM_CM4F - Compiler: Tasking Target: ARM Cortex-M4 with FPU\n"
" TEMPLATE - Compiler: HOST Target: None\n"
" CDK_THEAD_CK802 - Compiler: CDK Target: T-head CK802\n"
" XCC_XTENSA - Compiler: XCC Target: Xtensa\n"
" WIZC_PIC18 - Compiler: WizC Target: PIC18")
Expand Down Expand Up @@ -228,58 +230,31 @@ elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_
" freertos_kernel_include)")
endif()

########################################################################
# Overall Compile Options
# Note the compile option strategy is to error on everything and then
# Per library opt-out of things that are warnings/errors.
# This ensures that no matter what strategy for compilation you take, the
# builds will still occur.
#
# Only tested with GNU and Clang.
# Other options are https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html#variable:CMAKE_%3CLANG%3E_COMPILER_ID
# Naming of compilers translation map:
#
# FreeRTOS | CMake
# -------------------
# CCS | ?TBD?
# GCC | GNU, Clang, *Clang Others?
# IAR | IAR
# Keil | ARMCC
# MSVC | MSVC # Note only for MinGW?
# Renesas | ?TBD?

add_compile_options(
### Gnu/Clang C Options
$<$<COMPILE_LANG_AND_ID:C,GNU>:-fdiagnostics-color=always>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-fcolor-diagnostics>

$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wall>
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wextra>
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wpedantic>
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Werror>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Weverything>

# TODO: Add in other Compilers here.
)

add_library(freertos_kernel STATIC)

########################################################################
add_subdirectory(include)
add_subdirectory(portable)

add_library(freertos_kernel STATIC
target_sources(freertos_kernel PRIVATE
croutine.c
event_groups.c
list.c
queue.c
stream_buffer.c
tasks.c
timers.c

# If FREERTOS_HEAP is digit between 1 .. 5 - it is heap number, otherwise - it is path to custom heap source file
$<IF:$<BOOL:$<FILTER:${FREERTOS_HEAP},EXCLUDE,^[1-5]$>>,${FREERTOS_HEAP},portable/MemMang/heap_${FREERTOS_HEAP}.c>
)

if (DEFINED FREERTOS_HEAP )
# User specified a heap implementation add heap implementation to freertos_kernel.
target_sources(freertos_kernel PRIVATE
# If FREERTOS_HEAP is digit between 1 .. 5 - it is heap number, otherwise - it is path to custom heap source file
$<IF:$<BOOL:$<FILTER:${FREERTOS_HEAP},EXCLUDE,^[1-5]$>>,${FREERTOS_HEAP},portable/MemMang/heap_${FREERTOS_HEAP}.c>
)
endif()


target_link_libraries(freertos_kernel
PUBLIC
freertos_kernel_port
Expand Down
98 changes: 95 additions & 3 deletions Source/History.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,97 @@
Documentation and download available at https://www.FreeRTOS.org/

Changes between FreeRTOS V11.0.0 and FreeRTOS V11.0.1 released December 21, 2023

+ Updated the SBOM file.

Changes between FreeRTOS V10.6.2 and FreeRTOS V11.0.0 released December 18, 2023

+ SMP merged into the mainline: While FreeRTOS introduced Asymmetric
Multiprocessing (AMP) support in 2017, FreeRTOS Version 11.0.0 is the
first to merge Symmetric Multiprocessing (SMP) support into the mainline
release. SMP enables one instance of the FreeRTOS Kernel to schedule tasks
across multiple identical processor cores. We thank Mike Bruno and Jerry
McCarthy of XMOS and, Darian Liang, Sudeep Mohanty and Zim Kalinowski of
Espressif Systems for their contributions.
+ Switch MISRA compliance checking from PC Lint to Coverity, and update from
MISRA C:2004 to MISRA C:2012.
+ Add a template FreeRTOSConfig.h, inclusive of an abbreviated explanation of
each configuration item. Application writers can use this template as a
starting point to create the FreeRTOSConfig.h file for their application.
+ Add a template FreeRTOS port which can be used as a starting point for
developing a new FreeRTOS port.
+ Add bounds checking and obfuscation to internal heap block pointers in
heap_4.c and heap_5.c to help catch pointer corruptions. The application can
enable these checks by setting configENABLE_HEAP_PROTECTOR to 1 in their
FreeRTOSConfig.h. We thank @oliverlavery for their contribution.
+ Update vTaskList and vTaskGetRunTimeStats APIs to replace the use of sprintf
with snprintf.
+ Add trace macros to ports that enable tracing the interaction of ISRs with
scheduler events. We thank @conara for their contribution.
+ Add trace macros that enable tracing of entering and exiting all APIs. We
thank @Techcore123 for their contribution.
+ Add uxTaskBasePriorityGet and uxTaskBasePriorityGetFromISR APIs to get the
base priority of a task. The base priority of a task is the priority that
was last assigned to the task - which due to priority inheritance, may not
be the current priority of the task.
+ Add pdTICKS_TO_MS macro to convert time in FreeRTOS ticks to time in
milliseconds. We thank @Dazza0 for their contribution.
+ Add default implementations of vApplicationGetIdleTaskMemory and
vApplicationGetTimerTaskMemory. The application can enable these default
implementations by setting configKERNEL_PROVIDED_STATIC_MEMORY to 1 in their
FreeRTOSConfig.h. We thank @mdnr-g for their contribution.
+ Update vTaskGetInfo to include start and end of the stack whenever both
values are available. We thank @vinceburns for their contribution.
+ Prevent tasks waiting for a notification from being resumed by calls to
vTaskResume or vTaskResumeFromISR. We thank @Moral-Hao for their
contribution.
+ Add asserts to validate that the application has correctly installed
FreeRTOS handlers for PendSV and SVCall interrupts on Cortex-M devices.
We thank @jefftenney for their contribution.
+ Rename ARM_CA53_64_BIT and ARM_CA53_64_BIT_SRE ports to Arm_AARCH64 and
Arm_AARCH64_SRE respectively as these ports are applicable to all AArch64
architecture. We thank @urutva for their contribution.
+ Add CMake support to allow the application writer to select the RISC-V
chip extension. We thank @JoeBenczarski for their contribution.
+ Add CMake support to allow the application writer to build an application
with static allocation only. We thank @conara for their contribution.
+ Make taskYIELD available to unprivileged tasks for ARMv8-M ports.
+ Update Cortex-M23 ports to not use PSPLIM_NS. We thank @urutva for their
contribution.
+ Update the SysTick setup code for ARMv8-M ports to first configure the clock
source and then enable SysTick. This is needed to address a bug in QEMU
versions older than 7.0.0, which causes an emulation error if SysTick is
enabled without first selecting a valid clock source. We thank @jefftenney
for their contribution.
+ Add the port-optimized task selection algorithm optionally available for
ARMv7-M ports to the ARMv8-M ports. We thank @jefftenney for their
contribution.
+ Improve the speed of pvPortMalloc in heap_4.c and heap_5.c by removing
unnecessary steps while splitting a large memory block into two. We thank
@Moral-Hao for their contribution.
+ Shorten the critical section in pvPortMalloc in heap_2.c, heap_4.c and
heap_5.c by moving the size calculation out of the critical section. We thank
@Moral-Hao for their contribution.
+ Update xTaskNotifyWait and ulTaskNotifyTake to remove the non-deterministic
operation of traversing a linked link from a critical section. We thank
@karver8 for their contribution.
+ Fix stack end and stack size computation in POSIX port to meet the stack
alignment requirements on MacOS. We thank @tegimeki for their contribution.
+ Update the vTaskPrioritySet implementation to use the new priority when the
task has inherited priority from a mutex it is holding, and the new priority
is bigger than the inherited priority. We thank @Moral-Hao for their
contribution.
+ Add stack alignment adjustment if stack grows upwards. We thank @ivq for
their contribution.
+ Fix pxTopOfStack calculation in configINIT_TLS_BLOCK when picolib C is
selected as the C library implementation to ensure that
pxPortInitialiseStack does not overwrite the data in the TLS block portion
of the stack. We thank @bebebib-rs for their contribution.
+ Fix vPortEndScheduler() for the MSVC port so that the function
prvProcessSimulatedInterrupts is not stuck in an infinite loop when the
scheduler is stopped. We thank @Ju1He1 for their contribution.
+ Add the Pull Request (PR) Process explaining the stages a PR goes through.

Changes between FreeRTOS V10.6.1 and FreeRTOS V10.6.2 released November 29, 2023

+ Add the following improvements to the new MPU wrapper (mpu_wrappers_v2.c)
Expand All @@ -26,7 +118,7 @@ Changes between FreeRTOS V10.6.0 and FreeRTOS V10.6.1 released August 17, 2023
- Xinhui Shao, Yumeng Wei, Huaiyu Yan, Zhen Ling of School of
Computer Science and Engineering, Southeast University, China.

Changes between FreeRTOS V10.5.1 and FreeRTOS V10.6.0 released July 13, 2023
Changes between FreeRTOS V10.5.1 and FreeRTOS 10.6.0 released July 13, 2023

+ Add a new MPU wrapper that places additional restrictions on unprivileged
tasks. The following is the list of changes introduced with the new MPU
Expand Down Expand Up @@ -87,8 +179,8 @@ Changes between FreeRTOS V10.5.1 and FreeRTOS V10.6.0 released July 13, 2023
China.
- Xinwen Fu of Department of Computer Science, University of
Massachusetts Lowell, USA.
- Yuequi Chen, Zicheng Wang, Minghao Lin of University of Colorado
Boulder, USA.
- Yueqi Chen, Zicheng Wang, Minghao Lin, Jiahe Wang of University of
Colorado Boulder, USA.
+ Add Cortex-M35P port. Contributed by @urutva.
+ Add embedded extension (RV32E) support to the IAR RISC-V port.
+ Add ulTaskGetRunTimeCounter and ulTaskGetRunTimePercent APIs. Contributed by
Expand Down
Loading

0 comments on commit 4c2983f

Please sign in to comment.