sim- / tgy

tgy -- Open Source Firmware for ATmega-based Brushless ESCs
http://0x.ca/tgy/
685 stars 388 forks source link

Bootloader incompatible with recent versions of avrdude #126

Open timmaxw opened 7 years ago

timmaxw commented 7 years ago

The bootloader works with version 6.1 of avrdude but not version 6.2. I think the problem is related to reading the signature bytes. avrdude always tries to read the signature bytes before doing anything else. Version 6.1 of avrdude uses CMD_SPI_MULTI to read signature bytes, which boot.inc supports as a special case. But version 6.2 of avrdude uses CMD_READ_SIGNATURE_ISP, which boot.inc does not support. Here is the relevant avrdude change log entry. I've included transcripts of version 6.1 and version 6.2 running in verbose mode, showing the exact bytes that avrdude sends to the bootloader and the replies it receives.

(I'm using an Afro ESC programmed via a Afro ESC USB programming tool on a computer running Linux 4.4.0-47-generic x86_64. But I doubt these details are relevant.)

adammck commented 7 years ago

I'm seeing the same problem with avrdude 6.3.