mirror of
https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX.git
synced 2026-10-22 15:23:13 +00:00
correct the DFU_BL_IMAGE_MAX_SIZE
skip populate MBR_BOOTLOADER_ADDR/MBR_PARAM_PAGE_ADDR
This commit is contained in:
1 parent
46adc425a4
commit
afeb645a87
2 files changed
+3
-3
No files matched your search
@@ -74,7 +74,7 @@ static inline bool is_sd_existed(void)
|
||||
#define DFU_IMAGE_MAX_SIZE_BANKED (((DFU_IMAGE_MAX_SIZE_FULL) - \
|
||||
(DFU_IMAGE_MAX_SIZE_FULL % (2 * CODE_PAGE_SIZE)))/2) /**< Maximum size of an application, excluding save data from the application. */
|
||||
|
||||
#define DFU_BL_IMAGE_MAX_SIZE (BOOTLOADER_SETTINGS_ADDRESS - BOOTLOADER_REGION_START) /**< Maximum size of a bootloader, excluding save data from the current bootloader. */
|
||||
#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. */
|
||||
|
||||
#define DFU_BANK_0_REGION_START CODE_REGION_1_START /**< Bank 0 region start. */
|
||||
#define DFU_BANK_1_REGION_START (DFU_BANK_0_REGION_START + DFU_IMAGE_MAX_SIZE_BANKED) /**< Bank 1 region start. */
|
||||
|
||||
+2
-2
@@ -155,8 +155,8 @@ int main(void)
|
||||
{
|
||||
// Populate Boot Address and MBR Param into MBR if not already
|
||||
// MBR_BOOTLOADER_ADDR/MBR_PARAM_PAGE_ADDR are used if available, else UICR registers are used
|
||||
// Note: skip it for now since this will prevent us to change the size of bootloader
|
||||
bootloader_mbr_addrs_populate();
|
||||
// Note: skip it for now since this will prevent us to change the size of bootloader in the future
|
||||
// bootloader_mbr_addrs_populate();
|
||||
|
||||
// SD is already Initialized in case of BOOTLOADER_DFU_OTA_MAGIC
|
||||
bool sd_inited = (NRF_POWER->GPREGRET == DFU_MAGIC_OTA_APPJUM);
|
||||
|
||||
Reference in new issue
Block a user