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

Conflict error with mergehex command

Hello

I am using SDK12.3 on nRF51822 chip using Keil V5 on windows 10.

I am using experimental_ble_app_buttonless_dfu example and bootloader_secure example.

They both work as expected.

Now I want to generate a bootloader merged that contains the App settings with this command

nrfutil settings generate --family NRF51 --application APP\nRF51_x_x_x.hex --application-version 111 --bootloader-version 10 --bl-settings-version 1 BL_Settings\BL_settings.hex

The BL_settings.hex is generated. then I used the command below to merge the BL with BL_settings.hex

mergehex -m BL\nRF51_BL_0_1_0.hex BL_Settings\BL_settings.hex -o BL_Merged\BL_merged.hex

but, I got an error : ERROR: The hex files cannot be merged since there are conflicts.

I investigate the problem and I found out that the last address in the BL hex file is F770 ( :10F7700000100000000C0400A9CB030000000000F2 ) .

The BL_settings.hex content is : 

:020000040003F7
:10EC0000F02C774B010000006F0000000A000000AC
:10EC100000000000000000009CDE0000451851A527
:10EC200001000000000000000000000000000000E3
:10EC300000000000000000000000000000000000D4
:10EC400000000000000000000000000000000000C4
:0CEC5000000000000000000000000000B8
:10FC0000F02C774B010000006F0000000A0000009C
:10FC100000000000000000009CDE0000451851A517
:10FC200001000000000000000000000000000000D3
:10FC300000000000000000000000000000000000C4
:10FC400000000000000000000000000000000000B4
:0CFC5000000000000000000000000000A8
:00000001FF

The content of the orange part and the blue part is the same (except the begin (address) and the end )

I conclude that the orange part is in the BL range, that is conflict has come from.

I have deleted the orange part in BL_settings.hex and execute the merge command again and it works!!! (The BL_merged recognize the application and I can perform a DFU with success).

So, why the generate settings command generates the same information in two different addresses?

Best regards

Parents
  • HI Yossef, 

    which version of nrfutil are you using? You need to make sure that you're using version between 1.5.0 and 4.0.0

    • The DFU package format transitioned from legacy to modern in SDK 12.0. Depending on the SDK version that you are using you will need to select a release of this tool compatible with it:

      • Version 0.5.2 generates legacy firmware packages compatible with nRF SDK 11.0 and older
      • Versions 1.5.0 and later generate modern firmware packages compatible with nRF SDK 12.0 and newer
      • Versions 4.0.0 and later generate modern firmware packages compatible with nRF SDK 15.1 and newer
      • Versions 5.0.0 and later generate modern firmware packages compatible with nRF SDK 15.3 and newer

    Also there is a known issue with the MBR params page being included in the application, which is not needed. 

    https://devzone.nordicsemi.com/f/nordic-q-a/17358/sdk-12-bootloader-erased-after-programming/66735#66735

  • Hi Bjorn

    The nrfutil version I'm using is V:5.0.0

    According to nrfutil web sitehttps://libraries.io/pypi/nrfutil

    "In order to generate firmware images, compatible with nRF SDK 12.0 to nRF SDK 15.0, use --no-backup switch during the generation of DFU settings." 

    So , the new generating setting command is :

    nrfutil settings generate --family NRF51 --application APP\nRF51_x_x_x.hex --application-version 111 --bootloader-version 10 --bl-settings-version 1 BL_Settings\BL_settings.hex --no-backup 

    When the new command is executing, the orange part in the BL_settings.hex is no longer there and the merge command is executed with success

    -->  --no-backup  solve the problem

    Best regards

    Youssef

Reply
  • Hi Bjorn

    The nrfutil version I'm using is V:5.0.0

    According to nrfutil web sitehttps://libraries.io/pypi/nrfutil

    "In order to generate firmware images, compatible with nRF SDK 12.0 to nRF SDK 15.0, use --no-backup switch during the generation of DFU settings." 

    So , the new generating setting command is :

    nrfutil settings generate --family NRF51 --application APP\nRF51_x_x_x.hex --application-version 111 --bootloader-version 10 --bl-settings-version 1 BL_Settings\BL_settings.hex --no-backup 

    When the new command is executing, the orange part in the BL_settings.hex is no longer there and the merge command is executed with success

    -->  --no-backup  solve the problem

    Best regards

    Youssef

Children
No Data
Related