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
@@ -21,8 +21,10 @@
static void unity_task(void *pvParameters)
{
vTaskDelay(2); /* Delay a bit to let the main task be deleted */
unity_run_menu(); /* Doesn't return */
// Delay a bit to let the main task and any other startup tasks be deleted
vTaskDelay(pdMS_TO_TICKS(50));
// Start running unity (prints test menu and doesn't return)
unity_run_menu();
}
void test_main(void)