@@ -52,6 +52,10 @@ static void loadOTAData(void) {
52
52
block_info[SCRATCH_BLOCK_DEVICE].data_offset = RTCGetBKPRegister (RTC_BKP_DR5);
53
53
block_info[SCRATCH_BLOCK_DEVICE].update_size = RTCGetBKPRegister (RTC_BKP_DR6);
54
54
BOOT_LOG_INF (" Custom OTA data" );
55
+
56
+ /* Print loaded Data */
57
+ BOOT_LOG_INF (" Secondary [%d] [%d]" , block_info[SECONDARY_BLOCK_DEVICE].storage_type , block_info[SECONDARY_BLOCK_DEVICE].raw_type );
58
+ BOOT_LOG_INF (" Scratch [%d] [%d]" , block_info[SCRATCH_BLOCK_DEVICE].storage_type , block_info[SCRATCH_BLOCK_DEVICE].raw_type );
55
59
} else {
56
60
#if ALL_IN_SD
57
61
block_info[SECONDARY_BLOCK_DEVICE].storage_type = SD_FATFS;
@@ -98,14 +102,6 @@ static void loadOTAData(void) {
98
102
#endif
99
103
BOOT_LOG_INF (" Default OTA data" );
100
104
}
101
-
102
- /* Print loaded Data */
103
- BOOT_LOG_INF (" Secondary BlockDevice" );
104
- BOOT_LOG_INF (" Storage type: %d" , block_info[SECONDARY_BLOCK_DEVICE].storage_type );
105
- BOOT_LOG_INF (" Raw type: %d" , block_info[SECONDARY_BLOCK_DEVICE].raw_type );
106
- BOOT_LOG_INF (" Scratch BlockDevice" );
107
- BOOT_LOG_INF (" Storage type: %d" , block_info[SCRATCH_BLOCK_DEVICE].storage_type );
108
- BOOT_LOG_INF (" Raw type: %d" , block_info[SCRATCH_BLOCK_DEVICE].raw_type );
109
105
return ;
110
106
}
111
107
@@ -120,52 +116,52 @@ static void initBlockTable(void) {
120
116
if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
121
117
// block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new FlashIAPBlockDevice flashIAP_bd(data_offset, update_size);
122
118
// block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd;
123
- BOOT_LOG_ERR (" Secondary block device on internal flash not supported " );
119
+ BOOT_LOG_ERR (" U on IAP " );
124
120
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
125
121
#if MCUBOOT_ENVIE_SDCARD
126
122
block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new SDMMCBlockDevice ();
127
123
block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd ;
128
124
#else
129
- BOOT_LOG_ERR (" SDMMCBlockDevice not supported " );
125
+ BOOT_LOG_ERR (" SDMMC " );
130
126
#endif
131
127
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & QSPI_FLASH_FLAG) {
132
128
block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new QSPIFBlockDevice (PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000 );
133
129
block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd ;
134
130
} else {
135
- BOOT_LOG_ERR (" Cannot configure secondary/scratch raw block device " );
131
+ BOOT_LOG_ERR (" Config " );
136
132
}
137
133
138
134
/* Setup sliced block devices */
139
135
if (block_info[SECONDARY_BLOCK_DEVICE].raw_flag ) {
140
136
if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
141
137
// block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new FlashIAPBlockDevice flashIAP_bd(data_offset, update_size);
142
138
// block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd;
143
- BOOT_LOG_ERR (" Secondary block device on internal flash not supported " );
139
+ BOOT_LOG_ERR (" U on IAP " );
144
140
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
145
141
#if MCUBOOT_ENVIE_SDCARD
146
142
block_info[SECONDARY_BLOCK_DEVICE].log_bd = new SlicingBlockDevice (block_info[SECONDARY_BLOCK_DEVICE].raw_bd , block_info[SECONDARY_BLOCK_DEVICE].data_offset , block_info[SECONDARY_BLOCK_DEVICE].update_size );
147
143
block_info[SCRATCH_BLOCK_DEVICE].log_bd = block_info[SECONDARY_BLOCK_DEVICE].log_bd ;
148
144
#else
149
- BOOT_LOG_ERR (" SDMMCBlockDevice not supported " );
145
+ BOOT_LOG_ERR (" SDMMC " );
150
146
#endif
151
147
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & QSPI_FLASH_FLAG) {
152
148
block_info[SECONDARY_BLOCK_DEVICE].log_bd = new SlicingBlockDevice (block_info[SECONDARY_BLOCK_DEVICE].raw_bd , block_info[SECONDARY_BLOCK_DEVICE].data_offset , block_info[SECONDARY_BLOCK_DEVICE].update_size );
153
149
block_info[SCRATCH_BLOCK_DEVICE].log_bd = block_info[SECONDARY_BLOCK_DEVICE].log_bd ;
154
150
} else {
155
- BOOT_LOG_ERR (" Cannot configure secondary/scratch raw block device " );
151
+ BOOT_LOG_ERR (" Config " );
156
152
}
157
153
} else
158
154
159
155
/* Setup MBR device */
160
156
if (block_info[SECONDARY_BLOCK_DEVICE].mbr_flag ) {
161
157
/* If using the same underlying block device configuration must be the same */
162
158
if (block_info[SECONDARY_BLOCK_DEVICE].storage_type != block_info[SCRATCH_BLOCK_DEVICE].storage_type ) {
163
- BOOT_LOG_ERR (" Secondary and Scratch storage type must be the same " );
159
+ BOOT_LOG_ERR (" BD U!S " );
164
160
}
165
161
166
162
/* If using the same underlying block device mbr partition must be the same */
167
163
if (block_info[SECONDARY_BLOCK_DEVICE].data_offset != block_info[SCRATCH_BLOCK_DEVICE].data_offset ) {
168
- BOOT_LOG_ERR (" Secondary and Scratch mbr partition must be the same " );
164
+ BOOT_LOG_ERR (" MBR U!S " );
169
165
}
170
166
171
167
block_info[SECONDARY_BLOCK_DEVICE].log_bd = new MBRBlockDevice (block_info[SECONDARY_BLOCK_DEVICE].raw_bd , block_info[SECONDARY_BLOCK_DEVICE].data_offset );
@@ -174,7 +170,7 @@ static void initBlockTable(void) {
174
170
/* Initialize block device */
175
171
err = block_info[SECONDARY_BLOCK_DEVICE].log_bd ->init ();
176
172
if (err) {
177
- BOOT_LOG_ERR (" Error initializing common mbr device " );
173
+ BOOT_LOG_ERR (" Init " );
178
174
}
179
175
} else {
180
176
block_info[SECONDARY_BLOCK_DEVICE].log_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd ;
@@ -187,7 +183,7 @@ static void initBlockTable(void) {
187
183
#if MCUBOOT_ENVIE_LITTLEFS
188
184
block_info[SECONDARY_BLOCK_DEVICE].log_fs = new LittleFileSystem (" fs" );
189
185
#else
190
- BOOT_LOG_ERR (" LittleFileSystem not supported " );
186
+ BOOT_LOG_ERR (" LFS " );
191
187
#endif
192
188
} else {
193
189
block_info[SECONDARY_BLOCK_DEVICE].log_fs = new FATFileSystem (" fs" );
@@ -197,7 +193,7 @@ static void initBlockTable(void) {
197
193
198
194
err = block_info[SECONDARY_BLOCK_DEVICE].log_fs ->mount (block_info[SECONDARY_BLOCK_DEVICE].log_bd );
199
195
if (err) {
200
- BOOT_LOG_ERR (" Error mounting fs on common mbr device " );
196
+ BOOT_LOG_ERR (" Mount " );
201
197
}
202
198
203
199
/* Setup FileBlockDevice */
@@ -209,47 +205,47 @@ static void initBlockTable(void) {
209
205
/* Declare raw block devices */
210
206
if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
211
207
// block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new FlashIAPBlockDevice flashIAP_bd(data_offset, update_size);
212
- BOOT_LOG_ERR (" Secondary block device on internal flash not supported " );
208
+ BOOT_LOG_ERR (" U on IAP " );
213
209
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
214
210
#if MCUBOOT_ENVIE_SDCARD
215
211
block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new SDMMCBlockDevice ();
216
212
#else
217
- BOOT_LOG_ERR (" SDMMCBlockDevice not supported " );
213
+ BOOT_LOG_ERR (" SDMMC " );
218
214
#endif
219
215
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & QSPI_FLASH_FLAG) {
220
216
block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new QSPIFBlockDevice (PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000 );
221
217
} else {
222
- BOOT_LOG_ERR (" Cannot configure secodary raw block device " );
218
+ BOOT_LOG_ERR (" U config " );
223
219
}
224
220
225
221
if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
226
- BOOT_LOG_ERR (" Scratch block device on internal flash not supported " );
222
+ BOOT_LOG_ERR (" S on IAP " );
227
223
} else if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
228
224
#if MCUBOOT_ENVIE_SDCARD
229
225
block_info[SCRATCH_BLOCK_DEVICE].raw_bd = new SDMMCBlockDevice ();
230
226
#else
231
- BOOT_LOG_ERR (" SDMMCBlockDevice not supported " );
227
+ BOOT_LOG_ERR (" SDMMC " );
232
228
#endif
233
229
} else if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & QSPI_FLASH_FLAG) {
234
230
block_info[SCRATCH_BLOCK_DEVICE].raw_bd = new QSPIFBlockDevice (PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000 );
235
231
} else {
236
- BOOT_LOG_ERR (" Cannot configure scratchraw block device " );
232
+ BOOT_LOG_ERR (" S config " );
237
233
}
238
234
239
235
/* Setup Raw sliced devices */
240
236
if (block_info[SECONDARY_BLOCK_DEVICE].raw_flag ) {
241
237
if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
242
- BOOT_LOG_ERR (" Secondary block device on internal flash not supported " );
238
+ BOOT_LOG_ERR (" U on IAP " );
243
239
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
244
240
#if MCUBOOT_ENVIE_SDCARD
245
241
block_info[SECONDARY_BLOCK_DEVICE].log_bd = new SlicingBlockDevice (block_info[SECONDARY_BLOCK_DEVICE].raw_bd , block_info[SECONDARY_BLOCK_DEVICE].data_offset , block_info[SECONDARY_BLOCK_DEVICE].update_size );
246
242
#else
247
- BOOT_LOG_ERR (" SDMMCBlockDevice not supported " );
243
+ BOOT_LOG_ERR (" SDMMC " );
248
244
#endif
249
245
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & QSPI_FLASH_FLAG) {
250
246
block_info[SECONDARY_BLOCK_DEVICE].log_bd = new SlicingBlockDevice (block_info[SECONDARY_BLOCK_DEVICE].raw_bd , block_info[SECONDARY_BLOCK_DEVICE].data_offset , block_info[SECONDARY_BLOCK_DEVICE].update_size );
251
247
} else {
252
- BOOT_LOG_ERR (" Cannot configure secodary raw block device " );
248
+ BOOT_LOG_ERR (" U config " );
253
249
}
254
250
} else
255
251
@@ -261,7 +257,7 @@ static void initBlockTable(void) {
261
257
/* Initialize block device */
262
258
int err = block_info[SECONDARY_BLOCK_DEVICE].log_bd ->init ();
263
259
if (err) {
264
- BOOT_LOG_ERR (" Error initializing secondary mbr device " );
260
+ BOOT_LOG_ERR (" Init U MBR " );
265
261
}
266
262
} else {
267
263
block_info[SECONDARY_BLOCK_DEVICE].log_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd ;
@@ -270,17 +266,17 @@ static void initBlockTable(void) {
270
266
/* Setup Raw sliced devices */
271
267
if (block_info[SCRATCH_BLOCK_DEVICE].raw_flag ) {
272
268
if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
273
- BOOT_LOG_ERR (" Scratch block device on internal flash not supported " );
269
+ BOOT_LOG_ERR (" S on IAP " );
274
270
} else if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
275
271
#if MCUBOOT_ENVIE_SDCARD
276
272
block_info[SCRATCH_BLOCK_DEVICE].log_bd = new SlicingBlockDevice (block_info[SCRATCH_BLOCK_DEVICE].raw_bd , block_info[SCRATCH_BLOCK_DEVICE].data_offset , block_info[SCRATCH_BLOCK_DEVICE].update_size );
277
273
#else
278
- BOOT_LOG_ERR (" SDMMCBlockDevice not supported " );
274
+ BOOT_LOG_ERR (" SDMMC " );
279
275
#endif
280
276
} else if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & QSPI_FLASH_FLAG) {
281
277
block_info[SCRATCH_BLOCK_DEVICE].log_bd = new SlicingBlockDevice (block_info[SCRATCH_BLOCK_DEVICE].raw_bd , block_info[SCRATCH_BLOCK_DEVICE].data_offset , block_info[SCRATCH_BLOCK_DEVICE].update_size );
282
278
} else {
283
- BOOT_LOG_ERR (" Cannot configure scratch raw block device " );
279
+ BOOT_LOG_ERR (" S config " );
284
280
}
285
281
} else
286
282
@@ -292,7 +288,7 @@ static void initBlockTable(void) {
292
288
/* Initialize block device */
293
289
err = block_info[SCRATCH_BLOCK_DEVICE].log_bd ->init ();
294
290
if (err) {
295
- BOOT_LOG_ERR (" Error initializing scratch mbr device " );
291
+ BOOT_LOG_ERR (" Init S MBR " );
296
292
}
297
293
} else {
298
294
block_info[SCRATCH_BLOCK_DEVICE].log_bd = block_info[SCRATCH_BLOCK_DEVICE].raw_bd ;
@@ -304,15 +300,15 @@ static void initBlockTable(void) {
304
300
#if MCUBOOT_ENVIE_LITTLEFS
305
301
block_info[SECONDARY_BLOCK_DEVICE].log_fs = new LittleFileSystem (" sec" );
306
302
#else
307
- BOOT_LOG_ERR (" LittleFileSystem not supported " );
303
+ BOOT_LOG_ERR (" LFS " );
308
304
#endif
309
305
} else {
310
306
block_info[SECONDARY_BLOCK_DEVICE].log_fs = new FATFileSystem (" sec" );
311
307
}
312
308
313
309
err = block_info[SECONDARY_BLOCK_DEVICE].log_fs ->mount (block_info[SECONDARY_BLOCK_DEVICE].log_bd );
314
310
if (err) {
315
- BOOT_LOG_ERR (" Error mounting secondary fs on common log device " );
311
+ BOOT_LOG_ERR (" Mount U on LOG " );
316
312
}
317
313
318
314
/* Setup FileBlockDevice */
@@ -325,15 +321,15 @@ static void initBlockTable(void) {
325
321
#if MCUBOOT_ENVIE_LITTLEFS
326
322
block_info[SCRATCH_BLOCK_DEVICE].log_fs = new LittleFileSystem (" scr" );
327
323
#else
328
- BOOT_LOG_ERR (" LittleFileSystem not supported " );
324
+ BOOT_LOG_ERR (" LFS " );
329
325
#endif
330
326
} else {
331
327
block_info[SCRATCH_BLOCK_DEVICE].log_fs = new FATFileSystem (" scr" );
332
328
}
333
329
334
330
err = block_info[SCRATCH_BLOCK_DEVICE].log_fs ->mount (block_info[SCRATCH_BLOCK_DEVICE].log_bd );
335
331
if (err) {
336
- BOOT_LOG_ERR (" Error mounting scratch fs on common log device " );
332
+ BOOT_LOG_ERR (" Mount S on LOG " );
337
333
}
338
334
339
335
/* Setup FileBlockDevice */
0 commit comments