1- #if MCUBOOT_AS_ENVIE
1+ #if MCUBOOT_APPLICATION_HOOKS
22
33#include " ota.h"
44#include " rtc.h"
1212#include " FileBlockDevice.h"
1313#include " FATFileSystem.h"
1414
15- #if MCUBOOT_ENVIE_SDCARD
15+ #if MCUBOOT_APPLICATION_SDCARD
1616#include " SDMMCBlockDevice.h"
1717#endif
1818
19- #if MCUBOOT_ENVIE_LITTLEFS
19+ #if MCUBOOT_APPLICATION_LITTLEFS
2020#include " LittleFileSystem.h"
2121#endif
2222
@@ -118,7 +118,7 @@ static void initBlockTable(void) {
118118 // block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd;
119119 BOOT_LOG_ERR (" U on IAP" );
120120 } else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
121- #if MCUBOOT_ENVIE_SDCARD
121+ #if MCUBOOT_APPLICATION_SDCARD
122122 block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new SDMMCBlockDevice ();
123123 block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd ;
124124#else
@@ -138,7 +138,7 @@ static void initBlockTable(void) {
138138 // block_info[SCRATCH_BLOCK_DEVICE].raw_bd = block_info[SECONDARY_BLOCK_DEVICE].raw_bd;
139139 BOOT_LOG_ERR (" U on IAP" );
140140 } else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
141- #if MCUBOOT_ENVIE_SDCARD
141+ #if MCUBOOT_APPLICATION_SDCARD
142142 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 );
143143 block_info[SCRATCH_BLOCK_DEVICE].log_bd = block_info[SECONDARY_BLOCK_DEVICE].log_bd ;
144144#else
@@ -180,7 +180,7 @@ static void initBlockTable(void) {
180180 /* Setup FS */
181181 if (!block_info[SECONDARY_BLOCK_DEVICE].raw_flag ) {
182182 if ((block_info[SECONDARY_BLOCK_DEVICE].storage_type & LITTLEFS_FLAG)) {
183- #if MCUBOOT_ENVIE_LITTLEFS
183+ #if MCUBOOT_APPLICATION_LITTLEFS
184184 block_info[SECONDARY_BLOCK_DEVICE].log_fs = new LittleFileSystem (" fs" );
185185#else
186186 BOOT_LOG_ERR (" LFS" );
@@ -207,7 +207,7 @@ static void initBlockTable(void) {
207207 // block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new FlashIAPBlockDevice flashIAP_bd(data_offset, update_size);
208208 BOOT_LOG_ERR (" U on IAP" );
209209 } else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
210- #if MCUBOOT_ENVIE_SDCARD
210+ #if MCUBOOT_APPLICATION_SDCARD
211211 block_info[SECONDARY_BLOCK_DEVICE].raw_bd = new SDMMCBlockDevice ();
212212#else
213213 BOOT_LOG_ERR (" SDMMC" );
@@ -221,7 +221,7 @@ static void initBlockTable(void) {
221221 if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
222222 BOOT_LOG_ERR (" S on IAP" );
223223 } else if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
224- #if MCUBOOT_ENVIE_SDCARD
224+ #if MCUBOOT_APPLICATION_SDCARD
225225 block_info[SCRATCH_BLOCK_DEVICE].raw_bd = new SDMMCBlockDevice ();
226226#else
227227 BOOT_LOG_ERR (" SDMMC" );
@@ -237,7 +237,7 @@ static void initBlockTable(void) {
237237 if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
238238 BOOT_LOG_ERR (" U on IAP" );
239239 } else if (block_info[SECONDARY_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
240- #if MCUBOOT_ENVIE_SDCARD
240+ #if MCUBOOT_APPLICATION_SDCARD
241241 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 );
242242#else
243243 BOOT_LOG_ERR (" SDMMC" );
@@ -268,7 +268,7 @@ static void initBlockTable(void) {
268268 if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & INTERNAL_FLASH_FLAG) {
269269 BOOT_LOG_ERR (" S on IAP" );
270270 } else if (block_info[SCRATCH_BLOCK_DEVICE].raw_type & SDCARD_FLAG) {
271- #if MCUBOOT_ENVIE_SDCARD
271+ #if MCUBOOT_APPLICATION_SDCARD
272272 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 );
273273#else
274274 BOOT_LOG_ERR (" SDMMC" );
@@ -297,7 +297,7 @@ static void initBlockTable(void) {
297297 /* Setup FS */
298298 if (!block_info[SECONDARY_BLOCK_DEVICE].raw_flag ) {
299299 if ((block_info[SECONDARY_BLOCK_DEVICE].storage_type & LITTLEFS_FLAG)) {
300- #if MCUBOOT_ENVIE_LITTLEFS
300+ #if MCUBOOT_APPLICATION_LITTLEFS
301301 block_info[SECONDARY_BLOCK_DEVICE].log_fs = new LittleFileSystem (" sec" );
302302#else
303303 BOOT_LOG_ERR (" LFS" );
@@ -318,7 +318,7 @@ static void initBlockTable(void) {
318318 /* Setup FS */
319319 if (!block_info[SCRATCH_BLOCK_DEVICE].raw_flag ) {
320320 if ((block_info[SCRATCH_BLOCK_DEVICE].storage_type & LITTLEFS_FLAG)) {
321- #if MCUBOOT_ENVIE_LITTLEFS
321+ #if MCUBOOT_APPLICATION_LITTLEFS
322322 block_info[SCRATCH_BLOCK_DEVICE].log_fs = new LittleFileSystem (" scr" );
323323#else
324324 BOOT_LOG_ERR (" LFS" );
@@ -338,13 +338,6 @@ static void initBlockTable(void) {
338338 }
339339}
340340
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- */
348341mbed::BlockDevice* get_secondary_bd (void ) {
349342
350343 if (!BlockTableLoaded) {
@@ -359,7 +352,6 @@ mbed::BlockDevice* get_secondary_bd(void) {
359352 }
360353}
361354
362-
363355mbed::BlockDevice* get_scratch_bd (void ) {
364356
365357 if (!BlockTableLoaded) {
0 commit comments