Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52DK programmed and debugged ok within Segger Studio but dragging hex file to JLINK drive does not give the same result

Hi

I have been developing ok with Segger Tools and nRF52DK. My application works as expected. However now I need to send hex files to a customer who also has the nRF52 DK. So I tried dragging my generated hex file to the JLINK drive to simulate what he would do and my app does not work using this method.

Can confirm that the Segger tools download the softdevice as below...

and I also dragged the softdevice hex file to the JLINK drive ok.

My application is based off the Blinky example and if I load the original hex file for that by dragging it to JLINK that works OK.

What I also notice is the original hex file is much larger in size... 

than mine but I have added more code not subtracted from the Blink Example, so I am suspicious this could be related to my problem.

This is the hex file I am dragging to the JLINK Drive.

I don't think any Project options have been changed.

This is the version of Segger tools I am using....

Seems a basic problem but I'm confused as most related issues center on if the softdevice has been programmed.

Grateful for help on this.

BR Martin

Parents
  • Hello,

    The reason why the precompiled .hex file is bigger is that it contains the softdevice merged with the application.

    I don't use the drag'n'drop too much, but it looks like it isn't too found of being programmed by two .hex files (softdevice and application). I am not quite sure why, but if you merge the application and the softdevice into one .hex file, it looks like it works.

    To merge two .hex files, you can use mergehex, which is included in the Nordic Command Line Tools (same as nrfjprog).

    To merge two files, use the command:

    mergehex --merge <path to file 1> <path to file 2> --output <my_merged.hex>
    For example:
    mergehex --merge s132_nrf52_6.1.1_softdevice.hex ble_app_blinky_pca10040_s132.hex --output my_merged_application.hex

    If the files are located in the folder from which you run your cmd line.

    You should be able to drag'n'drop the file my_merged_application.hex.

Reply
  • Hello,

    The reason why the precompiled .hex file is bigger is that it contains the softdevice merged with the application.

    I don't use the drag'n'drop too much, but it looks like it isn't too found of being programmed by two .hex files (softdevice and application). I am not quite sure why, but if you merge the application and the softdevice into one .hex file, it looks like it works.

    To merge two .hex files, you can use mergehex, which is included in the Nordic Command Line Tools (same as nrfjprog).

    To merge two files, use the command:

    mergehex --merge <path to file 1> <path to file 2> --output <my_merged.hex>
    For example:
    mergehex --merge s132_nrf52_6.1.1_softdevice.hex ble_app_blinky_pca10040_s132.hex --output my_merged_application.hex

    If the files are located in the folder from which you run your cmd line.

    You should be able to drag'n'drop the file my_merged_application.hex.

Children
No Data
Related