Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRTOS/FreeRTOS-Kernel.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Helter <paulheltera@gmail.com>2022-10-24 02:46:05 +0300
committerPaul Bartell <paul.bartell@gmail.com>2022-11-18 21:29:30 +0300
commit01987eb1c55e93578501e660d1ee34f27a89ec92 (patch)
tree7e8d82637fa4d63898f1d70ae8abedcb9119db03 /README.md
parent927ad2d8e5f508946ceaecf6ef8502d1cad41e39 (diff)
Added in documentation on how to consume from a main project. Added default PORT selection for native POSIX and MINGW platforms.
Diffstat (limited to 'README.md')
-rw-r--r--README.md49
1 files changed, 47 insertions, 2 deletions
diff --git a/README.md b/README.md
index 52d78dd79..d147f8840 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,53 @@ Additionally, for FreeRTOS kernel feature information refer to the [Developer Do
### 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](https://forums.freertos.org).
-## Cloning this repository
+## 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 master #Note: Best practice to use specific git-hash or tagged version
+)
+```
+
+- 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
+)
+```
+
+- 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)
+```
+
+### Consuming stand-alone - Cloning this repository
To clone using HTTPS:
```
@@ -36,4 +82,3 @@ FreeRTOS files are formatted using the "uncrustify" tool. The configuration file
### Spelling
*lexicon.txt* contains words that are not traditionally found in an English dictionary. It is used by the spellchecker to verify the various jargon, variable names, and other odd words used in the FreeRTOS code base. If your pull request fails to pass the spelling and you believe this is a mistake, then add the word to *lexicon.txt*.
Note that only the FreeRTOS Kernel source files are checked for proper spelling, the portable section is ignored.
-