This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Merging bootloader and application

Hello,

Information:

SEGGER Embedded studio Studio v412

Windows 10

nRF52832 on a development board.

We are attempting to merge an application with a bootloader. 

First we extract the bootloader setting with:

nrfutil.exe settings generate --family NRF52 --application "Output/Release/Exe/application.hex" --application-version 0 --bootloader-version 0 --bl-settings-version 1 bootloader_setting.hex

This does generate the expected file.

Second we run this:

mergehex --merge bootloader_setting.hex "dfu/Output/Release/Exe/dfu_fw.hex" --output bootloader_w_settings.hex

The mergehex reply: ERROR: The hex files cannot be merged since there are conflicts.

On other topics here on the forum it seem like that it should be a problem with flash/ram, and have tried to fiddle with the settings in the Linker Section Placement Macros without any luck.

This is the Linker Section Placement Macros for application and bootloader

BOOTLOADER
FLASH_PH_START=0x0
FLASH_PH_SIZE=0x80000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x10000
FLASH_START=0x73000
FLASH_SIZE=0xB000
RAM_START=0x20001FF0
RAM_SIZE=0xE010

APPLICATION
FLASH_PH_START=0x0
FLASH_PH_SIZE=0x80000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x10000
FLASH_START=0x26000
FLASH_SIZE=0x5A000
RAM_START=0x200023D8
RAM_SIZE=0xDEE8

best regards

Jesper de Fries

Parents
  • Hello,

    The settings page should not overlap with bootloader image. Have you made any changes to the default bootloader layout (i.e., Changing the address of the bootloader settings page)? Please verify that the "bootloader_settings_page" segment in flash_placement.xml looks like this:

      <MemorySegment name="bootloader_settings_page" start="0x0007F000" size="0x1000">
        <ProgramSection alignment="4" keep="Yes" load="No" name=".bootloader_settings_page" address_symbol="__start_bootloader_settings_page" end_symbol="__stop_bootloader_settings_page" start = "0x0007F000" size="0x1000" />
      </MemorySegment>

    I can also try to find the "conflict" if you can upload bootloader_setting.hex and dfu_fw.hex

    Best regards,

    Vidar 

  • we have checked the bootloader_settings_page, and it look like the post you have made. 

    Here are the files - could you please explain what you are looking for in them?

    1067.bootloader_setting.hexdfu_fw.hex

    have a nice weekend

    Jesper de Fries 

Reply Children
Related