Skip to content

Commit afeb645

Browse files
committed
correct the DFU_BL_IMAGE_MAX_SIZE
skip populate MBR_BOOTLOADER_ADDR/MBR_PARAM_PAGE_ADDR
1 parent 46adc42 commit afeb645

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/sdk11/components/libraries/bootloader_dfu/dfu_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static inline bool is_sd_existed(void)
7474
#define DFU_IMAGE_MAX_SIZE_BANKED (((DFU_IMAGE_MAX_SIZE_FULL) - \
7575
(DFU_IMAGE_MAX_SIZE_FULL % (2 * CODE_PAGE_SIZE)))/2) /**< Maximum size of an application, excluding save data from the application. */
7676

77-
#define DFU_BL_IMAGE_MAX_SIZE (BOOTLOADER_SETTINGS_ADDRESS - BOOTLOADER_REGION_START) /**< Maximum size of a bootloader, excluding save data from the current bootloader. */
77+
#define DFU_BL_IMAGE_MAX_SIZE (BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS - BOOTLOADER_REGION_START) /**< Maximum size of a bootloader, excluding save data from the current bootloader. */
7878

7979
#define DFU_BANK_0_REGION_START CODE_REGION_1_START /**< Bank 0 region start. */
8080
#define DFU_BANK_1_REGION_START (DFU_BANK_0_REGION_START + DFU_IMAGE_MAX_SIZE_BANKED) /**< Bank 1 region start. */

src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ int main(void)
155155
{
156156
// Populate Boot Address and MBR Param into MBR if not already
157157
// MBR_BOOTLOADER_ADDR/MBR_PARAM_PAGE_ADDR are used if available, else UICR registers are used
158-
// Note: skip it for now since this will prevent us to change the size of bootloader
159-
bootloader_mbr_addrs_populate();
158+
// Note: skip it for now since this will prevent us to change the size of bootloader in the future
159+
// bootloader_mbr_addrs_populate();
160160

161161
// SD is already Initialized in case of BOOTLOADER_DFU_OTA_MAGIC
162162
bool sd_inited = (NRF_POWER->GPREGRET == DFU_MAGIC_OTA_APPJUM);

0 commit comments

Comments
 (0)