Skip to content

Commit

Permalink
Merge branch 'feature/freertos_remove_untested_fn_feature' into 'master'
Browse files Browse the repository at this point in the history
freertos: Removed CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION kconfig option

Closes IDF-5298

See merge request espressif/esp-idf!21000
  • Loading branch information
sudeep-mohanty committed Nov 16, 2022
2 parents f7f3c51 + 0744f4d commit ac99c0a
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 40 deletions.
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions components/freertos/Kconfig
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/en/api-reference/system/freertos.rst
Expand Up @@ -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!
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion examples/bluetooth/blufi/sdkconfig.defaults.esp32
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion examples/bluetooth/blufi/sdkconfig.defaults.esp32c3
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion examples/bluetooth/blufi/sdkconfig.defaults.esp32s3
Expand Up @@ -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
Expand Down

0 comments on commit ac99c0a

Please sign in to comment.