diff --git a/components/esp32/cpu_start.c b/components/esp32/cpu_start.c index db32c4fdce..80942c2af9 100644 --- a/components/esp32/cpu_start.c +++ b/components/esp32/cpu_start.c @@ -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 */ diff --git a/components/esp32/dport_access.c b/components/esp32/dport_access.c index 473c433251..49e6032d29 100644 --- a/components/esp32/dport_access.c +++ b/components/esp32/dport_access.c @@ -173,7 +173,8 @@ static void dport_access_init_core(void *arg) /* Defer initialisation until after scheduler is running */ void esp_dport_access_int_init(void) { - xTaskCreatePinnedToCore(&dport_access_init_core, "dport", configMINIMAL_STACK_SIZE, NULL, 5, NULL, xPortGetCoreID()); + portBASE_TYPE res = xTaskCreatePinnedToCore(&dport_access_init_core, "dport", configMINIMAL_STACK_SIZE, NULL, 5, NULL, xPortGetCoreID()); + assert(res == pdTRUE); } void esp_dport_access_int_deinit(void) diff --git a/components/esp32/ipc.c b/components/esp32/ipc.c index 41f7b8573f..4f6398364a 100644 --- a/components/esp32/ipc.c +++ b/components/esp32/ipc.c @@ -80,8 +80,9 @@ void esp_ipc_init() const char* task_names[2] = {"ipc0", "ipc1"}; for (int i = 0; i < portNUM_PROCESSORS; ++i) { s_ipc_sem[i] = xSemaphoreCreateBinary(); - xTaskCreatePinnedToCore(ipc_task, task_names[i], CONFIG_IPC_TASK_STACK_SIZE, (void*) i, - configMAX_PRIORITIES - 1, &s_ipc_tasks[i], i); + portBASE_TYPE res = xTaskCreatePinnedToCore(ipc_task, task_names[i], CONFIG_IPC_TASK_STACK_SIZE, (void*) i, + configMAX_PRIORITIES - 1, &s_ipc_tasks[i], i); + assert(res == pdTRUE); } } diff --git a/components/esp32/task_wdt.c b/components/esp32/task_wdt.c index 8585260e2f..eaed32b4ca 100644 --- a/components/esp32/task_wdt.c +++ b/components/esp32/task_wdt.c @@ -202,7 +202,7 @@ void esp_task_wdt_init() { #if CONFIG_TASK_WDT_CHECK_IDLE_TASK esp_register_freertos_idle_hook(idle_hook); #endif - esp_intr_alloc(ETS_TG0_WDT_LEVEL_INTR_SOURCE, 0, task_wdt_isr, NULL, NULL); + ESP_ERROR_CHECK( esp_intr_alloc(ETS_TG0_WDT_LEVEL_INTR_SOURCE, 0, task_wdt_isr, NULL, NULL) ); } diff --git a/components/spi_flash/cache_utils.c b/components/spi_flash/cache_utils.c index 3bb08fe9cf..605c60115b 100644 --- a/components/spi_flash/cache_utils.c +++ b/components/spi_flash/cache_utils.c @@ -48,6 +48,7 @@ static volatile int s_flash_op_cpu = -1; void spi_flash_init_lock() { s_flash_op_mutex = xSemaphoreCreateMutex(); + assert(s_flash_op_mutex != NULL); } void spi_flash_op_lock()