Skip to content

Commit 173f785

Browse files
brudleyberendo
authored andcommitted
merge #29 :: Add mcuboot module to west.yml
* wip mcuboot zephyr stuff * remove mcuboot from zephyr managed modules * Update SHA for mcuboot
1 parent 9946b79 commit 173f785

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

arch/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,22 +178,22 @@ config SRAM_BASE_ADDRESS
178178
/chosen/zephyr,sram in devicetree. The user should generally avoid
179179
changing it via menuconfig or in configuration files.
180180

181-
if ARC || ARM || ARM64 || NIOS2 || X86
181+
if ARC || ARM || ARM64 || NIOS2 || RISCV || X86
182182

183183
# Workaround for not being able to have commas in macro arguments
184184
DT_CHOSEN_Z_FLASH := zephyr,flash
185185

186186
config FLASH_SIZE
187187
int "Flash Size in kB"
188-
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0,K) if (XIP && (ARM ||ARM64)) || !ARM
188+
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0,K) if (XIP && (ARM ||ARM64 || RISCV)) || !ARM
189189
help
190190
This option specifies the size of the flash in kB. It is normally set by
191191
the board's defconfig file and the user should generally avoid modifying
192192
it via the menu configuration.
193193

194194
config FLASH_BASE_ADDRESS
195195
hex "Flash Base Address"
196-
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)) if (XIP && (ARM || ARM64)) || !ARM
196+
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)) if (XIP && (ARM || ARM64 || RISCV)) || !ARM
197197
help
198198
This option specifies the base address of the flash on the board. It is
199199
normally set by the board's defconfig file and the user should generally

include/devicetree/zephyr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
#define DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL \
6464
DT_LABEL(DT_CHOSEN(zephyr_flash_controller))
6565
#endif
66+
//DT_LABEL(DT_CHOSEN(scorpio_flash_controller))
6667

6768
#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_can_primary), label)
6869
#define DT_CHOSEN_ZEPHYR_CAN_PRIMARY_LABEL \

subsys/dfu/boot/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ zephyr_library()
55
zephyr_library_sources(mcuboot.c)
66
zephyr_library_sources_ifdef(CONFIG_MCUBOOT_SHELL mcuboot_shell.c)
77
zephyr_library_link_libraries(MCUBOOT_BOOTUTIL)
8+
zephyr_include_directories(../../../../modules/mcuboot/boot/bootutil/include)
9+
zephyr_include_directories(../../../../modules/mcuboot/boot/zephyr/include)
810
endif()

subsys/dfu/img_util/flash_img.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
#endif
3030
#endif /* CONFIG_TRUSTED_EXECUTION_NONSECURE */
3131

32-
#define FLASH_WRITE_BLOCK_SIZE \
33-
DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size)
32+
#define FLASH_WRITE_BLOCK_SIZE 512
33+
// DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size)
3434

3535
BUILD_ASSERT((CONFIG_IMG_BLOCK_BUF_SIZE % FLASH_WRITE_BLOCK_SIZE == 0),
3636
"CONFIG_IMG_BLOCK_BUF_SIZE is not a multiple of "

0 commit comments

Comments
 (0)