nrf52805 file merge error (SD/appl/bootloader/settings)


Hello,

I'm developing using below condition.

- SOC : nRF52805
- SD : s112_nrf52_7.2.0_softdevice.hex
- SDK : nRF5_SDK_17.1.0_ddde560
- DK : PCA10040
- compiler : IAR 9.40.1

I am creating a DFU package and SD/appl/bootloader/setting merge file.

An error occurred during file merging.

I would like to inquire about this

Also, when creating the package file in Step 8 and the setting file in Step 9 below,

please check that the information such as version matches that of the nRF52805.

Thanks.

- SD : s112_nrf52_7.2.0_softdevice.hex

- appl : ble_app_proximity.hex (range : 0x19000-0x27FFF)

 -> modified and no problem in action.

  /*-Memory Regions-*/
  define symbol __ICFEDIT_region_ROM_start__ = 0x19000;
  define symbol __ICFEDIT_region_ROM_end__ = 0x27fff; // old:0x2ffff;

  ielftool.exe --bin=0x19000-0x27FFF "$PROJ_DIR$\Debug\Exe\ble_app_proximity.out" "$PROJ_DIR$\Debug\Exe\ble_app_proximity.bin"

- bootloader : secure_bootloader_ble.hex (range : 0x28000-0x2DFFF)

 -> not modified, just built

 /*-Memory Regions-*/
 define symbol __ICFEDIT_region_ROM_start__ = 0x28000;
 define symbol __ICFEDIT_region_ROM_end__ = 0x2dfff;

 ielftool.exe --bin=0x28000-0x2DFFF "$PROJ_DIR$\Debug\Exe\secure_bootloader_ble.out" "$PROJ_DIR$\Debug\Exe\secure_bootloader_ble.bin"

- DFU setting file : settings.hex

DFU package file : walnut_ble_pkg_0.01.zip

- key : key.pem

-- command ---

@REM 7. build
copy %BLE%\Debug\Exe\ble_app_proximity.bin .
%JFLASH%\JFlash.exe -open ble_app_proximity.bin -saveas ble_app_proximity.hex -exit

copy %BOOT%\Debug\Exe\secure_bootloader_ble.bin .
%JFLASH%\JFlash.exe -open secure_bootloader_ble.bin -saveas secure_bootloader_ble.hex -exit

@REM 8. make application package files

nrfutil pkg generate --hw-version 52 --sd-req 0x0103 --application-version %APP_VER% --application ble_app_proximity.hex --key-file key.pem walnut_ble_pkg_%FW_VER%.zip

 

@REM 9. make bootloader settings file

nrfutil settings generate --family NRF52810 --application ble_app_proximity.hex --application-version %APP_VER% --bootloader-version 1 --bl-settings-version 2 settings.hex

 

@REM 10. merge hex files

mergehex -m s112_nrf52_7.2.0_softdevice.hex ble_app_proximity.hex secure_bootloader_ble.hex settings.hex -o walnut_ble_%FW_VER%.hex

-- log ---

D:\projects_temp\p4_flex\walnut\binary_ble>mergehex -m s112_nrf52_7.2.0_softdevice.hex ble_app_proximity.hex secure_bootloader_ble.hex settings.hex -o walnut_ble_0.01.hex

Parsing input files.

Merging file "s112_nrf52_7.2.0_softdevice.hex" into output.

Merging file "ble_app_proximity.hex" into output.2526.file.zip

Overlapping segments detected at address 0.ERROR: The hex files cannot be merged since there are conflicts.

 

  • Hi

    From looking at your .hex files it seems the starting address of both the ble_app_proximity.hex and the secure_bootloader_ble.hex files are at 0x0000. I'm not an IAR expert, but I think you need to set the start address in the flash_placement.xml file or similar placement settings option in IAR. There are multiple previous cases on this already on DevZone, so please see through these cases: https://devzone.nordicsemi.com/search?q=bootloader%20starting%20address 

    Best regards,

    Simon

  • The part where the starting address of the application/bootloader area was incorrect was corrected.

    After merging, an error like the screen below occurs.

    All erase is performed before flash.

    I add the sdk_config.h file, command used when merging with the address area currently in use below.

    1207.sdk_config.h

    I would like to get help on which part I should check.

    /*-application Regions-*/
    define symbol __ICFEDIT_region_ROM_start__ = 0x19000;
    define symbol __ICFEDIT_region_ROM_end__ = 0x27fff; // old:0x2ffff;

    /*-bootloader Regions-*/
    define symbol __ICFEDIT_region_ROM_start__ = 0x28000;
    define symbol __ICFEDIT_region_ROM_end__ = 0x2dfff;

    @REM 8. make application package files
    nrfutil pkg generate --hw-version 52 --sd-req 0x0103 --application-version %APP_VER% --application ble_app_proximity.hex --key-file key.pem walnut_ble_pkg_%FW_VER%.zip


    @REM 9. make bootloader settings file
    nrfutil settings generate --family NRF52810 --application ble_app_proximity.hex --application-version %APP_VER% --bootloader-version 1 --bl-settings-version 2 settings.hex


    @REM 10. merge hex files
    mergehex -m s112_nrf52_7.2.0_softdevice.hex ble_app_proximity.hex secure_bootloader_ble.hex settings.hex -o walnut_ble_%FW_VER%.hex

  • Hi

    So it seems the application starts at least and now it just seems to be an issue with your application running. There are quite a few cases with this error reported already in the DevZone so I suggest checking out some of those. 

    https://devzone.nordicsemi.com/search?q=NRF_ERROR_STORAGE_FULL 

    It seems like you might need to restore the UICR registers used by your app/bootloader perhaps as described in this case specifically.

    Best regards,

    Simon

Related