Trying to flash HEX file to nRF52840 without Arduino IDE

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
sminogue
 
Posts: 46
Joined: Sun Oct 04, 2020 9:35 am

Trying to flash HEX file to nRF52840 without Arduino IDE

Post by sminogue »

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

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.

User avatar
mikeysklar
 
Posts: 14179
Joined: Mon Aug 01, 2016 8:10 pm

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

Post by mikeysklar »

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

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

Return to “Microcontrollers”