startup: Add assertion checks around various initialisation sequences

These may fail if close to 192KB of static RAM is allocated (remaining early heap RAM is too small.)
This commit is contained in:
Angus Gratton
2017-07-12 11:33:51 +08:00
committed by Angus Gratton
parent 2b0f623259
commit 99fe61716c
5 changed files with 11 additions and 7 deletions
+4 -3
View File
@@ -289,9 +289,10 @@ void start_cpu0_default(void)
esp_core_dump_init();
#endif
xTaskCreatePinnedToCore(&main_task, "main",
ESP_TASK_MAIN_STACK, NULL,
ESP_TASK_MAIN_PRIO, NULL, 0);
portBASE_TYPE res = xTaskCreatePinnedToCore(&main_task, "main",
ESP_TASK_MAIN_STACK, NULL,
ESP_TASK_MAIN_PRIO, NULL, 0);
assert(res == pdTRUE);
ESP_LOGI(TAG, "Starting scheduler on PRO CPU.");
vTaskStartScheduler();
abort(); /* Only get to here if not enough free heap to start scheduler */