Code: Select all
make erase_flash partition_table flash monitor
format_if_mount_failed=true is supposed to fix this issue but it is not working.E (16826) SPIFFS: spiffs partition could not be found
E (16831) Example: Failed to find SPIFFS partition
Code: Select all
ESP_LOGI(TAG, "Initializing SPIFFS");
esp_vfs_spiffs_conf_t conf = {
.base_path = "/spiffs",
.partition_label = NULL,
.max_files = 5,
.format_if_mount_failed = true
};
// Use settings defined above to initialize and mount SPIFFS filesystem.
// Note: esp_vfs_spiffs_register is an all-in-one convenience function.
esp_err_t ret = esp_vfs_spiffs_register(&conf);
if (ret != ESP_OK) {
if (ret == ESP_FAIL) {
ESP_LOGE(TAG, "Failed to mount or format filesystem");
} else if (ret == ESP_ERR_NOT_FOUND) {
ESP_LOGE(TAG, "Failed to find SPIFFS partition");
} else {
ESP_LOGE(TAG, "Failed to initialize SPIFFS (%s)", esp_err_to_name(ret));
}
return;
}
What should I do to solve this?I (4) cpu_start: Starting scheduler on APP CPU.
D (199) heap_init: New heap initialised at 0x3ffe0440
D (205) heap_init: New heap initialised at 0x3ffe4350
D (210) intr_alloc: Connected src 16 to int 12 (cpu 0)
I (215) Example: Initializing SPIFFS
E (220) SPIFFS: spiffs partition could not be found
E (225) Example: Failed to find SPIFFS partition