freertos: Refactor OS startup functions

This commit refactors the OS startup functions as follows:

- Moved the OS/app startup functions listed below to "app_startup.c". Their
    implementations are now common to all ports (RISC-V and Xtensa) of all
    FreeRTOS implementations (IDF and Amazon SMP).
    - esp_startup_start_app()
    - esp_startup_start_app_other_cores()
- Removed esp_startup_start_app_common() as app startup functions are now
    already common to all ports.
- Added extra logs to "main_task" to help with user debugging

Note: Increased startup delay on "unity_task". The "unity_run_menu()" is non
blocking, thus if the main task or other startup tasks have not been freed
by the time "unity_run_menu()" is run, those tasks will be freed the next time
"unity_task" blocks. This could cause some tests to have a memory leak, thus
the "unity_task" startup delay has increased.
This commit is contained in:
Darian Leung
2022-11-24 22:20:50 +08:00
parent 9a1f2b95ea
commit 09690906e7
10 changed files with 232 additions and 422 deletions

View File

@@ -130,14 +130,12 @@ entries:
queue: uxQueueGetQueueNumber (default)
queue: vQueueSetQueueNumber (default)
queue: ucQueueGetQueueType (default)
# port.c Functions
port: esp_startup_start_app (default)
if ESP_SYSTEM_SINGLE_CORE_MODE = n:
port: esp_startup_start_app_other_cores (default)
# app_startup.c
app_startup: esp_startup_start_app (default)
if CONFIG_FREERTOS_UNICORE = n:
app_startup: esp_startup_start_app_other_cores (default)
app_startup: other_cpu_startup_idle_hook_cb (default)
app_startup: main_task (default)
# port_common.c Functions
port_common:main_task (default)
port_common:esp_startup_start_app_common (default)
port_common:vApplicationGetIdleTaskMemory (default)
port_common:vApplicationGetTimerTaskMemory (default)
if FREERTOS_UNICORE = n:
port_common:other_cpu_startup_idle_hook_cb (default)