From 7b8d0a0cf24ea7185f31f9414fa6d5b10d38ed4f Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Mon, 19 Jan 2026 15:46:02 +0800 Subject: [PATCH 1/2] test(freertos): enable tests for esp32-s31 --- components/esp_system/test_apps/.build-test-rules.yml | 4 +--- .../esp_system/test_apps/esp_system_unity_tests/README.md | 4 ++-- components/freertos/Kconfig | 3 ++- components/freertos/test_apps/.build-test-rules.yml | 8 +------- .../test_apps/build_tests/freertos_build_test/README.md | 4 ++-- components/freertos/test_apps/freertos/README.md | 4 ++-- .../kernel/tasks/test_vTaskSuspendAll_xTaskResumeAll.c | 2 ++ 7 files changed, 12 insertions(+), 17 deletions(-) diff --git a/components/esp_system/test_apps/.build-test-rules.yml b/components/esp_system/test_apps/.build-test-rules.yml index bada4394fb..b2cf5b58a5 100644 --- a/components/esp_system/test_apps/.build-test-rules.yml +++ b/components/esp_system/test_apps/.build-test-rules.yml @@ -8,9 +8,7 @@ components/esp_system/test_apps/esp_system_unity_tests: disable: - if: (CONFIG_NAME == "psram" and SOC_SPIRAM_SUPPORTED != 1) - if: (CONFIG_NAME == "psram_with_pd_top" and (SOC_SPIRAM_SUPPORTED != 1 or SOC_PM_SUPPORT_TOP_PD != 1)) - - if: IDF_TARGET == "esp32s31" - temporary: true - reason: cannot pass build because of pm not supported yet # TODO: [ESP32S31] IDF-14648 + - if: (CONFIG_NAME == "pd_vddsdio" and (SOC_LIGHT_SLEEP_SUPPORTED != 1)) components/esp_system/test_apps/linux_apis: enable: diff --git a/components/esp_system/test_apps/esp_system_unity_tests/README.md b/components/esp_system/test_apps/esp_system_unity_tests/README.md index 44f3780f1d..d76348d52c 100644 --- a/components/esp_system/test_apps/esp_system_unity_tests/README.md +++ b/components/esp_system/test_apps/esp_system_unity_tests/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | --------- | diff --git a/components/freertos/Kconfig b/components/freertos/Kconfig index aaa7369195..cff15aab55 100644 --- a/components/freertos/Kconfig +++ b/components/freertos/Kconfig @@ -6,7 +6,8 @@ menu "FreeRTOS" config FREERTOS_SMP bool "Run the Amazon SMP FreeRTOS kernel instead (FEATURE UNDER DEVELOPMENT)" - depends on !IDF_TARGET_ESP32P4 && !IDF_TARGET_ESP32H4 #TODO: IDF-8113: Enable P4/H4 support on AMZ SMP + # TODO: IDF-8113: Enable P4/H4/S31 support on AMZ SMP + depends on !IDF_TARGET_ESP32P4 && !IDF_TARGET_ESP32H4 && !IDF_TARGET_ESP32S31 default "n" help Amazon has released an SMP version of the FreeRTOS Kernel which can be found via the following link: diff --git a/components/freertos/test_apps/.build-test-rules.yml b/components/freertos/test_apps/.build-test-rules.yml index 28b6c6cb91..021f5de58f 100644 --- a/components/freertos/test_apps/.build-test-rules.yml +++ b/components/freertos/test_apps/.build-test-rules.yml @@ -3,9 +3,6 @@ components/freertos/test_apps/build_tests/freertos_build_test: disable: - if: CONFIG_NAME == "timers_disabled" and IDF_TARGET != "esp32" - - if: IDF_TARGET in ["esp32s31"] - temporary: true - reason: not support yet, smp build failed # TODO: [ESP32S31] IDF-14685 depends_components: - freertos - esp_system # trigger on changes to idle / tick hooks, wdt, entry point to freertos code @@ -20,12 +17,9 @@ components/freertos/test_apps/build_tests/orig_inc_path: components/freertos/test_apps/freertos: disable: - - if: CONFIG_NAME == "smp" and IDF_TARGET in ["esp32p4"] + - if: CONFIG_NAME == "smp" and IDF_TARGET in ["esp32p4", "esp32s31"] temporary: true reason: target(s) not supported yet - - if: IDF_TARGET in ["esp32s31"] - temporary: true - reason: not support yet # TODO: [ESP32S31] IDF-14685 - if: CONFIG_NAME == "psram" and SOC_SPIRAM_SUPPORTED != 1 depends_components: - freertos diff --git a/components/freertos/test_apps/build_tests/freertos_build_test/README.md b/components/freertos/test_apps/build_tests/freertos_build_test/README.md index 4dc5fc5657..8189528f2d 100644 --- a/components/freertos/test_apps/build_tests/freertos_build_test/README.md +++ b/components/freertos/test_apps/build_tests/freertos_build_test/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | --------- | This project tests building with different FreeRTOS configurations. diff --git a/components/freertos/test_apps/freertos/README.md b/components/freertos/test_apps/freertos/README.md index 31c1c55afe..7c099eae5a 100644 --- a/components/freertos/test_apps/freertos/README.md +++ b/components/freertos/test_apps/freertos/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | --------- | diff --git a/components/freertos/test_apps/freertos/kernel/tasks/test_vTaskSuspendAll_xTaskResumeAll.c b/components/freertos/test_apps/freertos/kernel/tasks/test_vTaskSuspendAll_xTaskResumeAll.c index 609fe2e55f..ff395898c2 100644 --- a/components/freertos/test_apps/freertos/kernel/tasks/test_vTaskSuspendAll_xTaskResumeAll.c +++ b/components/freertos/test_apps/freertos/kernel/tasks/test_vTaskSuspendAll_xTaskResumeAll.c @@ -730,6 +730,7 @@ static void test_susp_task(void *arg) vTaskSuspend(NULL); } +#if SOC_GPTIMER_SUPPORTED TEST_CASE("Test xTaskSuspendAll on all cores pends all tasks and xTaskResumeAll on all cores resumes all tasks", "[freertos]") { volatile bool has_run[TEST_PENDED_NUM_BLOCKED_TASKS]; @@ -786,6 +787,7 @@ TEST_CASE("Test xTaskSuspendAll on all cores pends all tasks and xTaskResumeAll vTaskDelete(susp_task); vSemaphoreDelete(done_sem); } +#endif //SOC_GPTIMER_SUPPORTED #endif // !CONFIG_FREERTOS_UNICORE /* --------------------------------------------------------------------------------------------------------------------- From c9cf1b2fe5472f99db636453598cd12da88da919 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Wed, 21 Jan 2026 15:42:32 +0800 Subject: [PATCH 2/2] fix(freertos): limit the experimental support of FREERTOS_SMP to esp32 --- Kconfig | 1 + components/freertos/Kconfig | 5 ++--- components/freertos/test_apps/.build-test-rules.yml | 3 ++- docs/en/api-reference/system/freertos.rst | 2 +- docs/zh_CN/api-reference/system/freertos.rst | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Kconfig b/Kconfig index 1785114112..f7213f8082 100644 --- a/Kconfig +++ b/Kconfig @@ -159,6 +159,7 @@ mainmenu "Espressif IoT Development Framework Configuration" config IDF_TARGET_LINUX bool default "y" if IDF_TARGET="linux" + select FREERTOS_UNICORE config IDF_FIRMWARE_CHIP_ID hex diff --git a/components/freertos/Kconfig b/components/freertos/Kconfig index cff15aab55..92498e83df 100644 --- a/components/freertos/Kconfig +++ b/components/freertos/Kconfig @@ -6,8 +6,8 @@ menu "FreeRTOS" config FREERTOS_SMP bool "Run the Amazon SMP FreeRTOS kernel instead (FEATURE UNDER DEVELOPMENT)" - # TODO: IDF-8113: Enable P4/H4/S31 support on AMZ SMP - depends on !IDF_TARGET_ESP32P4 && !IDF_TARGET_ESP32H4 && !IDF_TARGET_ESP32S31 + # TODO: IDF-8113: Enable support on all targets + depends on IDF_TARGET_ESP32 default "n" help Amazon has released an SMP version of the FreeRTOS Kernel which can be found via the following link: @@ -24,7 +24,6 @@ menu "FreeRTOS" config FREERTOS_UNICORE # Todo: Replace with CONFIG_NUMBER_OF_CORES (IDF-9156) bool "Run FreeRTOS only on first core" - default "y" if IDF_TARGET_ESP32S2 || IDF_TARGET_LINUX select ESP_SYSTEM_SINGLE_CORE_MODE help This version of FreeRTOS normally takes control of all cores of the CPU. Select this if you only want diff --git a/components/freertos/test_apps/.build-test-rules.yml b/components/freertos/test_apps/.build-test-rules.yml index 021f5de58f..e4beec33e3 100644 --- a/components/freertos/test_apps/.build-test-rules.yml +++ b/components/freertos/test_apps/.build-test-rules.yml @@ -3,6 +3,7 @@ components/freertos/test_apps/build_tests/freertos_build_test: disable: - if: CONFIG_NAME == "timers_disabled" and IDF_TARGET != "esp32" + - if: CONFIG_NAME == "smp" and IDF_TARGET not in ["esp32"] depends_components: - freertos - esp_system # trigger on changes to idle / tick hooks, wdt, entry point to freertos code @@ -17,7 +18,7 @@ components/freertos/test_apps/build_tests/orig_inc_path: components/freertos/test_apps/freertos: disable: - - if: CONFIG_NAME == "smp" and IDF_TARGET in ["esp32p4", "esp32s31"] + - if: CONFIG_NAME == "smp" and IDF_TARGET not in ["esp32"] temporary: true reason: target(s) not supported yet - if: CONFIG_NAME == "psram" and SOC_SPIRAM_SUPPORTED != 1 diff --git a/docs/en/api-reference/system/freertos.rst b/docs/en/api-reference/system/freertos.rst index bfba0cdcd0..61ecb7cf10 100644 --- a/docs/en/api-reference/system/freertos.rst +++ b/docs/en/api-reference/system/freertos.rst @@ -31,7 +31,7 @@ ESP-IDF FreeRTOS is a FreeRTOS implementation based on Vanilla FreeRTOS v10.5.1, Amazon SMP FreeRTOS ^^^^^^^^^^^^^^^^^^^ - Amazon SMP FreeRTOS is an SMP implementation of FreeRTOS that is officially supported by Amazon. Amazon SMP FreeRTOS is able to support N-cores (i.e., more than two cores). Amazon SMP FreeRTOS can be enabled via the :ref:`CONFIG_FREERTOS_SMP` option. For more details regarding Amazon SMP FreeRTOS, please refer to the `official Amazon SMP FreeRTOS documentation `_. + Amazon SMP FreeRTOS is an SMP implementation of FreeRTOS that is officially supported by Amazon. Amazon SMP FreeRTOS is able to support N-cores (i.e., more than two cores). Amazon SMP FreeRTOS can be enabled via the ``CONFIG_FREERTOS_SMP`` option (only available on ESP32). For more details regarding Amazon SMP FreeRTOS, please refer to the `official Amazon SMP FreeRTOS documentation `_. .. warning:: diff --git a/docs/zh_CN/api-reference/system/freertos.rst b/docs/zh_CN/api-reference/system/freertos.rst index f74e348588..b6b62e08af 100644 --- a/docs/zh_CN/api-reference/system/freertos.rst +++ b/docs/zh_CN/api-reference/system/freertos.rst @@ -31,7 +31,7 @@ ESP-IDF FreeRTOS Amazon SMP FreeRTOS ^^^^^^^^^^^^^^^^^^^ - Amazon SMP FreeRTOS 是由 Amazon 官方支持的 FreeRTOS SMP 实现。Amazon SMP FreeRTOS 能够支持 N 核,即双核以上。通过 :ref:`CONFIG_FREERTOS_SMP` 选项能够启用 Amazon SMP FreeRTOS。关于 Amazon SMP FreeRTOS 的更多细节,请参考 `官方 Amazon SMP FreeRTOS 文档 `__。 + Amazon SMP FreeRTOS 是由 Amazon 官方支持的 FreeRTOS SMP 实现。Amazon SMP FreeRTOS 能够支持 N 核,即双核以上。通过 ``CONFIG_FREERTOS_SMP`` 选项能够启用 Amazon SMP FreeRTOS(仅适用于 ESP32)。关于 Amazon SMP FreeRTOS 的更多细节,请参考 `官方 Amazon SMP FreeRTOS 文档 `__。 .. warning::