|
@@ -584,7 +584,11 @@ void MarlinSettings::postprocess() {
|
584
|
584
|
"ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE is insufficient to capture all EEPROM data.");
|
585
|
585
|
#endif
|
586
|
586
|
|
587
|
|
-#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
|
587
|
+//
|
|
588
|
+// This file simply uses the DEBUG_ECHO macros to implement EEPROM_CHITCHAT.
|
|
589
|
+// For deeper debugging of EEPROM issues enable DEBUG_EEPROM_READWRITE.
|
|
590
|
+//
|
|
591
|
+#define DEBUG_OUT EITHER(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE)
|
588
|
592
|
#include "../core/debug_out.h"
|
589
|
593
|
|
590
|
594
|
#if ENABLED(EEPROM_SETTINGS)
|
|
@@ -1450,8 +1454,7 @@ void MarlinSettings::postprocess() {
|
1450
|
1454
|
EEPROM_WRITE(final_crc);
|
1451
|
1455
|
|
1452
|
1456
|
// Report storage size
|
1453
|
|
- DEBUG_ECHO_START();
|
1454
|
|
- DEBUG_ECHOLNPAIR("Settings Stored (", eeprom_size, " bytes; crc ", (uint32_t)final_crc, ")");
|
|
1457
|
+ DEBUG_ECHO_MSG("Settings Stored (", eeprom_size, " bytes; crc ", (uint32_t)final_crc, ")");
|
1455
|
1458
|
|
1456
|
1459
|
eeprom_error |= size_error(eeprom_size);
|
1457
|
1460
|
}
|
|
@@ -1490,8 +1493,7 @@ void MarlinSettings::postprocess() {
|
1490
|
1493
|
stored_ver[0] = '?';
|
1491
|
1494
|
stored_ver[1] = '\0';
|
1492
|
1495
|
}
|
1493
|
|
- DEBUG_ECHO_START();
|
1494
|
|
- DEBUG_ECHOLNPAIR("EEPROM version mismatch (EEPROM=", stored_ver, " Marlin=" EEPROM_VERSION ")");
|
|
1496
|
+ DEBUG_ECHO_MSG("EEPROM version mismatch (EEPROM=", stored_ver, " Marlin=" EEPROM_VERSION ")");
|
1495
|
1497
|
IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_version());
|
1496
|
1498
|
eeprom_error = true;
|
1497
|
1499
|
}
|
|
@@ -2186,9 +2188,13 @@ void MarlinSettings::postprocess() {
|
2186
|
2188
|
= DIGIPOT_MOTOR_CURRENT
|
2187
|
2189
|
#endif
|
2188
|
2190
|
;
|
2189
|
|
- DEBUG_ECHOLNPGM("DIGIPOTS Loading");
|
|
2191
|
+ #if HAS_MOTOR_CURRENT_SPI
|
|
2192
|
+ DEBUG_ECHO_MSG("DIGIPOTS Loading");
|
|
2193
|
+ #endif
|
2190
|
2194
|
EEPROM_READ(motor_current_setting);
|
2191
|
|
- DEBUG_ECHOLNPGM("DIGIPOTS Loaded");
|
|
2195
|
+ #if HAS_MOTOR_CURRENT_SPI
|
|
2196
|
+ DEBUG_ECHO_MSG("DIGIPOTS Loaded");
|
|
2197
|
+ #endif
|
2192
|
2198
|
#if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM
|
2193
|
2199
|
if (!validating)
|
2194
|
2200
|
COPY(stepper.motor_current_setting, motor_current_setting);
|
|
@@ -2357,14 +2363,12 @@ void MarlinSettings::postprocess() {
|
2357
|
2363
|
//
|
2358
|
2364
|
eeprom_error = size_error(eeprom_index - (EEPROM_OFFSET));
|
2359
|
2365
|
if (eeprom_error) {
|
2360
|
|
- DEBUG_ECHO_START();
|
2361
|
|
- DEBUG_ECHOLNPAIR("Index: ", eeprom_index - (EEPROM_OFFSET), " Size: ", datasize());
|
|
2366
|
+ DEBUG_ECHO_MSG("Index: ", eeprom_index - (EEPROM_OFFSET), " Size: ", datasize());
|
2362
|
2367
|
IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_index());
|
2363
|
2368
|
}
|
2364
|
2369
|
else if (working_crc != stored_crc) {
|
2365
|
2370
|
eeprom_error = true;
|
2366
|
|
- DEBUG_ERROR_START();
|
2367
|
|
- DEBUG_ECHOLNPAIR("EEPROM CRC mismatch - (stored) ", stored_crc, " != ", working_crc, " (calculated)!");
|
|
2371
|
+ DEBUG_ERROR_MSG("EEPROM CRC mismatch - (stored) ", stored_crc, " != ", working_crc, " (calculated)!");
|
2368
|
2372
|
IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_crc());
|
2369
|
2373
|
}
|
2370
|
2374
|
else if (!validating) {
|
|
@@ -2454,13 +2458,8 @@ void MarlinSettings::postprocess() {
|
2454
|
2458
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
2455
|
2459
|
|
2456
|
2460
|
inline void ubl_invalid_slot(const int s) {
|
2457
|
|
- #if BOTH(EEPROM_CHITCHAT, DEBUG_OUT)
|
2458
|
|
- DEBUG_ECHOLNPGM("?Invalid slot.");
|
2459
|
|
- DEBUG_ECHO(s);
|
2460
|
|
- DEBUG_ECHOLNPGM(" mesh slots available.");
|
2461
|
|
- #else
|
2462
|
|
- UNUSED(s);
|
2463
|
|
- #endif
|
|
2461
|
+ DEBUG_ECHOLNPAIR("?Invalid slot.\n", s, " mesh slots available.");
|
|
2462
|
+ UNUSED(s);
|
2464
|
2463
|
}
|
2465
|
2464
|
|
2466
|
2465
|
const uint16_t MarlinSettings::meshes_end = persistentStore.capacity() - 129; // 128 (+1 because of the change to capacity rather than last valid address)
|