diff --git a/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/FreeRTOSConfig_arch.h b/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/FreeRTOSConfig_arch.h index f2aab51ccf..74280b6422 100644 --- a/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/FreeRTOSConfig_arch.h +++ b/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/FreeRTOSConfig_arch.h @@ -115,18 +115,6 @@ int xt_clock_freq(void) __attribute__((deprecated)); #endif #endif // __ASSEMBLER__ -// If CONFIG_FREERTOS_ASSERT_DISABLE is set then configASSERT is defined empty later in FreeRTOS.h and the macro -// configASSERT_DEFINED remains unset (meaning some warnings are avoided) - -#if defined(CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE) -#define configASSERT(a) if (unlikely(!(a))) { \ - esp_rom_printf("%s:%d (%s)- assert failed!\n", __FILE__, __LINE__, \ - __FUNCTION__); \ - } -#elif defined(CONFIG_FREERTOS_ASSERT_FAIL_ABORT) -#define configASSERT(a) assert(a) -#endif - #if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION #define UNTESTED_FUNCTION() { esp_rom_printf("Untested FreeRTOS function %s\r\n", __FUNCTION__); configASSERT(false); } while(0) #else diff --git a/components/freertos/Kconfig b/components/freertos/Kconfig index f3fd73cbbb..7ac4cae9e5 100644 --- a/components/freertos/Kconfig +++ b/components/freertos/Kconfig @@ -175,39 +175,6 @@ menu "FreeRTOS" This value must be at least 1. Index 0 is reserved for use by the pthreads API thread-local-storage. Other indexes can be used for any desired purpose. - choice FREERTOS_ASSERT - prompt "FreeRTOS assertions" - default FREERTOS_ASSERT_FAIL_ABORT if !COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE - default FREERTOS_ASSERT_DISABLE if COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE - help - Failed FreeRTOS configASSERT() assertions can be configured to - behave in different ways. - - By default these behave the same as the global project assert settings. - - config FREERTOS_ASSERT_FAIL_ABORT - bool "abort() on failed assertions" - depends on !COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE - help - If a FreeRTOS configASSERT() fails, FreeRTOS will abort() and - halt execution. The panic handler can be configured to handle - the outcome of an abort() in different ways. - - If assertions are disabled for the entire project, they are also - disabled in FreeRTOS and this option is unavailable. - - config FREERTOS_ASSERT_FAIL_PRINT_CONTINUE - bool "Print and continue failed assertions" - help - If a FreeRTOS assertion fails, print it out and continue. - - config FREERTOS_ASSERT_DISABLE - bool "Disable FreeRTOS assertions" - help - FreeRTOS configASSERT() will not be compiled into the binary. - - endchoice - config FREERTOS_IDLE_TASK_STACKSIZE int "Idle Task stack size" range 768 32768 diff --git a/components/freertos/esp_additions/include/freertos/FreeRTOSConfig.h b/components/freertos/esp_additions/include/freertos/FreeRTOSConfig.h index 6bb8189459..8afc80cabb 100644 --- a/components/freertos/esp_additions/include/freertos/FreeRTOSConfig.h +++ b/components/freertos/esp_additions/include/freertos/FreeRTOSConfig.h @@ -100,17 +100,7 @@ #ifndef __ASSEMBLER__ #include -// If CONFIG_FREERTOS_ASSERT_DISABLE is set then configASSERT is defined empty later in FreeRTOS.h and the macro -// configASSERT_DEFINED remains unset (meaning some warnings are avoided) - -#if defined(CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE) -#define configASSERT(a) if (unlikely(!(a))) { \ - esp_rom_printf("%s:%d (%s)- assert failed!\n", __FILE__, __LINE__, \ - __FUNCTION__); \ - } -#elif defined(CONFIG_FREERTOS_ASSERT_FAIL_ABORT) #define configASSERT(a) assert(a) -#endif #if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION #define UNTESTED_FUNCTION() { esp_rom_printf("Untested FreeRTOS function %s\r\n", __FUNCTION__); configASSERT(false); } while(0) diff --git a/components/freertos/test/test_freertos_mutex.c b/components/freertos/test/test_freertos_mutex.c index bd082c068a..c5ef46bf3d 100644 --- a/components/freertos/test/test_freertos_mutex.c +++ b/components/freertos/test/test_freertos_mutex.c @@ -5,7 +5,7 @@ #include "test_utils.h" /* If assertions aren't set to fail this code still crashes, but not with an abort... */ -#if CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER && CONFIG_FREERTOS_ASSERT_FAIL_ABORT +#if CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER && !CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE static void mutex_release_task(void* arg) { diff --git a/components/mdns/test_afl_fuzz_host/sdkconfig.h b/components/mdns/test_afl_fuzz_host/sdkconfig.h index ce264888cf..6f24c61662 100644 --- a/components/mdns/test_afl_fuzz_host/sdkconfig.h +++ b/components/mdns/test_afl_fuzz_host/sdkconfig.h @@ -180,7 +180,6 @@ #define CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY 1 #define CONFIG_FREERTOS_INTERRUPT_BACKTRACE 1 #define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 -#define CONFIG_FREERTOS_ASSERT_FAIL_ABORT 1 #define CONFIG_FREERTOS_IDLE_TASK_STACKSIZE 1536 #define CONFIG_FREERTOS_ISR_STACKSIZE 1536 #define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 16 diff --git a/docs/en/migration-guides/freertos.rst b/docs/en/migration-guides/freertos.rst new file mode 100644 index 0000000000..107fa974d8 --- /dev/null +++ b/docs/en/migration-guides/freertos.rst @@ -0,0 +1,12 @@ +Migrate FreeRTOS to ESP-IDF 5.0 +================================== + +Tasks Snapshot +-------------- + +The header ``task_snapshot.h`` has been removed from ``freertos/task.h``. ESP-IDF developers should include ``"freertos/task_snapshot.h``` in case they need tasks snapshot API. + + +FreeRTOS Asserts +---------------- +Previously FreeRTOS asserts were configured separately from the rest of the system using the `FREERTOS_ASSERT` kconfig option. This option has now been removed and the configuration is now done through `COMPILER_OPTIMIZATION_ASSERTION_LEVEL`. diff --git a/docs/en/migration-guides/index.rst b/docs/en/migration-guides/index.rst index 4b2220f538..47e68c19f3 100644 --- a/docs/en/migration-guides/index.rst +++ b/docs/en/migration-guides/index.rst @@ -9,5 +9,6 @@ ESP-IDF 5.0 Migration Guides Peripherals Build System System + FreeRTOS Ethernet Removed or deprecated components diff --git a/docs/en/migration-guides/system.rst b/docs/en/migration-guides/system.rst index 4d3bde29ff..f40f7b4471 100644 --- a/docs/en/migration-guides/system.rst +++ b/docs/en/migration-guides/system.rst @@ -34,11 +34,6 @@ ROM --- Deprecated ROM related header files from `components/esp32/rom/` (old include path: `rom/*.h`) have been deleted. Please update to use the new target-specific path from `components/esp_rom/include/{IDF_TARGET_NAME}/` (new include path: `{IDF_TARGET_NAME}/rom/*.h`). -Tasks snapshot --------------- - -The header ``task_snapshot.h`` has been removed from ``freertos/task.h``. ESP-IDF developers should include ``"freertos/task_snapshot.h``` in case they need tasks snapshot API. - ESP HW Support -------------- diff --git a/docs/zh_CN/migration-guides/freertos.rst b/docs/zh_CN/migration-guides/freertos.rst new file mode 100644 index 0000000000..8c6fe659a4 --- /dev/null +++ b/docs/zh_CN/migration-guides/freertos.rst @@ -0,0 +1 @@ +.. include:: ../../en/migration-guides/freertos.rst diff --git a/docs/zh_CN/migration-guides/index.rst b/docs/zh_CN/migration-guides/index.rst index 77f385bc4c..b640a65780 100644 --- a/docs/zh_CN/migration-guides/index.rst +++ b/docs/zh_CN/migration-guides/index.rst @@ -9,5 +9,6 @@ ESP-IDF 5.0 迁移指南 外设 构建系统 系统 + FreeRTOS 以太网 Removed or deprecated components diff --git a/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.noasserts b/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.noasserts index 22cb4d70ea..48bc41cf2d 100644 --- a/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.noasserts +++ b/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.noasserts @@ -1,5 +1,4 @@ CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y -CONFIG_FREERTOS_ASSERT_DISABLE=y CONFIG_COMPILER_HIDE_PATHS_MACROS=n # compiling as many files as possible here (we don't have 100% coverage of course, due to config options, but diff --git a/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.noasserts.nimble b/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.noasserts.nimble index 7d8ccfe182..43d3b3621d 100644 --- a/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.noasserts.nimble +++ b/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.noasserts.nimble @@ -1,5 +1,4 @@ CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y -CONFIG_FREERTOS_ASSERT_DISABLE=y CONFIG_COMPILER_HIDE_PATHS_MACROS=n # the other sdkconfig builds Bluedroid, build NimBLE here diff --git a/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.silentasserts.nimble b/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.silentasserts.nimble index 640f0fd2e1..384215fbb6 100644 --- a/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.silentasserts.nimble +++ b/tools/test_apps/system/no_embedded_paths/sdkconfig.ci.silentasserts.nimble @@ -1,5 +1,4 @@ CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y -CONFIG_FREERTOS_ASSERT_DISABLE=y CONFIG_COMPILER_HIDE_PATHS_MACROS=n # the other sdkconfig builds Bluedroid, build NimBLE here diff --git a/tools/unit-test-app/configs/freertos_options b/tools/unit-test-app/configs/freertos_options index f64ae47eac..d48ae92fb1 100644 --- a/tools/unit-test-app/configs/freertos_options +++ b/tools/unit-test-app/configs/freertos_options @@ -10,7 +10,6 @@ CONFIG_FREERTOS_HZ=500 CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y CONFIG_FREERTOS_INTERRUPT_BACKTRACE=n -CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE=y CONFIG_FREERTOS_LEGACY_HOOKS=y CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP=y CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=10 diff --git a/tools/unit-test-app/configs/freertos_options_c3 b/tools/unit-test-app/configs/freertos_options_c3 index 1d4ac126b8..3ef2aa5066 100644 --- a/tools/unit-test-app/configs/freertos_options_c3 +++ b/tools/unit-test-app/configs/freertos_options_c3 @@ -10,7 +10,6 @@ CONFIG_FREERTOS_HZ=500 CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y CONFIG_FREERTOS_INTERRUPT_BACKTRACE=n -CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE=y CONFIG_FREERTOS_LEGACY_HOOKS=y CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP=y diff --git a/tools/unit-test-app/configs/freertos_options_s2 b/tools/unit-test-app/configs/freertos_options_s2 index bc2602044f..c06addfa52 100644 --- a/tools/unit-test-app/configs/freertos_options_s2 +++ b/tools/unit-test-app/configs/freertos_options_s2 @@ -10,7 +10,6 @@ CONFIG_FREERTOS_HZ=500 CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y CONFIG_FREERTOS_INTERRUPT_BACKTRACE=n -CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE=y CONFIG_FREERTOS_LEGACY_HOOKS=y CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP=y CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=10