Skip to content

Commit

Permalink
boot/bootutil: Add MCUBOOT_SINGLE_APPLICATION_SLOT_RAM_LOAD mode
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
edersondisouza authored and nvlsianpu committed Oct 25, 2024
1 parent 9f1e573 commit 5c67fb9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion boot/bootutil/include/bootutil/boot_status.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ enum mcuboot_mode {
MCUBOOT_MODE_DIRECT_XIP,
MCUBOOT_MODE_DIRECT_XIP_WITH_REVERT,
MCUBOOT_MODE_RAM_LOAD,
MCUBOOT_MODE_FIRMWARE_LOADER
MCUBOOT_MODE_FIRMWARE_LOADER,
MCUBOOT_MODE_SINGLE_SLOT_RAM_LOAD,
};

enum mcuboot_signature_type {
Expand Down
2 changes: 2 additions & 0 deletions boot/bootutil/src/boot_record.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ int boot_save_shared_data(const struct image_header *hdr, const struct flash_are
uint8_t mode = MCUBOOT_MODE_RAM_LOAD;
#elif defined(MCUBOOT_FIRMWARE_LOADER)
uint8_t mode = MCUBOOT_MODE_FIRMWARE_LOADER;
#elif defined(MCUBOOT_SINGLE_APPLICATION_SLOT_RAM_LOAD)
uint8_t mode = MCUBOOT_MODE_SINGLE_SLOT_RAM_LOAD;
#else
#error "Unknown mcuboot operating mode"
#endif
Expand Down
2 changes: 1 addition & 1 deletion boot/bootutil/src/bootutil_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ boot_write_enc_key(const struct flash_area *fap, uint8_t slot,
uint32_t bootutil_max_image_size(const struct flash_area *fap)
{
#if defined(MCUBOOT_SWAP_USING_SCRATCH) || defined(MCUBOOT_SINGLE_APPLICATION_SLOT) || \
defined(MCUBOOT_FIRMWARE_LOADER)
defined(MCUBOOT_FIRMWARE_LOADER) || defined(MCUBOOT_SINGLE_APPLICATION_SLOT_RAM_LOAD)
return boot_status_off(fap);
#elif defined(MCUBOOT_SWAP_USING_MOVE)
struct flash_sector sector;
Expand Down

0 comments on commit 5c67fb9

Please sign in to comment.