Skip to content

Commit 74c00d0

Browse files
Jamie McCraecfriedt
authored andcommitted
boards: bl654_usb: Fix non-mcuboot builds not limiting size
This limits non-mcuboot builds to have a maximum size of 892KB to prevent code being placed over the top of the bootloader's flash area. Signed-off-by: Jamie McCrae <[email protected]>
1 parent 2a09d5e commit 74c00d0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

boards/arm/bl654_usb/Kconfig.defconfig

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BL654 USB adapter board configuration
22

3-
# Copyright (c) 2021 Laird Connectivity
3+
# Copyright (c) 2021-2022 Laird Connectivity
44
# SPDX-License-Identifier: Apache-2.0
55

66
if BOARD_BL654_USB
@@ -13,16 +13,21 @@ config BOARD
1313

1414
# Nordic nRF5 bootloader exists outside of the partitions specified in the
1515
# DTS file, so we manually override FLASH_LOAD_OFFSET to link the application
16-
# correctly, after Nordic MBR.
16+
# correctly, after Nordic MBR, and limit the maximum size to not protude into
17+
# the bootloader at the end of flash.
1718

1819
# When building MCUBoot, MCUBoot itself will select USE_DT_CODE_PARTITION
1920
# which will make it link into the correct partition specified in DTS file,
20-
# so no override is necessary.
21+
# so no override or limit is necessary.
2122

2223
config FLASH_LOAD_OFFSET
2324
default 0x1000
2425
depends on !USE_DT_CODE_PARTITION
2526

27+
config FLASH_LOAD_SIZE
28+
default 0xdf000
29+
depends on !USE_DT_CODE_PARTITION
30+
2631
if USB_DEVICE_STACK
2732

2833
config USB_UART_CONSOLE

0 commit comments

Comments
 (0)