1## Overview 2 3This directory provides an SMP FreeRTOS-Kernel port that can be used with the Raspberry Pi Pico SDK. It supports: 4 5 * Simple CMake INTERFACE libraries, to provide the FreeRTOS-Kernel and also the individual allocator types, without copying code into the user's project. 6 * Running the FreeRTOS-Kernel and tasks on either core 0 or core 1, or both. 7 * Use of SDK synchronization primitives (such as mutexes, semaphores, queues from pico_sync) between FreeRTOS tasks and code executing on a non FreeRTOS core, or in IRQ handlers. 8 9Note that whilst this SMP version can be run on just a single (either) core, it is probably 10more efficient to use the non SMP version in the main FreeRTOS-Kernel branch in that case. 11 12## Using this port 13 14You can copy [FreeRTOS_Kernel_import.cmake](FreeRTOS_Kernel_import.cmake) into your project, and 15add the following in your `CMakeLists.txt`: 16 17```cmake 18include(FreeRTOS_Kernel_import.cmake) 19``` 20 21This will locate the FreeRTOS kernel if it is a direct sub-module of your project, or if you provide the 22`FREERTOS_KERNEL_PATH` variable in your environment or via `-DFREERTOS_KERNEL_PATH=/path/to/FreeRTOS-Kernel` on the CMake command line. 23 24**NOTE:** If you are using version 1.3.1 or older of the Raspberry Pi Pico SDK then this line must appear before the 25`pico_sdk_init()` and will cause FreeRTOS to be included/required in all RP2040 targets in your project. After this SDK 26version, you can include the FreeRTOS-Kernel support later in your CMake build (possibly in a subdirectory) and the 27FreeRTOS-Kernel support will only apply to those targets which explicitly include FreeRTOS support. 28 29As an alternative to the `import` statement above, you can just add this directory directly via thw following (with 30the same placement restrictions related to the Raspberry Pi Pico SDK version above): 31 32```cmake 33add_subdirectory(path/to/this/directory FreeRTOS-Kernel) 34``` 35 36 37## Advanced Configuration 38 39Some additional `config` options are defined [here](include/rp2040_config.h) which control some low level implementation details. 40 41## Known Limitations 42 43- Tickless idle has not currently been tested, and is likely non-functional 44