Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

earlephilhower/FreeRTOS-Kernel

Repository files navigation

CMock Unit Testscodecov

Getting started

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.

Getting help

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.

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'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 tofreertos_config:
target_compile_definitions(freertos_configINTERFACE${definitions})target_compile_options(freertos_configINTERFACE${options})

Consuming stand-alone - Cloning this repository

To clone using HTTPS:

git clone https://github.com/FreeRTOS/FreeRTOS-Kernel.git

Using SSH:

git clone git@github.com:FreeRTOS/FreeRTOS-Kernel.git

Repository structure

  • The 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./portable directory contains the files that are specific to a particular microcontroller and/or compiler.See the readme file in the./portable directory for more information.

  • The./include directory contains the real time kernel header files.

  • The./template_configuration directory contains a sampleFreeRTOSConfig.h to help jumpstart a new project.See theFreeRTOSConfig.h file for instructions.

Code Formatting

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.

Line Endings

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 true

Git History Optimizations

Some 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-revs

Spelling and Formatting

We 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.

Third Party Tools

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

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C90.4%
  • Assembly9.0%
  • Other0.6%

[8]ページ先頭

©2009-2025 Movatter.jp