@@ -54,7 +54,11 @@ bool eraseFAT() {
5454***************************************************************************************/
5555bool setupSdCard () {
5656#if !defined(SDM_SD) // fot Lilygo T-Display S3 with lilygo shield
57- if (!SD_MMC.begin (" /sdcard" , true ))
57+ #if defined(ARDUINO_M5STACK_TAB5)
58+ if (!SD_MMC.begin (" /sdcard" ))
59+ #else
60+ if (!SD_MMC.begin (" /sdcard" , true )) // One bit mode
61+ #endif
5862#elif (TFT_MOSI == SDCARD_MOSI)
5963 if (!SDM.begin (SDCARD_CS)) // https://github.com/Bodmer/TFT_eSPI/discussions/2420
6064#elif defined(HEADLESS)
@@ -451,8 +455,7 @@ void performUpdate(Stream &updateSource, size_t updateSize, int command) {
451455 log_i (" Update successfully completed. Rebooting." );
452456 displayRedStripe (" Removing coredump (if any)..." );
453457 clearCoredump ();
454- }
455- else log_i (" Update not finished? Something went wrong!" );
458+ } else log_i (" Update not finished? Something went wrong!" );
456459 } else {
457460 log_i (" Error Occurred. Error #: %s" , String (Update.getError ()));
458461 }
@@ -464,7 +467,6 @@ void performUpdate(Stream &updateSource, size_t updateSize, int command) {
464467 vTaskResume (xHandle);
465468}
466469
467-
468470/* **************************************************************************************
469471 ** Function name: clearCoredump
470472 ** Description: As some programs may generate core dumps,
@@ -474,14 +476,13 @@ void performUpdate(Stream &updateSource, size_t updateSize, int command) {
474476bool clearCoredump () {
475477 const esp_partition_t *partition =
476478 esp_partition_find_first (ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_ANY, " coredump" );
477- Serial.printf (" Coredump partition address: 0x%08X\n " , partition ? partition->address : 0 );
479+ Serial.printf (" Coredump partition address: 0x%08X\n " , partition ? partition->address : 0 );
478480 if (!partition) {
479481 Serial.println (" Failed to find coredump partition" );
480482 log_e (" Failed to find coredump partition" );
481483 return false ;
482484 }
483- log_i (" Erasing coredump partition at address 0x%08X, size %d bytes" ,
484- partition->address , partition->size );
485+ log_i (" Erasing coredump partition at address 0x%08X, size %d bytes" , partition->address , partition->size );
485486
486487 // erase all coredump partition
487488 esp_err_t err = esp_flash_erase_region (NULL , partition->address , partition->size );
0 commit comments