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

DFU

I want to make a burn file, but I get an error when merging hex files. : “The hex files cannot be merged since there are conflicts.”,When I cancel the compilation of the nrf_dfu_settings.c, the resulting hex can be merged smoothly. So what is the reason? What is the use of this  nrf_dfu_settings.c ?

sdk 12.2

Thanks!!!

  • Hi,

    nrf_dfu_settings.c is part of the bootloader, and it is needed for the bootloader to function correctly.

    What hex files are you merging?

    Regards,
    Terje

  • CMD :

    nrfutil settings generate --family NRF52 --application app.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 bootloader_settings.hex
    mergehex --merge bootloader.hex softdevice.hex --output production_final1.hex
    mergehex --merge production_final1.hex app.hex --output production_final2.hex
    mergehex --merge production_final2.hex bootloader_settings.hex --output final.hex

    LOGO :

    nrfutil settings generate --family NRF52 --application C003S_nRF52_PG000.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 bootloader_settings.hex

    Generated Bootloader DFU settings .hex file and stored it in: bootloader_settings.hex

    Bootloader DFU Settings:
    * File:                 bootloader_settings.hex
    * Family:               nRF52
    * CRC:                  0xA74D6B78
    * Settings Version:     0x00000001 (1)
    * App Version:          0x00000001 (1)
    * Bootloader Version:   0x00000001 (1)
    * Bank Layout:          0x00000000
    * Current Bank:         0x00000000
    * Application Size:     0x00018264 (98916 bytes)
    * Application CRC:      0xB07BABE6
    * Bank0 Bank Code:      0x00000001


    mergehex --merge bootloader.hex softdevice.hex --output production_final1.hex
    Parsing input hex files.
    Merging files.
    Storing merged file.

    mergehex --merge production_final1.hex app.hex --output production_final2.hex
    Parsing input hex files.
    Merging files.
    ERROR: The hex files cannot be merged since there are conflicts.

    mergehex --merge production_final2.hex bootloader_settings.hex --output C003S_NOBTN_DFU_PG000_V0.0.0.hex
    Parsing input hex files.
    ERROR: One of the files to merge cannot be found.


  • Hi,

    Basically the error means that the two hex files contain data for the same memory location. In this case the conflict seems to be with bootloader.hex and app.hex. In order to confirm and investigate further, can you check that if you try to merge those two files only you still get the same error? (I.e. try "mergehex --merge bootloader.hex app.hex --output test.hex")

    In order to investigate further, I would like to have a look at the files themselves. If you cannot share them here on the public forum then please create a private ticket and refer to this case. You can also let me know here and I will find the new (private) case in our systems.

    If I understand things correctly you have based your application on the buttonless DFU example from 12.2. Is that correct? Please note that that example was experimental in SDK 12.2.

    Regards,
    Terje

  • Hi,

    (1) :   I try to merge bootloader.hex and app.hex only ,and i still get the same error.

    (2) :  Yes , i add buttonless DFU example code in my project

  • HI

    Can I not use the nrf_dfu_settings.c ? not use the  struct nrf_dfu_settings_t ?

Related