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