diff --git a/tools/mocks/freertos/CMakeLists.txt b/tools/mocks/freertos/CMakeLists.txt index ac4c116a44..ce6111260a 100644 --- a/tools/mocks/freertos/CMakeLists.txt +++ b/tools/mocks/freertos/CMakeLists.txt @@ -14,7 +14,8 @@ set(include_dirs "${original_freertos_dir}/esp_additions/include" # Required because CMock tries to include "idf_additions.h" instead of "freertos/idf_additions.h" "${original_freertos_dir}/esp_additions/include/freertos" - "${kernel_dir}/portable/linux/include" # For "freertos/portmacro.h" + "${kernel_dir}/portable/linux/include" # For "spinlock.h" + "${kernel_dir}/portable/linux/include/freertos" # For "portmacro.h" "${kernel_dir}/include/freertos" # this is due to the way includes are generated in CMock (without freertos prefix) ) diff --git a/tools/mocks/freertos/Kconfig b/tools/mocks/freertos/Kconfig index d65bf47cc9..062e79e83b 100644 --- a/tools/mocks/freertos/Kconfig +++ b/tools/mocks/freertos/Kconfig @@ -37,4 +37,12 @@ menu "FreeRTOS" hex default 0x7FFFFFFF if !FREERTOS_SMP default 0xFFFFFFFF if FREERTOS_SMP + + config FREERTOS_UNICORE + # This invisible config ensures that ESP-IDF components are always built as single-core + # when building for CMock. CMock is currently only supported on the Linux target, and the + # Linux FreeRTOS port supports single-core only. + bool + default y + endmenu