Skip to content

Commit d20e15f

Browse files
erwangocfriedt
authored andcommitted
cmake: mcuboot: ramload: Expect write-block_size only in revert case
Since we're not yet at a consensus on where 'write-block-size' should be set, make the adjustable alignment expected only in the revert case to restore functionality on the 'normal' case. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 447c3fb commit d20e15f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/mcuboot.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ function(zephyr_mcuboot_tasks)
142142
dt_reg_addr(slot1_partition_address PATH ${slot1_partition})
143143

144144
dt_prop(write_block_size PATH "${flash_node}" PROPERTY "write-block-size")
145-
set(imgtool_args --align ${write_block_size} --load-addr ${chosen_ram_address} ${imgtool_args})
145+
if(CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD)
146+
set(imgtool_args --align 1 --load-addr ${chosen_ram_address} ${imgtool_args})
147+
else() # CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD_WITH_REVERT
148+
set(imgtool_args --align ${write_block_size} --load-addr ${chosen_ram_address} ${imgtool_args})
149+
endif()
146150
set(imgtool_args_alt_slot ${imgtool_args} --hex-addr ${slot1_partition_address})
147151
set(imgtool_args ${imgtool_args} --hex-addr ${slot0_partition_address})
148152
elseif(CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP_RAM_LOAD)

0 commit comments

Comments
 (0)