From f76194add9115a0309f5d98c66322d9f5ea218fa Mon Sep 17 00:00:00 2001 From: Darian Leung Date: Wed, 10 May 2023 16:30:58 +0800 Subject: [PATCH] freertos(IDF): Add hidden build option for V10.5.1 kernel This commit adds a "CONFIG_FREERTOS_USE_KERNEL_10_5_1" hidden option to enable building of the v10.5.1 kernel for development/testing purposes. Currently enabling this option will just cause CMake to error out. Also added a markdown file to record the code changes made to the V10.5.1 source when porting over SMP behavior. --- components/freertos/CMakeLists.txt | 6 +++++- .../freertos/FreeRTOS-Kernel-V10.5.1/idf_changes.md | 7 +++++++ components/freertos/Kconfig | 8 ++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 components/freertos/FreeRTOS-Kernel-V10.5.1/idf_changes.md diff --git a/components/freertos/CMakeLists.txt b/components/freertos/CMakeLists.txt index c87a32141b..a37c39a346 100644 --- a/components/freertos/CMakeLists.txt +++ b/components/freertos/CMakeLists.txt @@ -31,7 +31,11 @@ idf_build_get_property(target IDF_TARGET) if(CONFIG_FREERTOS_SMP) set(kernel_impl "FreeRTOS-Kernel-SMP") else() - set(kernel_impl "FreeRTOS-Kernel") + if(CONFIG_FREERTOS_USE_KERNEL_10_5_1) + message(FATAL_ERROR "FreeRTOS v10.5.1 is not buildable yet. Still under development") + else() + set(kernel_impl "FreeRTOS-Kernel") + endif() endif() if(CONFIG_IDF_TARGET_ARCH_XTENSA) diff --git a/components/freertos/FreeRTOS-Kernel-V10.5.1/idf_changes.md b/components/freertos/FreeRTOS-Kernel-V10.5.1/idf_changes.md new file mode 100644 index 0000000000..3e1b6cd799 --- /dev/null +++ b/components/freertos/FreeRTOS-Kernel-V10.5.1/idf_changes.md @@ -0,0 +1,7 @@ +# ESP-IDF Changes + +This document is used to track all changes made the to FreeRTOS V10.5.1 source code when adding dual core SMP support or IDF additional features. + +## License Headers + +- Added `SPDX-FileCopyrightText` and `SPDX-FileContributor` tags to all files to pass ESP-IDF pre-commit checks. \ No newline at end of file diff --git a/components/freertos/Kconfig b/components/freertos/Kconfig index 41f9a78adb..f1830ba46e 100644 --- a/components/freertos/Kconfig +++ b/components/freertos/Kconfig @@ -3,8 +3,16 @@ menu "FreeRTOS" menu "Kernel" # Upstream FreeRTOS configurations go here + config FREERTOS_USE_KERNEL_10_5_1 + bool "Use v10.5.1 Kernel (EXPERIMENTAL)" + depends on IDF_EXPERIMENTAL_FEATURES + default n + help + Hidden option for development/testing purposes to enable building with the v10.5.1 kernel + config FREERTOS_SMP bool "Run the Amazon SMP FreeRTOS kernel instead (FEATURE UNDER DEVELOPMENT)" + depends on !FREERTOS_USE_KERNEL_10_5_1 default "n" help Amazon has released an SMP version of the FreeRTOS Kernel which can be found via the following link: