Skip to content

Commit be0c44b

Browse files
committed
temp: debug prints
1 parent 217d71c commit be0c44b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/flashFormatter/FlashFormatterQSPI.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ bool FlashFormatterQSPI::checkPartition()
3636
if (!checkWiFiData()) {
3737
return false;
3838
}
39+
Serial.println("WiFi partition size: " + String((unsigned int)_wifiData.size()));
3940

4041
_wifiFS.unmount();
4142
_wifiData.deinit();
@@ -60,13 +61,16 @@ bool FlashFormatterQSPI::checkPartition()
6061
if (_kvstoreData.size() < 1 * 1024 * 1024) {
6162
return false;
6263
}
64+
Serial.println("KVStore partition size: " + String((unsigned int)_kvstoreData.size()));
6365
_kvstoreData.deinit();
6466

6567
/* check PLC runtime partition */
6668
if (_runtimeData.init() != BD_ERROR_OK) {
69+
Serial.println("Failed to init optData");
6770
_runtimeFormat = true;
6871
return false;
6972
}
73+
Serial.println("Runtime partition size: " + String((unsigned int)_runtimeData.size()));
7074
_runtimeData.deinit();
7175

7276
_root->deinit();
@@ -76,25 +80,30 @@ bool FlashFormatterQSPI::checkPartition()
7680
bool FlashFormatterQSPI::formatPartition() {
7781

7882
if (_root->init() != BD_ERROR_OK) {
83+
Serial.println("Failed to init root");
7984
return false;
8085
}
8186

8287
if (_root->erase(0x0, _root->get_erase_size()) != BD_ERROR_OK) {
88+
Serial.println("Failed to erase root");
8389
return false;
8490
}
8591

8692
MBRBlockDevice::partition(_root, 1, 0x0B, 0, 1 * 1024 * 1024);
8793
if (_wifiFS.reformat(&_wifiData) != 0) {
94+
Serial.println("Failed to format wifiFS");
8895
return false;
8996
}
9097

9198
if (!restoreWifiData()) {
99+
Serial.println("Failed to restore wifi data");
92100
return false;
93101
}
94102
_wifiFS.unmount();
95103

96104
MBRBlockDevice::partition(_root, 2, 0x0B, 1 * 1024 * 1024, 6 * 1024 * 1024);
97105
if (_otaFS.reformat(&_otaData) != 0) {
106+
Serial.println("Failed to format otaFS");
98107
return false;
99108
}
100109
_otaFS.unmount();
@@ -104,6 +113,7 @@ bool FlashFormatterQSPI::formatPartition() {
104113
if (_runtimeFormat) {
105114
MBRBlockDevice::partition(_root, 4, 0x0B, 7 * 1024 * 1024, 14 * 1024 * 1024);
106115
if (_runtimeFS.reformat(&_runtimeData) != 0) {
116+
Serial.println("Failed to format optFS");
107117
return false;
108118
}
109119
_runtimeFS.unmount();

0 commit comments

Comments
 (0)