@@ -28,6 +28,7 @@ bool FlashFormatterQSPI::checkPartition()
28
28
if (_wifiData.init () != BD_ERROR_OK || _wifiFS.mount (&_wifiData) != 0 ) {
29
29
return false ;
30
30
}
31
+ Serial.println (" WiFi partition size: " + String ((unsigned int )_wifiData.size ()));
31
32
32
33
if (!checkWiFiData ()) {
33
34
return false ;
@@ -43,6 +44,7 @@ bool FlashFormatterQSPI::checkPartition()
43
44
if (_otaData.size () < 5 * 1024 * 1024 ) {
44
45
return false ;
45
46
}
47
+ Serial.println (" OTA partition size: " + String ((unsigned int )_otaData.size ()));
46
48
47
49
_otaFS.unmount ();
48
50
_otaData.deinit ();
@@ -54,6 +56,7 @@ bool FlashFormatterQSPI::checkPartition()
54
56
if (_kvstoreData.size () < 1 * 1024 * 1024 ) {
55
57
return false ;
56
58
}
59
+ Serial.println (" KVStore partition size: " + String ((unsigned int )_kvstoreData.size ()));
57
60
58
61
_kvstoreData.deinit ();
59
62
_root->deinit ();
@@ -89,6 +92,7 @@ bool FlashFormatterQSPI::checkFile(const char* partition, const char* filename)
89
92
{
90
93
DIR *dir;
91
94
struct dirent *ent;
95
+ Serial.println (" Checking for file: " + String (filename));
92
96
93
97
if ((dir = opendir (partition)) == NULL ) {
94
98
return false ;
@@ -102,12 +106,14 @@ bool FlashFormatterQSPI::checkFile(const char* partition, const char* filename)
102
106
break ;
103
107
}
104
108
}
109
+ Serial.println (" Found file: " + String (ent->d_name ));
105
110
closedir (dir);
106
111
return foundFile;
107
112
}
108
113
109
114
bool FlashFormatterQSPI::writeFile (const char * partition, const char * filename, const uint8_t * data, size_t size, size_t maxChunkSize)
110
115
{
116
+ Serial.println (" Writing file: " + String (filename));
111
117
String fullname = String (partition) + " /" + String (filename);
112
118
FILE* fp = fopen (fullname.c_str (), " wb" );
113
119
if (!fp) {
@@ -129,11 +135,13 @@ bool FlashFormatterQSPI::writeFile(const char* partition, const char* filename,
129
135
size_t written = ftell (fp);
130
136
fclose (fp);
131
137
138
+ Serial.println (" Wrote file: " + String (filename) + " size: " + String (written));
132
139
return written == size;
133
140
}
134
141
135
142
bool FlashFormatterQSPI::writeFlash (const uint8_t * data, size_t size, size_t offset, size_t maxChunkSize)
136
143
{
144
+ Serial.println (" Writing flash data" );
137
145
size_t chunkSize = maxChunkSize;
138
146
size_t byteCount = 0 ;
139
147
while (byteCount < size) {
@@ -145,6 +153,7 @@ bool FlashFormatterQSPI::writeFlash(const uint8_t* data, size_t size, size_t off
145
153
}
146
154
byteCount += chunkSize;
147
155
}
156
+ Serial.println (" Wrote flash data: " + String (byteCount));
148
157
return true ;
149
158
}
150
159
0 commit comments