File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -492,15 +492,24 @@ if(SYSBUILD)
492
492
endif ()
493
493
494
494
math (EXPR required_size "${key_size} + ${boot_magic_size} + ${boot_swap_data_size} + ${boot_status_data_size} + ${boot_tlv_estimate} " )
495
-
496
495
align_up (${required_size} ${erase_size} required_size )
497
496
497
+ if (CONFIG_SINGLE_APPLICATION_SLOT OR CONFIG_BOOT_FIRMWARE_LOADER )
498
+ set (required_upgrade_size "0" )
499
+ else ()
500
+ math (EXPR required_upgrade_size "${boot_magic_size} + ${boot_swap_data_size} + ${boot_status_data_size} " )
501
+ align_up (${required_upgrade_size} ${erase_size} required_upgrade_size )
502
+ endif ()
503
+
498
504
if (CONFIG_BOOT_SWAP_USING_MOVE )
499
505
math (EXPR required_size "${required_size} + ${erase_size} " )
506
+ math (EXPR required_upgrade_size "${required_upgrade_size} + ${erase_size} " )
500
507
endif ()
501
508
else ()
502
509
set (required_size 0 )
510
+ set (required_upgrade_size 0 )
503
511
endif ()
504
512
505
513
set (mcuboot_image_footer_size ${required_size} CACHE INTERNAL "Estimated MCUboot image trailer size" FORCE )
514
+ set (mcuboot_image_upgrade_footer_size ${required_upgrade_size} CACHE INTERNAL "Estimated MCUboot update image trailer size" FORCE )
506
515
endif ()
Original file line number Diff line number Diff line change @@ -31,9 +31,12 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_post_image_cmake)
31
31
32
32
if ("${app_type} " STREQUAL "MAIN" )
33
33
sysbuild_get (mcuboot_image_footer_size IMAGE mcuboot CACHE )
34
+ sysbuild_get (mcuboot_image_upgrade_footer_size IMAGE mcuboot CACHE )
34
35
math (EXPR mcuboot_image_footer_size "${mcuboot_image_footer_size} " OUTPUT_FORMAT HEXADECIMAL )
36
+ math (EXPR mcuboot_image_upgrade_footer_size "${mcuboot_image_upgrade_footer_size} " OUTPUT_FORMAT HEXADECIMAL )
35
37
36
38
set_property (TARGET ${image} APPEND_STRING PROPERTY CONFIG "CONFIG_ROM_END_OFFSET=${mcuboot_image_footer_size} \n " )
39
+ set_property (TARGET ${image} APPEND_STRING PROPERTY CONFIG "CONFIG_MCUBOOT_UPDATE_FOOTER_SIZE=${mcuboot_image_upgrade_footer_size} \n " )
37
40
return ()
38
41
endif ()
39
42
endforeach ()
You can’t perform that action at this time.
0 commit comments