@@ -34,19 +34,25 @@ bool FlashFormatterQSPI::checkPartition()
34
34
*/
35
35
_runtimeFormat = false ;
36
36
if (_runtimeData.init () != BD_ERROR_OK) {
37
+ Serial.println (" Failed to init optData" );
37
38
_runtimeFormat = true ;
38
39
return false ;
39
40
}
41
+ Serial.println (" Runtime partition size: " + String ((unsigned int )_runtimeData.size ()));
42
+
40
43
_runtimeData.deinit ();
41
44
42
45
/* check WiFi partition */
43
46
if (_wifiData.init () != BD_ERROR_OK || _wifiFS.mount (&_wifiData) != 0 ) {
47
+ Serial.println (" Failed to mount wifiFS" );
44
48
return false ;
45
49
}
46
50
47
51
if (!checkWiFiData ()) {
52
+ Serial.println (" Failed to check wifi data" );
48
53
return false ;
49
54
}
55
+ Serial.println (" WiFi partition size: " + String ((unsigned int )_wifiData.size ()));
50
56
51
57
_wifiFS.unmount ();
52
58
_wifiData.deinit ();
@@ -59,6 +65,7 @@ bool FlashFormatterQSPI::checkPartition()
59
65
if (_otaData.size () < 5 * 1024 * 1024 ) {
60
66
return false ;
61
67
}
68
+ Serial.println (" OTA partition size: " + String ((unsigned int )_otaData.size ()));
62
69
63
70
_otaFS.unmount ();
64
71
_otaData.deinit ();
@@ -71,6 +78,7 @@ bool FlashFormatterQSPI::checkPartition()
71
78
if (_kvstoreData.size () < 1 * 1024 * 1024 ) {
72
79
return false ;
73
80
}
81
+ Serial.println (" KVStore partition size: " + String ((unsigned int )_kvstoreData.size ()));
74
82
_kvstoreData.deinit ();
75
83
76
84
_root->deinit ();
@@ -80,25 +88,30 @@ bool FlashFormatterQSPI::checkPartition()
80
88
bool FlashFormatterQSPI::formatPartition () {
81
89
82
90
if (_root->init () != BD_ERROR_OK) {
91
+ Serial.println (" Failed to init root" );
83
92
return false ;
84
93
}
85
94
86
95
if (_root->erase (0x0 , _root->get_erase_size ()) != BD_ERROR_OK) {
96
+ Serial.println (" Failed to erase root" );
87
97
return false ;
88
98
}
89
99
90
100
MBRBlockDevice::partition (_root, 1 , 0x0B , 0 , 1 * 1024 * 1024 );
91
101
if (_wifiFS.reformat (&_wifiData) != 0 ) {
102
+ Serial.println (" Failed to format wifiFS" );
92
103
return false ;
93
104
}
94
105
95
106
if (!restoreWifiData ()) {
107
+ Serial.println (" Failed to restore wifi data" );
96
108
return false ;
97
109
}
98
110
_wifiFS.unmount ();
99
111
100
112
MBRBlockDevice::partition (_root, 2 , 0x0B , 1 * 1024 * 1024 , 6 * 1024 * 1024 );
101
113
if (_otaFS.reformat (&_otaData) != 0 ) {
114
+ Serial.println (" Failed to format otaFS" );
102
115
return false ;
103
116
}
104
117
_otaFS.unmount ();
@@ -108,6 +121,7 @@ bool FlashFormatterQSPI::formatPartition() {
108
121
if (_runtimeFormat) {
109
122
MBRBlockDevice::partition (_root, 4 , 0x0B , 7 * 1024 * 1024 , 14 * 1024 * 1024 );
110
123
if (_runtimeFS.reformat (&_runtimeData) != 0 ) {
124
+ Serial.println (" Failed to format optFS" );
111
125
return false ;
112
126
}
113
127
_runtimeFS.unmount ();
0 commit comments