Skip to content

Commit 6a0b13f

Browse files
committed
temp: debug prints
1 parent ec4b5b5 commit 6a0b13f

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,14 +61,17 @@ 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
_runtimeFormat = false;
6769
if (_runtimeData.init() != BD_ERROR_OK) {
70+
Serial.println("Failed to init optData");
6871
_runtimeFormat = true;
6972
return false;
7073
}
74+
Serial.println("Runtime partition size: " + String((unsigned int)_runtimeData.size()));
7175
_runtimeData.deinit();
7276

7377
_root->deinit();
@@ -77,25 +81,30 @@ bool FlashFormatterQSPI::checkPartition()
7781
bool FlashFormatterQSPI::formatPartition() {
7882

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

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

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

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

97105
MBRBlockDevice::partition(_root, 2, 0x0B, 1 * 1024 * 1024, 6 * 1024 * 1024);
98106
if (_otaFS.reformat(&_otaData) != 0) {
107+
Serial.println("Failed to format otaFS");
99108
return false;
100109
}
101110
_otaFS.unmount();
@@ -105,6 +114,7 @@ bool FlashFormatterQSPI::formatPartition() {
105114
if (_runtimeFormat) {
106115
MBRBlockDevice::partition(_root, 4, 0x0B, 7 * 1024 * 1024, 14 * 1024 * 1024);
107116
if (_runtimeFS.reformat(&_runtimeData) != 0) {
117+
Serial.println("Failed to format optFS");
108118
return false;
109119
}
110120
_runtimeFS.unmount();

0 commit comments

Comments
 (0)