1
- #if MCUBOOT_AS_ENVIE
1
+ #if MCUBOOT_APPLICATION_HOOKS
2
2
3
3
#include " ota.h"
4
4
#include " rtc.h"
12
12
#include " FileBlockDevice.h"
13
13
#include " FATFileSystem.h"
14
14
15
- #if MCUBOOT_ENVIE_SDCARD
15
+ #if MCUBOOT_APPLICATION_SDCARD
16
16
#include " SDMMCBlockDevice.h"
17
17
#endif
18
18
19
- #if MCUBOOT_ENVIE_LITTLEFS
19
+ #if MCUBOOT_APPLICATION_LITTLEFS
20
20
#include " LittleFileSystem.h"
21
21
#endif
22
22
@@ -118,7 +118,7 @@ static void initBlockTable(void) {
118
118
// block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd;
119
119
BOOT_LOG_ERR (" U on IAP" );
120
120
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
121
- #if MCUBOOT_ENVIE_SDCARD
121
+ #if MCUBOOT_APPLICATION_SDCARD
122
122
block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new SDMMCBlockDevice ();
123
123
block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd ;
124
124
#else
@@ -138,7 +138,7 @@ static void initBlockTable(void) {
138
138
// block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd;
139
139
BOOT_LOG_ERR (" U on IAP" );
140
140
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
141
- #if MCUBOOT_ENVIE_SDCARD
141
+ #if MCUBOOT_APPLICATION_SDCARD
142
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 );
143
143
block_info[SCRATCH_BLOCK_DEVICE].log_bd = block_info[SECONDARY_BLOCK_DEVICE].log_bd ;
144
144
#else
@@ -180,7 +180,7 @@ static void initBlockTable(void) {
180
180
/* Setup FS */
181
181
if (!block_info[SECONDARY_BLOCK_DEVICE].raw_flag ) {
182
182
if ((block_info[SECONDARY_BLOCK_DEVICE].storage_type & LITTLEFS_FLAG)) {
183
- #if MCUBOOT_ENVIE_LITTLEFS
183
+ #if MCUBOOT_APPLICATION_LITTLEFS
184
184
block_info[SECONDARY_BLOCK_DEVICE].log_fs = new LittleFileSystem (" fs" );
185
185
#else
186
186
BOOT_LOG_ERR (" LFS" );
@@ -207,7 +207,7 @@ static void initBlockTable(void) {
207
207
// block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new FlashIAPBlockDevice flashIAP_bd(data_offset, update_size);
208
208
BOOT_LOG_ERR (" U on IAP" );
209
209
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
210
- #if MCUBOOT_ENVIE_SDCARD
210
+ #if MCUBOOT_APPLICATION_SDCARD
211
211
block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new SDMMCBlockDevice ();
212
212
#else
213
213
BOOT_LOG_ERR (" SDMMC" );
@@ -221,7 +221,7 @@ static void initBlockTable(void) {
221
221
if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
222
222
BOOT_LOG_ERR (" S on IAP" );
223
223
} else if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
224
- #if MCUBOOT_ENVIE_SDCARD
224
+ #if MCUBOOT_APPLICATION_SDCARD
225
225
block_info[SCRATCH_BLOCK_DEVICE].raw_bd = new SDMMCBlockDevice ();
226
226
#else
227
227
BOOT_LOG_ERR (" SDMMC" );
@@ -237,7 +237,7 @@ static void initBlockTable(void) {
237
237
if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
238
238
BOOT_LOG_ERR (" U on IAP" );
239
239
} else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
240
- #if MCUBOOT_ENVIE_SDCARD
240
+ #if MCUBOOT_APPLICATION_SDCARD
241
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 );
242
242
#else
243
243
BOOT_LOG_ERR (" SDMMC" );
@@ -268,7 +268,7 @@ static void initBlockTable(void) {
268
268
if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
269
269
BOOT_LOG_ERR (" S on IAP" );
270
270
} else if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
271
- #if MCUBOOT_ENVIE_SDCARD
271
+ #if MCUBOOT_APPLICATION_SDCARD
272
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 );
273
273
#else
274
274
BOOT_LOG_ERR (" SDMMC" );
@@ -297,7 +297,7 @@ static void initBlockTable(void) {
297
297
/* Setup FS */
298
298
if (!block_info[SECONDARY_BLOCK_DEVICE].raw_flag ) {
299
299
if ((block_info[SECONDARY_BLOCK_DEVICE].storage_type & LITTLEFS_FLAG)) {
300
- #if MCUBOOT_ENVIE_LITTLEFS
300
+ #if MCUBOOT_APPLICATION_LITTLEFS
301
301
block_info[SECONDARY_BLOCK_DEVICE].log_fs = new LittleFileSystem (" sec" );
302
302
#else
303
303
BOOT_LOG_ERR (" LFS" );
@@ -318,7 +318,7 @@ static void initBlockTable(void) {
318
318
/* Setup FS */
319
319
if (!block_info[SCRATCH_BLOCK_DEVICE].raw_flag ) {
320
320
if ((block_info[SCRATCH_BLOCK_DEVICE].storage_type & LITTLEFS_FLAG)) {
321
- #if MCUBOOT_ENVIE_LITTLEFS
321
+ #if MCUBOOT_APPLICATION_LITTLEFS
322
322
block_info[SCRATCH_BLOCK_DEVICE].log_fs = new LittleFileSystem (" scr" );
323
323
#else
324
324
BOOT_LOG_ERR (" LFS" );
@@ -338,13 +338,6 @@ static void initBlockTable(void) {
338
338
}
339
339
}
340
340
341
- /*
342
- * MCUBOOT_AS_ENVIE -> Secondary Block device defined by getOTAData [SDCARD, QSPI] Internal flash not supported
343
- * -> Scratch Block device defined by getOTAData [SDCARD, QSPI, FLASH]
344
- *
345
- * -> Secondary Block device on RAW QSPI @0x0000000
346
- * -> Scratch Block device on Internal flash @MCUBOOT_SCRATCH_START_ADDR
347
- */
348
341
mbed::BlockDevice* get_secondary_bd (void ) {
349
342
350
343
if (!BlockTableLoaded) {
@@ -359,7 +352,6 @@ mbed::BlockDevice* get_secondary_bd(void) {
359
352
}
360
353
}
361
354
362
-
363
355
mbed::BlockDevice* get_scratch_bd (void ) {
364
356
365
357
if (!BlockTableLoaded) {
0 commit comments