esp32: Core dump API to retrieve current core data layout in flash

This commit is contained in:
Alexey Gerenkov
2018-03-13 17:07:42 +03:00
committed by bot
parent a55cc99f50
commit 30e766ee6b
3 changed files with 80 additions and 1 deletions

View File

@@ -382,6 +382,11 @@ void start_cpu0_default(void)
#if CONFIG_ESP32_ENABLE_COREDUMP
esp_core_dump_init();
size_t core_data_sz = 0;
size_t core_data_addr = 0;
if (esp_core_dump_image_get(&core_data_addr, &core_data_sz) == ESP_OK && core_data_sz > 0) {
ESP_LOGI(TAG, "Found core dump %d bytes in flash @ 0x%x", core_data_sz, core_data_addr);
}
#endif
portBASE_TYPE res = xTaskCreatePinnedToCore(&main_task, "main",