|
|
@ -67,45 +67,46 @@ unsigned int sectors(size_t size) { |
|
|
|
void welcome() { |
|
|
|
|
|
|
|
DEBUG_MSG_P(PSTR("\n\n")); |
|
|
|
DEBUG_MSG_P(PSTR("%s %s\n"), (char *) APP_NAME, (char *) APP_VERSION); |
|
|
|
DEBUG_MSG_P(PSTR("%s\n%s\n\n"), (char *) APP_AUTHOR, (char *) APP_WEBSITE); |
|
|
|
DEBUG_MSG_P(PSTR("CPU chip ID: 0x%06X\n"), ESP.getChipId()); |
|
|
|
DEBUG_MSG_P(PSTR("CPU frequency: %d MHz\n"), ESP.getCpuFreqMHz()); |
|
|
|
DEBUG_MSG_P(PSTR("SDK version: %s\n"), ESP.getSdkVersion()); |
|
|
|
DEBUG_MSG_P(PSTR("Core version: %s\n"), ESP.getCoreVersion().c_str()); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] %s %s\n"), (char *) APP_NAME, (char *) APP_VERSION); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] %s\n"), (char *) APP_AUTHOR); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] %s\n\n"), (char *) APP_WEBSITE); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] CPU chip ID: 0x%06X\n"), ESP.getChipId()); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] CPU frequency: %d MHz\n"), ESP.getCpuFreqMHz()); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] SDK version: %s\n"), ESP.getSdkVersion()); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Core version: %s\n"), ESP.getCoreVersion().c_str()); |
|
|
|
|
|
|
|
DEBUG_MSG_P(PSTR("\n")); |
|
|
|
FlashMode_t mode = ESP.getFlashChipMode(); |
|
|
|
DEBUG_MSG_P(PSTR("Flash chip ID: 0x%06X\n"), ESP.getFlashChipId()); |
|
|
|
DEBUG_MSG_P(PSTR("Flash speed: %u Hz\n"), ESP.getFlashChipSpeed()); |
|
|
|
DEBUG_MSG_P(PSTR("Flash mode: %s\n"), mode == FM_QIO ? "QIO" : mode == FM_QOUT ? "QOUT" : mode == FM_DIO ? "DIO" : mode == FM_DOUT ? "DOUT" : "UNKNOWN"); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Flash chip ID: 0x%06X\n"), ESP.getFlashChipId()); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Flash speed: %u Hz\n"), ESP.getFlashChipSpeed()); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Flash mode: %s\n"), mode == FM_QIO ? "QIO" : mode == FM_QOUT ? "QOUT" : mode == FM_DIO ? "DIO" : mode == FM_DOUT ? "DOUT" : "UNKNOWN"); |
|
|
|
DEBUG_MSG_P(PSTR("\n")); |
|
|
|
DEBUG_MSG_P(PSTR("Flash sector size: %8u bytes\n"), SPI_FLASH_SEC_SIZE); |
|
|
|
DEBUG_MSG_P(PSTR("Flash size (CHIP): %8u bytes\n"), ESP.getFlashChipRealSize()); |
|
|
|
DEBUG_MSG_P(PSTR("Flash size (SDK): %8u bytes / %4d sectors\n"), ESP.getFlashChipSize(), sectors(ESP.getFlashChipSize())); |
|
|
|
DEBUG_MSG_P(PSTR("Firmware size: %8u bytes / %4d sectors\n"), ESP.getSketchSize(), sectors(ESP.getSketchSize())); |
|
|
|
DEBUG_MSG_P(PSTR("OTA size: %8u bytes / %4d sectors\n"), ESP.getFreeSketchSpace(), sectors(ESP.getFreeSketchSpace())); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Flash sector size: %8u bytes\n"), SPI_FLASH_SEC_SIZE); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Flash size (CHIP): %8u bytes\n"), ESP.getFlashChipRealSize()); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Flash size (SDK): %8u bytes / %4d sectors\n"), ESP.getFlashChipSize(), sectors(ESP.getFlashChipSize())); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Firmware size: %8u bytes / %4d sectors\n"), ESP.getSketchSize(), sectors(ESP.getSketchSize())); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] OTA size: %8u bytes / %4d sectors\n"), ESP.getFreeSketchSpace(), sectors(ESP.getFreeSketchSpace())); |
|
|
|
#if SPIFFS_SUPPORT
|
|
|
|
FSInfo fs_info; |
|
|
|
bool fs = SPIFFS.info(fs_info); |
|
|
|
if (fs) { |
|
|
|
DEBUG_MSG_P(PSTR("SPIFFS size: %8u bytes / %4d sectors\n"), fs_info.totalBytes, sectors(fs_info.totalBytes)); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] SPIFFS size: %8u bytes / %4d sectors\n"), fs_info.totalBytes, sectors(fs_info.totalBytes)); |
|
|
|
} |
|
|
|
#else
|
|
|
|
DEBUG_MSG_P(PSTR("SPIFFS size: %8u bytes / %4d sectors\n"), 0, 0); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] SPIFFS size: %8u bytes / %4d sectors\n"), 0, 0); |
|
|
|
#endif
|
|
|
|
DEBUG_MSG_P(PSTR("EEPROM size: %8u bytes / %4d sectors\n"), settingsMaxSize(), sectors(settingsMaxSize())); |
|
|
|
DEBUG_MSG_P(PSTR("Empty space: %8u bytes / 4 sectors\n"), 4 * SPI_FLASH_SEC_SIZE); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] EEPROM size: %8u bytes / %4d sectors\n"), settingsMaxSize(), sectors(settingsMaxSize())); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Empty space: %8u bytes / 4 sectors\n"), 4 * SPI_FLASH_SEC_SIZE); |
|
|
|
|
|
|
|
#if SPIFFS_SUPPORT
|
|
|
|
if (fs) { |
|
|
|
DEBUG_MSG_P(PSTR("\n")); |
|
|
|
DEBUG_MSG_P(PSTR("SPIFFS total size: %8u bytes\n"), fs_info.totalBytes); |
|
|
|
DEBUG_MSG_P(PSTR(" used size: %8u bytes\n"), fs_info.usedBytes); |
|
|
|
DEBUG_MSG_P(PSTR(" block size: %8u bytes\n"), fs_info.blockSize); |
|
|
|
DEBUG_MSG_P(PSTR(" page size: %8u bytes\n"), fs_info.pageSize); |
|
|
|
DEBUG_MSG_P(PSTR(" max files: %8u\n"), fs_info.maxOpenFiles); |
|
|
|
DEBUG_MSG_P(PSTR(" max length: %8u\n"), fs_info.maxPathLength); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] SPIFFS total size: %8u bytes\n"), fs_info.totalBytes); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] used size: %8u bytes\n"), fs_info.usedBytes); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] block size: %8u bytes\n"), fs_info.blockSize); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] page size: %8u bytes\n"), fs_info.pageSize); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] max files: %8u\n"), fs_info.maxOpenFiles); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] max length: %8u\n"), fs_info.maxPathLength); |
|
|
|
} |
|
|
|
#endif
|
|
|
|
|
|
|
@ -114,11 +115,13 @@ void welcome() { |
|
|
|
if (custom_reset > 0) { |
|
|
|
char buffer[32]; |
|
|
|
strcpy_P(buffer, custom_reset_string[custom_reset-1]); |
|
|
|
DEBUG_MSG_P(PSTR("Last reset reason: %s\n"), buffer); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Last reset reason: %s\n"), buffer); |
|
|
|
} else { |
|
|
|
DEBUG_MSG_P(PSTR("Last reset reason: %s\n"), (char *) ESP.getResetReason().c_str()); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Last reset reason: %s\n"), (char *) ESP.getResetReason().c_str()); |
|
|
|
} |
|
|
|
DEBUG_MSG_P(PSTR("Free heap: %u bytes\n"), ESP.getFreeHeap()); |
|
|
|
DEBUG_MSG_P(PSTR("[INIT] Free heap: %u bytes\n"), ESP.getFreeHeap()); |
|
|
|
|
|
|
|
initDump(); |
|
|
|
|
|
|
|
DEBUG_MSG_P(PSTR("\n\n")); |
|
|
|
|
|
|
|