@@ -36,6 +36,7 @@ bool FlashFormatterQSPI::checkPartition()
36
36
if (!checkWiFiData ()) {
37
37
return false ;
38
38
}
39
+ Serial.println (" WiFi partition size: " + String ((unsigned int )_wifiData.size ()));
39
40
40
41
_wifiFS.unmount ();
41
42
_wifiData.deinit ();
@@ -60,14 +61,17 @@ bool FlashFormatterQSPI::checkPartition()
60
61
if (_kvstoreData.size () < 1 * 1024 * 1024 ) {
61
62
return false ;
62
63
}
64
+ Serial.println (" KVStore partition size: " + String ((unsigned int )_kvstoreData.size ()));
63
65
_kvstoreData.deinit ();
64
66
65
67
/* check PLC runtime partition */
66
68
_runtimeFormat = false ;
67
69
if (_runtimeData.init () != BD_ERROR_OK) {
70
+ Serial.println (" Failed to init optData" );
68
71
_runtimeFormat = true ;
69
72
return false ;
70
73
}
74
+ Serial.println (" Runtime partition size: " + String ((unsigned int )_runtimeData.size ()));
71
75
_runtimeData.deinit ();
72
76
73
77
_root->deinit ();
@@ -77,25 +81,30 @@ bool FlashFormatterQSPI::checkPartition()
77
81
bool FlashFormatterQSPI::formatPartition () {
78
82
79
83
if (_root->init () != BD_ERROR_OK) {
84
+ Serial.println (" Failed to init root" );
80
85
return false ;
81
86
}
82
87
83
88
if (_root->erase (0x0 , _root->get_erase_size ()) != BD_ERROR_OK) {
89
+ Serial.println (" Failed to erase root" );
84
90
return false ;
85
91
}
86
92
87
93
MBRBlockDevice::partition (_root, 1 , 0x0B , 0 , 1 * 1024 * 1024 );
88
94
if (_wifiFS.reformat (&_wifiData) != 0 ) {
95
+ Serial.println (" Failed to format wifiFS" );
89
96
return false ;
90
97
}
91
98
92
99
if (!restoreWifiData ()) {
100
+ Serial.println (" Failed to restore wifi data" );
93
101
return false ;
94
102
}
95
103
_wifiFS.unmount ();
96
104
97
105
MBRBlockDevice::partition (_root, 2 , 0x0B , 1 * 1024 * 1024 , 6 * 1024 * 1024 );
98
106
if (_otaFS.reformat (&_otaData) != 0 ) {
107
+ Serial.println (" Failed to format otaFS" );
99
108
return false ;
100
109
}
101
110
_otaFS.unmount ();
@@ -105,6 +114,7 @@ bool FlashFormatterQSPI::formatPartition() {
105
114
if (_runtimeFormat) {
106
115
MBRBlockDevice::partition (_root, 4 , 0x0B , 7 * 1024 * 1024 , 14 * 1024 * 1024 );
107
116
if (_runtimeFS.reformat (&_runtimeData) != 0 ) {
117
+ Serial.println (" Failed to format optFS" );
108
118
return false ;
109
119
}
110
120
_runtimeFS.unmount ();
0 commit comments