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

merge into one hex

Hello,

I do my first project with nrf52.

I have great working app under the SES enviroment. App is downloaded to hardware under the Segger Studio and it works ok. And now I want to generate one hex file to program it via Jlink programmer. I have read many forum topics about this, but it doesnt resolve my problem.

First question: what files should I merge to generate one hex file: app.hex, s132_nrf52_7.2.0_softdevice.hex is enough ? What about mbr_nrf52_2.4.1_mbr.hex?  Is it needed ?

I tried to  merge hex files with command: mergehex -m app.hex s132_nrf52_7.2.0_softdevice.hex -o output.hex

Merge is done. But when I try to load it to J-Flash v.6.92 i get error - "Areas overlap". When I inspecting merged hex file it doesnet look good. In my opinion mergehex generates errnous output file. I have found this at line where Jflash show error:

:109340001D4000D1F6E7A0F1040070BC10F8012B1D
:10935000002AFBD1A0EB0100704770BC10F8012B74
:10935C00B970020000000000FD8902009025002079
:10936C006F8B0200C8250020557102000000000020

The line with :109350 overlaps indeed. 

What should I do ?

Parents
  • Hi, 

    what files should I merge to generate one hex file: app.hex, s132_nrf52_7.2.0_softdevice.hex is enough ? What about mbr_nrf52_2.4.1_mbr.hex?  Is it needed ?

    Because Softdevice has included MBR, you don't need to merge MBR again.   

    Merge is done. But when I try to load it to J-Flash v.6.92 i get error - "Areas overlap". When I inspecting merged hex file it doesnet look good. In my opinion mergehex generates errnous output file. I have found this at line where Jflash show error:

     Try to also merge the hardware setting. I have tested ble_app_blinky_pca10040_s132.hex with  s132_nrf52_7.2.0_softdevice.hex with the following commands:

    nrfutil settings generate --family NRF52 --application ble_app_blinky_pca10040_s132.hex --application-version 1 --bootloader-version 2 --bl-settings-version 1 settings.hex
    mergehex -m ble_app_blinky_pca10040_s132.hex settings.hex -o merged.hex
    mergehex -m merged.hex s132_nrf52_7.2.0_softdevice.hex -o output.hex

    -Amanda H. 

Reply Children
No Data
Related