0

Can I program nrf52 with bootloader and application image?

Newbie gravatar image

asked 2018-01-14 11:31:48 +0100

Hello, I am using nrf52 and sdk12.2.2. Can I program this with bootloader and application image at once using nrf go studio? At present I am first uploading bootloader image after that I am uploading application zip file via OTA. But I want to upload bootloader and application file using nrf go studio for production purpose. Thanks, Shailav

edit retag flag offensive close delete report spam

Comments

You want to use the nRF5x Command Line Tools for production programming, using a batch file for example.

Turbo J ( 2018-01-14 14:42:59 +0100 )editconvert to answer

More specifically, the tools you are looking for are mergehex and nrfjprog. They are available for linux, win, and osx. The options allow you to make one flash image out of the components. Just read through the help docs.

If you still want to use nRFgo to load the single flash image, you just load it from the application tab onto a blank device.

AmbystomaLabs ( 2018-01-14 17:20:13 +0100 )editconvert to answer

1 answer

Sort by » oldest newest most voted
0
shibshab gravatar image

answered 2018-01-14 19:53:26 +0100

Download nRF Command Line Tools which include a tool called mergehex.

You can use this tool to merge any number of hex files (assuming they don't have overlapping addresses).

mergehex -m application.hex bootloader.hex softdevice.hex -o merged.hex

Next you can use nRF Go to flash the merged hex file, or you can use the command line tool nrfjprog which is included in the aforementioned package.

edit flag offensive delete publish link more

Comments

Hi Shibshab, Where is the option to program merged hex file in nrf go studio? I tried to program nrf52 using command line tool. nrfjprog -f NRF52 --program ..\all.hex My all.hex files includes 3 files 1) Softdevice.hex 2)Bootloader.hex 3)Application.hex Now when I am programming my nrf52 with my all.hex file my nrf52 advertises only with "dfutarg". I want my my nrf52 should advertise with my application image. Thanks, Shailav

Newbie ( 2018-01-15 05:44:37 +0100 )editconvert to answer

When you are using a bootloader, you also need to flash something called a "bootloader settings" hex file. This needs to be done in order for the bootloader to start the application instead of the DFU profile. To generate this hex file (which should be the last thing you need for everything to work) you use nrfutil

shibshab ( 2018-01-15 08:25:04 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2018-01-14 11:31:48 +0100

Seen: 76 times

Last updated: jan. 14