From 0744f4d5a56be43a060ae2cb1ff9d72a91d5a663 Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Tue, 8 Nov 2022 14:45:34 +0100 Subject: [PATCH] freertos: Removed CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION kconfig option This commit removes the unused FreeRTOS kconfig option CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION. --- .../portable/riscv/include/freertos/portmacro.h | 8 -------- .../portable/riscv/include/freertos/portmacro.h | 8 -------- .../portable/xtensa/include/freertos/portmacro.h | 8 -------- components/freertos/Kconfig | 8 -------- docs/en/api-reference/system/freertos.rst | 2 -- .../coex/gattc_gatts_coex/sdkconfig.defaults.esp32c3 | 1 - .../coex/gattc_gatts_coex/sdkconfig.defaults.esp32s3 | 1 - .../coex/gattc_gatts_coex/sdkconfig.defauts.esp32 | 1 - examples/bluetooth/blufi/sdkconfig.defaults.esp32 | 1 - examples/bluetooth/blufi/sdkconfig.defaults.esp32c3 | 1 - examples/bluetooth/blufi/sdkconfig.defaults.esp32s3 | 1 - 11 files changed, 40 deletions(-) diff --git a/components/freertos/FreeRTOS-Kernel-SMP/portable/riscv/include/freertos/portmacro.h b/components/freertos/FreeRTOS-Kernel-SMP/portable/riscv/include/freertos/portmacro.h index bce9f42258d..3c79da605de 100644 --- a/components/freertos/FreeRTOS-Kernel-SMP/portable/riscv/include/freertos/portmacro.h +++ b/components/freertos/FreeRTOS-Kernel-SMP/portable/riscv/include/freertos/portmacro.h @@ -310,14 +310,6 @@ extern volatile BaseType_t xPortSwitchFlag; #define os_task_switch_is_pended(_cpu_) (false) #endif -// --------------------- Debugging ------------------------- - -#if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION -#define UNTESTED_FUNCTION() do{ esp_rom_printf("Untested FreeRTOS function %s\r\n", __FUNCTION__); configASSERT(false); } while(0) -#else -#define UNTESTED_FUNCTION() -#endif - // --------------- Compatibility Includes ------------------ /* ESP-IDF currently does not have a "Include what you use" policy. A lot of files implicitly pull in API through diff --git a/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h b/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h index 65110e7e2cc..102e869f28b 100644 --- a/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h +++ b/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h @@ -477,14 +477,6 @@ extern int xPortSwitchFlag; #define os_task_switch_is_pended(_cpu_) (false) #endif -// --------------------- Debugging ------------------------- - -#if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION -#define UNTESTED_FUNCTION() do{ esp_rom_printf("Untested FreeRTOS function %s\r\n", __FUNCTION__); configASSERT(false); } while(0) -#else -#define UNTESTED_FUNCTION() -#endif - #ifdef __cplusplus } #endif diff --git a/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h b/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h index 06b52e908e4..b42816ebda2 100644 --- a/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h +++ b/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h @@ -715,14 +715,6 @@ extern volatile uint32_t port_switch_flag[portNUM_PROCESSORS]; #define os_task_switch_is_pended(_cpu_) (false) #endif -// --------------------- Debugging ------------------------- - -#if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION -#define UNTESTED_FUNCTION() do{ esp_rom_printf("Untested FreeRTOS function %s\r\n", __FUNCTION__); configASSERT(false); } while(0) -#else -#define UNTESTED_FUNCTION() -#endif - #ifdef __cplusplus } #endif diff --git a/components/freertos/Kconfig b/components/freertos/Kconfig index 0f3f2d7fa61..9d316693a43 100644 --- a/components/freertos/Kconfig +++ b/components/freertos/Kconfig @@ -458,14 +458,6 @@ menu "FreeRTOS" If enabled, context of port*_CRITICAL calls (ISR or Non-ISR) would be checked to be in compliance with Vanilla FreeRTOS. e.g Calling port*_CRITICAL from ISR context would cause assert failure - config FREERTOS_ASSERT_ON_UNTESTED_FUNCTION - # Todo: Check if we still need this (IDF-4986) - bool "Halt when an SMP-untested function is called" - default y - help - Some functions in FreeRTOS have not been thoroughly tested yet when moving to the SMP implementation of - FreeRTOS. When this option is enabled, these functions will throw an ``assert()``. - config FREERTOS_ENABLE_TASK_SNAPSHOT bool "Enable task snapshot functions" default y diff --git a/docs/en/api-reference/system/freertos.rst b/docs/en/api-reference/system/freertos.rst index df349c57f57..8adcd04690a 100644 --- a/docs/en/api-reference/system/freertos.rst +++ b/docs/en/api-reference/system/freertos.rst @@ -21,8 +21,6 @@ ESP-IDF FreeRTOS can be configured in the project configuration menu (``idf.py m - :ref:`CONFIG_FREERTOS_UNICORE` will run ESP-IDF FreeRTOS only on CPU0. Note that this is **not equivalent to running Vanilla FreeRTOS**. Futhermore, this option may affect behavior of components other than :component:`freertos`. For more details regarding the effects of running ESP-IDF FreeRTOS on a single core, refer to :ref:`freertos-smp-single-core`. Alternatively, users can also search for occurrences of ``CONFIG_FREERTOS_UNICORE`` in the ESP-IDF components. -- :ref:`CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION` will trigger a halt in functions in ESP-IDF FreeRTOS that have not been fully tested in an SMP context. - - :ref:`CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER` will enclose all task functions within a wrapper function. In the case that a task function mistakenly returns (i.e. does not call :cpp:func:`vTaskDelete`), the call flow will return to the wrapper function. The wrapper function will then log an error and abort the application, as illustrated below:: E (25) FreeRTOS: FreeRTOS task should not return. Aborting now! diff --git a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defaults.esp32c3 b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defaults.esp32c3 index 2798d6a1ed3..dc2e6dcd270 100644 --- a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defaults.esp32c3 +++ b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defaults.esp32c3 @@ -687,7 +687,6 @@ CONFIG_FREERTOS_CORETIMER_0=y # CONFIG_FREERTOS_CORETIMER_1 is not set CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y CONFIG_FREERTOS_HZ=100 -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y diff --git a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defaults.esp32s3 b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defaults.esp32s3 index c7d91fb218c..00b0861d6dc 100644 --- a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defaults.esp32s3 +++ b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defaults.esp32s3 @@ -815,7 +815,6 @@ CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF CONFIG_FREERTOS_CORETIMER_0=y # CONFIG_FREERTOS_CORETIMER_1 is not set CONFIG_FREERTOS_HZ=100 -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y diff --git a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defauts.esp32 b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defauts.esp32 index bb3720bd3a8..88988924493 100644 --- a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defauts.esp32 +++ b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/sdkconfig.defauts.esp32 @@ -721,7 +721,6 @@ CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF CONFIG_FREERTOS_CORETIMER_0=y # CONFIG_FREERTOS_CORETIMER_1 is not set CONFIG_FREERTOS_HZ=100 -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y diff --git a/examples/bluetooth/blufi/sdkconfig.defaults.esp32 b/examples/bluetooth/blufi/sdkconfig.defaults.esp32 index b3d689927dc..b73a7f52dda 100644 --- a/examples/bluetooth/blufi/sdkconfig.defaults.esp32 +++ b/examples/bluetooth/blufi/sdkconfig.defaults.esp32 @@ -707,7 +707,6 @@ CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF CONFIG_FREERTOS_CORETIMER_0=y # CONFIG_FREERTOS_CORETIMER_1 is not set CONFIG_FREERTOS_HZ=100 -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y diff --git a/examples/bluetooth/blufi/sdkconfig.defaults.esp32c3 b/examples/bluetooth/blufi/sdkconfig.defaults.esp32c3 index 92d007bd01f..113c33c970f 100644 --- a/examples/bluetooth/blufi/sdkconfig.defaults.esp32c3 +++ b/examples/bluetooth/blufi/sdkconfig.defaults.esp32c3 @@ -673,7 +673,6 @@ CONFIG_FREERTOS_CORETIMER_0=y # CONFIG_FREERTOS_CORETIMER_1 is not set CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y CONFIG_FREERTOS_HZ=100 -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y diff --git a/examples/bluetooth/blufi/sdkconfig.defaults.esp32s3 b/examples/bluetooth/blufi/sdkconfig.defaults.esp32s3 index 241c4d62b6e..81c6d3dcf6d 100644 --- a/examples/bluetooth/blufi/sdkconfig.defaults.esp32s3 +++ b/examples/bluetooth/blufi/sdkconfig.defaults.esp32s3 @@ -800,7 +800,6 @@ CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF CONFIG_FREERTOS_CORETIMER_0=y # CONFIG_FREERTOS_CORETIMER_1 is not set CONFIG_FREERTOS_HZ=100 -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y