Skip to content

Commit 5c67fb9

Browse files
edersondisouzanvlsianpu
authored andcommitted
boot/bootutil: Add MCUBOOT_SINGLE_APPLICATION_SLOT_RAM_LOAD mode
Following the split of RAM code, these definitions will help use it with single slot applications. Signed-off-by: Ederson de Souza <[email protected]> Signed-off-by: Tom Burdick <[email protected]>
1 parent 9f1e573 commit 5c67fb9

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

boot/bootutil/include/bootutil/boot_status.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ enum mcuboot_mode {
128128
MCUBOOT_MODE_DIRECT_XIP,
129129
MCUBOOT_MODE_DIRECT_XIP_WITH_REVERT,
130130
MCUBOOT_MODE_RAM_LOAD,
131-
MCUBOOT_MODE_FIRMWARE_LOADER
131+
MCUBOOT_MODE_FIRMWARE_LOADER,
132+
MCUBOOT_MODE_SINGLE_SLOT_RAM_LOAD,
132133
};
133134

134135
enum mcuboot_signature_type {

boot/bootutil/src/boot_record.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ int boot_save_shared_data(const struct image_header *hdr, const struct flash_are
253253
uint8_t mode = MCUBOOT_MODE_RAM_LOAD;
254254
#elif defined(MCUBOOT_FIRMWARE_LOADER)
255255
uint8_t mode = MCUBOOT_MODE_FIRMWARE_LOADER;
256+
#elif defined(MCUBOOT_SINGLE_APPLICATION_SLOT_RAM_LOAD)
257+
uint8_t mode = MCUBOOT_MODE_SINGLE_SLOT_RAM_LOAD;
256258
#else
257259
#error "Unknown mcuboot operating mode"
258260
#endif

boot/bootutil/src/bootutil_misc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ boot_write_enc_key(const struct flash_area *fap, uint8_t slot,
334334
uint32_t bootutil_max_image_size(const struct flash_area *fap)
335335
{
336336
#if defined(MCUBOOT_SWAP_USING_SCRATCH) || defined(MCUBOOT_SINGLE_APPLICATION_SLOT) || \
337-
defined(MCUBOOT_FIRMWARE_LOADER)
337+
defined(MCUBOOT_FIRMWARE_LOADER) || defined(MCUBOOT_SINGLE_APPLICATION_SLOT_RAM_LOAD)
338338
return boot_status_off(fap);
339339
#elif defined(MCUBOOT_SWAP_USING_MOVE)
340340
struct flash_sector sector;

0 commit comments

Comments
 (0)