nrf52 feather programming without a bootloader with nrfjprog

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
stefankrastanov
 
Posts: 2
Joined: Sun May 27, 2018 11:10 pm

nrf52 feather programming without a bootloader with nrfjprog

Post by stefankrastanov »

I have an nrf52 dev kit board from Nordic that comes with the SWD programmer. I would like to use it to program a feather or other custom nrf52 boards without the need for a bootloader.

I have no trouble uploading the bootloader through the Arduino IDE, but if I use Sketch->Upload Using Programmer I get the following error message: "Error while uploading: missing 'program.params.quiet' configuration parameter". Presumably, this functionality was never implemented for this board so there are just a bunch of configuration parameters like this one that are missing. I can happily populate them and even submit a pull request with the changes, but I need guidance with how to properly invoke `nrfjprog`.

I have the .hex and .map files that the Arduino IDE produced, but I do not know how to use `nrfjprog` to upload those. Could you point me towards some appropriate documentation?

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: nrf52 feather programming without a bootloader with nrfj

Post by hathach »

You need to modify arduino files (platform.txt, board.txt, programmer.txt) to the right command and parameters.

User avatar
stefankrastanov
 
Posts: 2
Joined: Sun May 27, 2018 11:10 pm

Re: nrf52 feather programming without a bootloader with nrfj

Post by stefankrastanov »

Thanks! I am aware of that, and I even have some basic understanding of the command itself (nrfjprog).

The part I need help with is understanding how to appropriately invoke that command (just running nrfjprog on the produced hex file does not work - I am guessing because of a different memory layout).

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: nrf52 feather programming without a bootloader with nrfj

Post by hathach »

There is checksum test performed by bootloader to verify the application integrity. You could find more information in this issue
https://github.com/adafruit/Adafruit_nR ... issues/133

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”