* Adding in ability to support a library for freertos_config and a custom freertos_kernel_port (#558) * Using single name definition for libraries everywhere. (#558) * Supporting backwards compatibility with FREERTOS_CONFIG_FILE_DIRECTORY (#571) * Removing compiler warnings for GNU and Clang. (#571) * Added in documentation on how to consume from a main project. Added default PORT selection for native POSIX and MINGW platforms. * Only adding freertos_config if it exists. Removing auto generation of it from a FREERTOS_CONFIG_FILE_DIRECTORY. * Fixing clang and gnu compiler warnings. * Adding in project information and how to compile for GNU/clang * Fixing compiler issue with unused variable - no need to declare variable. * Adding in compile warnings for linux builds that kernel is okay with using. * Fixing more extra-semi-stmt clang warnings. * Moving definition of hooks into header files if features are enabled. * Fixing formatting with uncrustify. * Fixing merge conflicts with main merge. * Fixing compiler errors due to merge issues and formatting. * Fixing Line feeds. * Adding 'portNORETURN' into portmacros.h. Other Updates based on PR request * Further clean-up of clang and clang-tidy issues. * Removing compiler specific pragmas from common c files. * Fixing missing lexicon entry and uncrustify formatting changes. * Resolving merge issue multiple defnitions of proto for prvIdleTask * Fixing formatting issues that are not covered by uncrustify. Use clang-tidy instead if you want this level of control. * More uncrustify formatting issues. * Fixing extra bracket in #if statement. --------- Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> |
2 years ago | |
---|---|---|
.. | ||
include | 2 years ago | |
.gitignore | 4 years ago | |
CMakeLists.txt | 2 years ago | |
FreeRTOS_Kernel_import.cmake | 2 years ago | |
LICENSE.md | 4 years ago | |
README.md | 2 years ago | |
idle_task_static_memory.c | 4 years ago | |
library.cmake | 2 years ago | |
pico_sdk_import.cmake | 4 years ago | |
port.c | 2 years ago |
README.md
Overview
This directory provides a FreeRTOS-Kernel port that can be used with the Raspberry Pi Pico SDK. It supports:
- Simple CMake INTERFACE libraries, to provide the FreeRTOS-Kernel and also the individual allocator types, without copying code into the user's project.
- Running the FreeRTOS-Kernel and tasks on either core 0 or core 1
- Use of SDK synchronization primitives (such as mutexes, semaphores, queues from pico_sync) between FreeRTOS tasks and code executing on the other core, or in IRQ handlers.
Note that a FreeRTOS SMP version of this port is also available in the FreeRTOS-Kernel smp branch, which additionally supports utilizing both RP2040 CPU cores for FreeRTOS tasks simultaneously.
Using this port
You can copy FreeRTOS-Kernel-import.cmake into your project, and
add the following in your CMakeLists.txt
:
include(FreeRTOS_Kernel_import.cmake)
This will locate the FreeRTOS kernel if it is a direct sub-module of your project, or if you provide the
FREERTOS_KERNEL_PATH
variable in your environment or via -DFREERTOS_KERNEL_PATH=/path/to/FreeRTOS-Kernel
on the CMake command line.
NOTE: If you are using version 1.3.1 or older of the Raspberry Pi Pico SDK then this line must appear before the
pico_sdk_init()
and will cause FreeRTOS to be included/required in all RP2040 targets in your project. After this SDK
version, you can include the FreeRTOS-Kernel support later in your CMake build (possibly in a subdirectory) and the
FreeRTOS-Kernel support will only apply to those targets which explicitly include FreeRTOS support.
As an alternative to the import
statement above, you can just add this directory directly via thw following (with
the same placement restrictions related to the Raspberry Pi Pico SDK version above):
add_subdirectory(path/to/this/directory FreeRTOS-Kernel)
Advanced Configuration
Some additional config
options are defined here which control some low level implementation details.
Known Limitations
- Tickless idle has not currently been tested, and is likely non-functional