Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

Trying to flash HEX file to nRF52840 without Arduino IDE
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trying to flash HEX file to nRF52840 without Arduino IDE

by sminogue on Sun Oct 17, 2021 2:21 pm

Ive been poking at this for awhile. I am looking for a way to allow an end user to apply updates to an nRF52840 based device. I REALLY cannot expect my end user to install Arduino IDE and all the libraries, compile and upload my source.

I keep finding posts about this here and on the Arduino site about enabling verbose mode in the IDE and copying the command line. I tried...
Code: Select all | TOGGLE FULL SIZE
MyMachine% /.../Arduino15/packages/adafruit/hardware/nrf52/1.1.0/tools/adafruit-nrfutil/macos/adafruit-nrfutil --verbose dfu serial -pkg /.../tc_firmware_v1.ino.zip -p /dev/cu.usbmodem1101 -b 115200 --singlebank

Upgrading target on /dev/cu.usbmodem1101 with DFU package /.../tc_firmware_v1.ino.zip. Flow control is disabled, Single bank, Touch disabled
Opened serial port /dev/cu.usbmodem1101
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 165564
Sending DFU start packet
Timed out waiting for acknowledgement from device.

Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.
Traceback (most recent call last):
  File "__main__.py", line 296, in serial
  ... StackTrace Follows


Even if this worked... Frankly my end users are not going to be up for breaking out powershell and putting in some command that looks like Klingon to them.

There HAS to be a better way of allowing non-technical end users to push updates to Adafruit devices in the wild...

Anyone know of how this is being accomplished? I keep coming up empty on my searches.

sminogue
 
Posts: 35
Joined: Sun Oct 04, 2020 9:35 am

Re: Trying to flash HEX file to nRF52840 without Arduino IDE

by mikeysklar on Tue Oct 19, 2021 8:49 pm

The Arduino IDE is probably the easiest of the options available for sending a HEX file of a sketch to a nRF52. Using arduino-cli or avrdude will just be more complicated.

It looks like yours is timing out from not being in DFU mode (connect DFU to GND).

https://learn.adafruit.com/bluefruit-nr ... bootloader

mikeysklar
 
Posts: 6184
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.