feat(system_init): introduce pre-scheduler and pre-app main handler registrations

- Added macros for registering handlers to run before the scheduler and app main.
- Updated various components to utilize the new registration system for initialization.
- Refactored app startup logic to streamline initialization sequence.
This commit is contained in:
Konstantin Kondrashov
2026-09-02 16:58:44 +03:00
parent 40f25003b4
commit 754ac1dd45
21 changed files with 348 additions and 129 deletions
@@ -3,6 +3,21 @@ System
:link_to_translation:`zh_CN:[中文]`
FreeRTOS
---------
The legacy ``port_start_app_hook`` is deprecated and will be removed in ESP-IDF v7.0. To preserve the previous execution order, replace it with an ``ESP_PRE_SCHEDULER_HANDLER_REGISTER`` handler at priority ``999``.
.. code-block:: c
#include "esp_private/esp_sys_event_app_init.h"
ESP_PRE_SCHEDULER_HANDLER_REGISTER(port_start_app_hook, 999)
{
// Port-specific startup behavior
return ESP_OK;
}
OTA Updates
-----------