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

how to make and flash hex files?

I used armgcc and built out nrf52810_xxaa.hex (file size 60656) in 

nRF5_SDK_17.0.0_9d13099/examples/ble_peripheral/ble_app_beacon/pca10040e/s112/armgcc/_build

I used SES download it into board successfully, no error prompt. but the board does not work.

I used SES download ble_app_beacon_pca10040e_s112.hex (file size 334764) in

nRF5_SDK_17.0.0_9d13099/examples/ble_peripheral/ble_app_beacon/hex

the board works fine.

So I want to know,

1. How can I generate the hex file like the ble_app_beacon_pca10040e_s112.hex on Linux IDE?

2. Can I flash the nrf52810_xxaa.hex only? How to do that?

  • I learned from a related case, below command used to flash application.

    nrfjprog -f nrf52 --program your_application.hex --sectorerase --reset

    it is for linux IDE, right? what about SES?

    besides I still need to know how to flash softdevice only? and how to generate all-in-one hex file and flash it?

    Thanks and Regards,

    srony

  • Hi, 
    Could you let me know what exactly you did on "I used SES download it into board successfully, no error prompt. but the board does not work." ? How did you import it to SES ? 

    For flashing the application I would suggest to go through the following: 

    - First try to do an erase all: nrfjprog --eraseall

    - Then try to flash an application that doesn't require softdevice, for example blinky: \examples\peripheral\blinky\pca10040e\blank\armgcc

    - Then flash the softdevice .hex file. You can find the softdevice .hex files in \components\softdevice

    - After that flash the application that require softdevice, for example the one you built in examples/ble_peripheral/ble_app_beacon/pca10040e/s112/armgcc/_build. Use --sectorerase, don't use --chiperase.

    The hex file we provide in /examples/ble_peripheral/ble_app_beacon/hex is a merged hex file. You can merge softdevice hex file to application hex file if you want, just use mergehex.exe. It's provided with the nrf command line tools . 

  • Thanks Hung. 

    I just use SES download an intel hex file.

    Now it is clear. I believe my application doesn't work.

    Just now I installed nRF-Command-Line-Tools on windows. It works well.

    Thanks for your explanations.

Related