avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] Patches to support XBee Series 2 Over-The-Air flashing wit


From: David Sainty
Subject: [avrdude-dev] Patches to support XBee Series 2 Over-The-Air flashing with avrdude
Date: Sun, 16 Aug 2015 18:11:20 +1200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Hi AVR dudes,

I have developed a solution for flashing AVR devices via XBee Series 2 Over-The-Air with avrdude (with no extra hardware, just a matching bootloader on the AVR).

The avrdude side requires a new "xbee" programmer type, which is essentially the Arduino module (as used with optiboot), but with the I/O streams encapsulated in a packet-based protocol delivered over XBee's API, and XBee GPIO pin toggling to perform the hard reset. The code is just a single xbee.c/xbee.h, with associated changes to register the new programmer type, so it's very self-contained.

The bootloader is an extension of optiboot, fits [pretty snugly!] in 1kB, and auto-detects whether the standard "arduino" (~STK500v1) or "xbee" protocol is in use. I.e. the bootloader can be flashed via standard unmodified avrdude (at a reduced baud rate, XBee defaults to 9600bps) or flashed OTA by avrdude with the new "xbee" programmer type.

Over-The-Air it takes around 3 minutes to flash around 20kB, and a comparable time to verify. I'm personally thrilled it's so fast, I would have been excited even if it was an order of magnitude slower than that :)

I'd like to contribute the avrdude code into the base tree, what is the process for doing that? I would be willing to join the developer team in order to maintain the module.

Thanks,

Dave

---------------------------

Example OTA flash to the device with Zigbee 64-bit address 0013a200408b42a4, via a second XBee device on serial port /dev/ttyUSB0 attached to the same Zigbee network (shared encryption keys etc).


avrdude -c xbee -P 0013a200408b42a4@/dev/ttyUSB0 -p m328p -U "flash:w:frontGateLight.hex"

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.20s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "frontGateLight.hex"
avrdude: input file frontGateLight.hex auto detected as Intel Hex
avrdude: writing flash (19418 bytes):

Writing | ################################################## | 100% 174.63s

avrdude: 19418 bytes of flash written
avrdude: verifying flash memory against frontGateLight.hex:
avrdude: load data flash data from input file frontGateLight.hex:
avrdude: input file frontGateLight.hex auto detected as Intel Hex
avrdude: input file frontGateLight.hex contains 19418 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 151.56s

avrdude: verifying ...
avrdude: 19418 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]