- Notifications
You must be signed in to change notification settings - Fork1
FreeRTOS kernel files only, submoduled intohttps://github.com/FreeRTOS/FreeRTOS and various other repos.
License
earlephilhower/FreeRTOS-Kernel
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains FreeRTOS kernel source/header files and kernelports only. This repository is referenced as a submodule inFreeRTOS/FreeRTOSrepository, which contains pre-configured demo application projects underFreeRTOS/Demo directory.
The easiest way to use FreeRTOS is to start with one of the pre-configured demoapplication projects. That way you will have the correct FreeRTOS source filesincluded, and the correct include paths configured. Once a demo application isbuilding and executing you can remove the demo application files, and start toadd in your own application source files. See theFreeRTOS Kernel Quick Start Guidefor detailed instructions and other useful links.
Additionally, for FreeRTOS kernel feature information refer to theDeveloper Documentation,andAPI Reference.
Also for contributing and creating a Pull Request please refer tothe instructions here.
FreeRTOS-Kernel V11.1.0source code is partof theFreeRTOS 202406.00 LTSrelease.
If you have any questions or need assistance troubleshooting your FreeRTOS project,we have an active community that can help on theFreeRTOS Community Support Forum.
If using CMake, it is recommended to use this repository using FetchContent.Add the following into your project's main or a subdirectory'sCMakeLists.txt:
- Define the source and version/tag you want to use:
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:
git submodule add https://github.com/FreeRTOS/FreeRTOS-Kernel.git<path of the submodule>git submodule update --init
- Add a freertos_config library (typically an INTERFACE library) The following assumes the directory structure:
include/FreeRTOSConfig.h
add_library(freertos_configINTERFACE)target_include_directories(freertos_configSYSTEMINTERFACE include)target_compile_definitions(freertos_configINTERFACE projCOVERAGE_TEST=0)
In case you installed FreeRTOS-Kernel as a submodule, you will have to add it as a subdirectory:
add_subdirectory(${FREERTOS_PATH})
- Configure the FreeRTOS-Kernel and make it available
- this particular example supports a native and cross-compiled build option.
set( FREERTOS_HEAP"4"CACHESTRING"" FORCE)# Select the native compile PORTset( FREERTOS_PORT"GCC_POSIX"CACHESTRING"" FORCE)# Select the cross-compile PORTif (CMAKE_CROSSCOMPILING) set(FREERTOS_PORT"GCC_ARM_CA9"CACHESTRING"" FORCE)endif()FetchContent_MakeAvailable(freertos_kernel)
- In case of cross compilation, you should also add the following to
freertos_config:
target_compile_definitions(freertos_configINTERFACE${definitions})target_compile_options(freertos_configINTERFACE${options})
To clone using HTTPS:
git clone https://github.com/FreeRTOS/FreeRTOS-Kernel.gitUsing SSH:
git clone git@github.com:FreeRTOS/FreeRTOS-Kernel.gitThe root of this repository contains the three files that are common toevery port - list.c, queue.c and tasks.c. The kernel is contained within thesethree files. croutine.c implements the optional co-routine functionality - whichis normally only used on very memory limited systems.
The
./portabledirectory contains the files that are specific to a particular microcontroller and/or compiler.See the readme file in the./portabledirectory for more information.The
./includedirectory contains the real time kernel header files.The
./template_configurationdirectory contains a sampleFreeRTOSConfig.hto help jumpstart a new project.See theFreeRTOSConfig.h file for instructions.
FreeRTOS files are formatted using the"uncrustify" tool.The configuration file used by uncrustify can be found in theFreeRTOS/CI-CD-GitHub-Actions'suncrustify.cfgfile.
File checked into the FreeRTOS-Kernel repository use unix-style LF line endingsfor the best compatibility with git.
For optimal compatibility with Microsoft Windows tools, it is best to enablethe git autocrlf feature. You can enable this setting for the currentrepository using the following command:
git config core.autocrlf trueSome commits in this repository perform large refactors which touch many linesand lead to unwanted behavior when using thegit blame command. You canconfigure git to ignore the list of large refactor commits in this repositorywith the following command:
git config blame.ignoreRevsFile .git-blame-ignore-revsWe recommend usingVisual Studio Code,commonly referred to as VSCode, when working on the FreeRTOS-Kernel.The FreeRTOS-Kernel also usescSpell as part of itsspelling check. The config file for which can be found atcspell.config.yamlThere is additionally acSpell plugin for VSCodethat can be used as well..cSpellWords.txt contains words that are nottraditionally found in an English dictionary. It is used by the spellcheckerto verify the various jargon, variable names, and other odd words used in theFreeRTOS code base are correct. If your pull request fails to pass the spellingand you believe this is a mistake, then add the word to.cSpellWords.txt. When adding a word pleasethen sort the list, which can be done by running the bash command:sort -u .cSpellWords.txt -o .cSpellWords.txtNote that only the FreeRTOS-Kernel Source Files,include,portable/MemMang, andportable/Commonfiles are checked for proper spelling, and formatting at this time.
Visitthis link for detailed information aboutthird-party tools with FreeRTOS support.
About
FreeRTOS kernel files only, submoduled intohttps://github.com/FreeRTOS/FreeRTOS and various other repos.
Resources
License
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- C90.4%
- Assembly9.0%
- Other0.6%