File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,6 @@ function(zephyr_mcuboot_tasks)
86
86
dt_chosen (flash_node PROPERTY "zephyr,flash" )
87
87
dt_nodelabel (slot0_flash NODELABEL "slot0_partition" REQUIRED )
88
88
dt_prop (slot_size PATH "${slot0_flash} " PROPERTY "reg" INDEX 1 REQUIRED )
89
- dt_prop (write_block_size PATH "${flash_node} " PROPERTY "write-block-size" )
90
-
91
- if (NOT write_block_size )
92
- set (write_block_size 4 )
93
- message (WARNING "slot0_partition write block size devicetree parameter is missing, assuming write block size is 4" )
94
- endif ()
95
89
96
90
# If single slot mode, or if in firmware updater mode and this is the firmware updater image,
97
91
# use slot 0 information
@@ -149,6 +143,13 @@ function(zephyr_mcuboot_tasks)
149
143
endif ()
150
144
set (imgtool_args --align 1 --load-addr ${load_address} ${imgtool_args} )
151
145
else ()
146
+ dt_prop (write_block_size PATH "${flash_node} " PROPERTY "write-block-size" )
147
+
148
+ if (NOT write_block_size )
149
+ set (write_block_size 4 )
150
+ message (WARNING "slot0_partition write block size devicetree parameter is missing, assuming write block size is 4" )
151
+ endif ()
152
+
152
153
set (imgtool_args --align ${write_block_size} ${imgtool_args} )
153
154
endif ()
154
155
You can’t perform that action at this time.
0 commit comments