usb 6-2: device descriptor read/64, error -71
usb 6-2: device not accepting address 21, error -71
1. USBaspBootloader’s Makefile specifies atmega168 and BOOTLOADER_ADDRESS=3800 by default. This is in hex addressing a byte, i.e. 0x3800. avrdude uses byte-addressing.
ATmega168 documentation refers to 0x1C00 as the bootloader address. This is in hex addressing a word. 0x3800 / 2 = 0x1C00.
So, when programming a bootloader using avrdude, USBaspLoader’s Makefile should have 3800 (the default), not 1C00.
2. bootloaderconfig.h has features enabled that make the bootloader too big (> 2K). I had to turm them off:
80 #define HAVE_EEPROM_PAGED_ACCESS 0
87 #define HAVE_EEPROM_BYTE_ACCESS 0
93 #define BOOTLOADER_CAN_EXIT 0
All of this was, of course, done under Linux.