FreeRTOS /FreeRTOS-Kernel

FreeRTOS kernel files only, submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos.

★ 4,658⑂ 1,656👁 113⑃ 1,218● 319▤ 23
CMITCreated 2019-09-09www.FreeRTOS.org
下载:V11.3.3V11.3.3 ↓11.3.32026-10-30
+4
日增长
4,658
stars
1,656
forks
113
watchers
1,218
prs
319
issues
23
releases

README

Getting started

This repository contains FreeRTOS kernel source/header files and kernel
ports only. This repository is referenced as a submodule in
FreeRTOS/FreeRTOS
repository, which contains pre-configured demo application projects under
FreeRTOS/Demo directory.

The easiest way to use FreeRTOS is to start with one of the pre-configured demo
application projects.  That way you will have the correct FreeRTOS source files
included, and the correct include paths configured. Once a demo application is
building and executing you can remove the demo application files, and start to
add in your own application source files.  See the
FreeRTOS Kernel Quick Start Guide
for detailed instructions and other useful links.

Additionally, for FreeRTOS kernel feature information refer to the
Developer Documentation,
and API Reference.

Also for contributing and creating a Pull Request please refer to
the instructions here.

FreeRTOS-Kernel V11.1.0
source code is part
of the
FreeRTOS 202406.00 LTS
release.

 Getting help

If you have any questions or need assistance troubleshooting your FreeRTOS project,
we have an active community that can help on the
FreeRTOS Community Support Forum.

 To consume FreeRTOS-Kernel

 Consume with CMake

If using CMake, it is recommended to use this repository using FetchContent.
Add the following into your project's main or a subdirectory's CMakeLists.txt:

- Define the source and version/tag you want to use:

cmake
FetchContent_Declare( freertos_kernel
  GIT_REPOSITORY https://github.com/FreeRTOS/FreeRTOS-Kernel.git
  GIT_TAG        main Note: Best practice to use specific git-hash or tagged version
)


In case you prefer to add it as a git submodule, do:

bash
git submodule add https://github.com/FreeRTOS/FreeRTOS-Kernel.git 
git submodule update --init


- Add a freertos_config library (typically an INTERFACE library) The following assumes the directory structure:
  - include/FreeRTOSConfig.h

cmake
add_library(freertos_config INTERFACE)

target_include_directories(freertos_config SYSTEM
INTERFACE
    include
)

target_compile_definitions(freertos_config
  INTERFACE
    projCOVERAGE_TEST=0
)


In case you installed FreeRTOS-Kernel as a submodule, you will have to add it as a subdirectory:

cmake
add_subdirectory(${FREERTOS_PATH})


- Configure the FreeRTOS-Kernel and make it available
  - this particular example supports a native and cross-compiled build option.

cmake
set( FREERTOS_HEAP "4" CACHE STRING "" FORCE)
 Select the native compile PORT
set( FREERTOS_PORT "GCC_POSIX" CACHE STRING "" FORCE)
 Select the cross-compile PORT
if (CMAKE_CROSSCOMPILING)
  set(FREERTOS_PORT "GCC_ARM_CA9" CACHE STRING "" FORCE)
endif()

FetchContent_MakeAvailable(freertos_kernel)


- In case of cross compilation, you should also add the following to freertos_config:

cmake
target_compile_definitions(freertos_config INTERFACE ${definitions})
target_compile_options(freertos_config INTERFACE ${options})


 Consuming stand-alone - Cloning this repo

Top issues

Latest release

V11.3.3 V11.3.3 2026-10-30
Contains source code for the FreeRTOS Kernel.

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON