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

Command Line Programming nRF52840 Dongle

I've been trying to find a way to program a hex file onto the dongle via the command line on linux.

I would very much prefer not having to touch the mouse in order to program the dongle, so the Programmer App is out of the question. Also, it doesn't work. Instead it just throws a warning about the start of the program being located at address 0x0.

I've tried creating a package using nrfutil, but that didn't work either. After having managed to put together a package like so:
    nrfutil pkg generate --debug-mode --application ot-ncp-ftd.hex --hw-version 52 --sd-req 0xA7,0x67,0x80,0x81,0x87,0x88,0x8C,0x91,0x95,0x98,0x99,0x9E,0x9F,0x9D,0xA5,0xA8,0xA9 ftd.zip
and trying to program like so
    dfu usb_serial --package ftd.zip -p /dev/ttyACM0
it just threw me this error: pc_ble_driver_py.exceptions.NordicSemiException: Response Code InvalidObject

It would be great to have support for the dongle in nrfjprog

Cheers,
Andri

Parents
  • HI Andrii, 

    I sincerely apologize for the late reply. 

    You should be able to generate an application firmware image that uses the S140 v6.0.0 using the following command

    nrfutil pkg generate --application ble_app_blinky_pca10059_s140.hex --application-version 5 --hw-version 52 --sd-req 0xA9 ble_app_blinky.zip

    Note: You need to set the FLASH length so that ORIGIN+ LENGTH < 0xE0000 (start address of the bootloader)

Reply
  • HI Andrii, 

    I sincerely apologize for the late reply. 

    You should be able to generate an application firmware image that uses the S140 v6.0.0 using the following command

    nrfutil pkg generate --application ble_app_blinky_pca10059_s140.hex --application-version 5 --hw-version 52 --sd-req 0xA9 ble_app_blinky.zip

    Note: You need to set the FLASH length so that ORIGIN+ LENGTH < 0xE0000 (start address of the bootloader)

Children
Related