Using a black-box (client-provided) which is connected via Ft232R USB adapter,
most likely ancient boot loader, following AVROSP protocol (and working
correctly with avrosp.exe).
My job here is to port a Windows Firmware Updater (using avrosp.exe) to Mac OS
ATXMega256A3 (might be -U, can't find out without disassembling the unit which
I am clearly not supposed to do).
Due to NDA I cannot disclose any further details, but I can provide a partial
serial log if you're interested.
I've analyzed serial communications and that's how I finally found out what is
going wrong there.
For some reason, buffer size is reported as 0x0080 (128 bytes) and the update
process fails, as 512 bytes (page size correctly given in avrdude.conf). are
The even more serious problem, however, is that extended addressing is not
being used by avrdude in this case.
"A" 0xff00" becomes "A" 0x0000 instead of "H" 0x010000", thus overwriting
flash memory from the beginning instead of appending the code properly.
I have applied this (rough) patch, which makes it work; just wanted to let you
I probably can't use avrdude anyway, because of the restrictions GPL would
I'd love to help, but I'm actually still quite busy reinventing the wheel and
porting the whole thing to Swift, using ORSSerial Library.
Can't you switch to 6.3? OTOH, this patch would be quite easy to apply
Just look for the corresponding section in butterfly.c (butterfly_set_addr).
I totally understand. I made the changes manually. Reason I am not using 6.3
is because I ran into issues using GPIO on my raspberry pi with 6.3. Could
never get it work but 6.1 would work fine. Thanks for the patch, I will report
back if it is successful in 6.1 (running into other issues with my raspberry
pi preventing me from testing it at the moment).