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

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

I use:

SDK16,nrf52832,python27

application: nRF5_SDK_16.0.0_98a08e2\examples\ble_peripheral\ble_app_buttonless_dfu

bootloader: nRF5_SDK_16.0.0_98a08e2\examples\dfu\secure_bootloader\pca10040_s132_ble_debug

sd:s132_nrf52_7.0.1_softdevice.hex

Question 1:

This is only required for bootloaders from nRF5 SDK 15.1 and newer.

Question 2:

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

cd ../
nrfutil settings generate --family NRF52 --application test/buttonless.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 test/settings_buttonless_s132.hex
pause 
cd ../
mergehex.exe -m test/s132_nrf52_7.0.1_softdevice.hex test/buttonless.hex -o test/sd_buttonless_s132.hex  

mergehex.exe -m test/sd_buttonless_s132.hex  test/bootloade.hex -o test/sd_bt_buttonless_s132.hex

mergehex.exe -m test/sd_bt_buttonless_s132.hex test/settings_buttonless_s132.hex -o test/all_buttonless_s130.hex
pause 
bootloade.hexbuttonless.hex

  • Hi John, 

    1. I don't understand your question. The bootloader setting backup is only needed from SDK v15.1 

    2. Which compiler did you use ? Did you change the IROM1 size of the bootloader ? I can see that the bootloader.hex file has some code in address 0x7E000 which it shouldn't. If the bootloader too big to fit in from address 0x72000 you should move it to address 0x71000 before increasing the max size for IROM1. 

  • Hi Hung:

    Which compiler did you use ?---------SES

    Did you change the IROM1 size of the bootloader ?------Only dfu_public_key.c

    Use bootloader: nRF5_SDK_16.0.0_98a08e2\examples\dfu\secure_bootloader\pca10040_s132_ble_debug 

    /* This file was automatically generated by nrfutil on 2020-03-09 (YY-MM-DD) at 12:00:42 */
    
    #include "stdint.h"
    #include "compiler_abstraction.h"
    
    /** @brief Public key used to verify DFU images */
    __ALIGN(4) const uint8_t pk[64] =
    {
        0x56, 0x04, 0xc9, 0x0e, 0x8b, 0x02, 0xf8, 0xa1, 0xf6, 0x83, 0xed, 0xc8, 0x6b, 0x18, 0xa7, 0x71, 0xa8, 0x08, 0xfa, 0x18, 0x7d, 0x70, 0x02, 0x7a, 0xc1, 0xa5, 0x53, 0x24, 0x30, 0xac, 0xd2, 0xbd, 
        0x29, 0x69, 0x3d, 0xcb, 0x80, 0x5d, 0x6c, 0x22, 0xe3, 0x32, 0x14, 0x90, 0x8f, 0x89, 0x0e, 0xcc, 0x67, 0x2e, 0x26, 0xa1, 0x8c, 0xc6, 0xad, 0x76, 0x1e, 0xfd, 0xbf, 0xfe, 0xb1, 0xd7, 0x5a, 0xa3
    };
    

    Use nrftil: 

    nrfutil version 5.2.0

  • Please move the bootloader FLASH_START  to address 0x71000 instead of 0x72000. (in linker - common project setting)

Related