arduino / arduino/ArduinoCore-avr
Avrdude doesn't work with ATtiny1634 on MacOS with boards version 1.6.206
- Dominant language
- C
- Stars
- 1.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
First of all I was not able to figure out where you guys host your avrdude source + files, so I'd rather post the issue here. There's been a longer discussion over at the [ATTinyCore repo about the ATtiny1634](https://github.com/SpenceKonde/ATTinyCore/issues/158#issuecomment-369315512) and why it didn't work with avrdude. Turned out the main issue was a bug in the official avrdude.conf file, but I discovered something else too. I'm not able to use avrdude that's included in 1.6.206 to burn bootloader and upload to the ATtiny1634, not even with the corrected version of avrdude.conf. Avrdude that ships with IDE 1.8.5 works just fine.
I guess the output speaks for itself:
**Serial upload with Avrdude that's included with 1.6.206:**
```
/Users/Hans/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino12/bin/avrdude -C/Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/avrdude.conf -v -pattiny1634 -carduino -P/dev/cu.wchusbserial1410 -b115200 -Uflash:w:/var/folders/2f/bk0yr6zx4290kvkss8ty0gxc0000gn/T/arduino_build_808372/Blink.ino.hex:i
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/avrdude.conf"
User configuration file is "/Users/Hans/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.wchusbserial1410
Using Programmer : arduino
Overriding Baud Rate : 115200
Setting bit clk period : 5.0
AVR Part : ATtiny1634
Chip Erase delay : 9000 us
PAGEL : PB3
BS2 : PB1
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 5 4 0 no 256 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 16384 32 512 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 6.2
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: stk500_initialize(): n_extparms 4 mayor 6 minor 2
avrdude: stk500_initialize(): n_extparms = 4
trying to set bitclock at 5.000000
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500_recv(): programmer is not responding
avrdude done. Thank you.
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
```
**Serial upload with avrdude that ships with IDE 1.8.5:**
```
$ /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/avrdude.conf -v -pattiny1634 -carduino -P/dev/cu.wchusbserial1410 -b115200 -Uflash:w:/var/folders/2f/bk0yr6zx4290kvkss8ty0gxc0000gn/T/arduino_build_808372/Blink.ino.hex:i
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/avrdude.conf"
User configuration file is "/Users/Hans/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.wchusbserial1410
Using Programmer : arduino
Overriding Baud Rate : 115200
Setting bit clk period : 5.0
AVR Part : ATtiny1634
Chip Erase delay : 9000 us
PAGEL : PB3
BS2 : PB1
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 5 4 0 no 256 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 16384 32 512 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 6.2
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9412 (probably t1634)
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
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 "/var/folders/2f/bk0yr6zx4290kvkss8ty0gxc0000gn/T/arduino_build_808372/Blink.ino.hex"
avrdude: writing flash (1044 bytes):
Writing | ################################################## | 100% 1.77s
avrdude: 1044 bytes of flash written
avrdude: verifying flash memory against /var/folders/2f/bk0yr6zx4290kvkss8ty0gxc0000gn/T/arduino_build_808372/Blink.ino.hex:
avrdude: load data flash data from input file /var/folders/2f/bk0yr6zx4290kvkss8ty0gxc0000gn/T/arduino_build_808372/Blink.ino.hex:
avrdude: input file /var/folders/2f/bk0yr6zx4290kvkss8ty0gxc0000gn/T/arduino_build_808372/Blink.ino.hex contains 1044 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.60s
avrdude: verifying ...
avrdude: 1044 bytes of flash verified
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK (E:00, H:00, L:00)
avrdude done. Thank you.
```
**Attempt to burn bootloader using 1.6.206:**
```
/Users/Hans/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino12/bin/avrdude -C/Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/avrdude.conf -v -pattiny1634 -cusbtiny -e -Uefuse:w:0xFE:m -Uhfuse:w:0xD7:m -Ulfuse:w:0xEF:m
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/avrdude.conf"
User configuration file is "/Users/Hans/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : usbtiny
Setting bit clk period : 5.0
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:010
AVR Part : ATtiny1634
Chip Erase delay : 9000 us
PAGEL : PB3
BS2 : PB1
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 5 4 0 no 256 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 16384 32 512 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : USBtiny
Description : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported
avrdude: Setting SCK period to 5 usec
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9412 (probably t1634)
avrdude: erasing chip
avrdude: Setting SCK period to 5 usec
avrdude: reading input file "0xFE"
avrdude: writing efuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFE:
avrdude: load data efuse data from input file 0xFE:
avrdude: input file 0xFE contains 1 bytes
avrdude: reading on-chip efuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xD7"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD7:
avrdude: load data hfuse data from input file 0xD7:
avrdude: input file 0xD7 contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xEF"
avrdude: writing lfuse (1 bytes):
/Users/Hans/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino12/bin/avrdude -C/Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/avrdude.conf -v -pattiny1634 -cusbtiny -Uflash:w:/Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/bootloaders/optiboot/optiboot_attiny1634at12.hex:i
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/avrdude.conf"
User configuration file is "/Users/Hans/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : usbtiny
Setting bit clk period : 5.0
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xEF:
avrdude: load data lfuse data from input file 0xEF:
avrdude: input file 0xEF contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude done. Thank you.
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:010
AVR Part : ATtiny1634
Chip Erase delay : 9000 us
PAGEL : PB3
BS2 : PB1
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 5 4 0 no 256 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 16384 32 512 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : USBtiny
Description : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported
avrdude: Setting SCK period to 5 usec
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9412 (probably t1634)
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: Setting SCK period to 5 usec
avrdude: reading input file "/Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/bootloaders/optiboot/optiboot_attiny1634at12.hex"
avrdude: writing flash (16384 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 16384 bytes of flash written
avrdude: verifying flash memory against /Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/bootloaders/optiboot/optiboot_attiny1634at12.hex:
avrdude: load data flash data from input file /Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/bootloaders/optiboot/optiboot_attiny1634at12.hex:
avrdude: input file /Users/Hans/Documents/Arduino/hardware/ATTinyCore/avr/bootloaders/optiboot/optiboot_attiny1634at12.hex contains 16384 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 16384 bytes of flash verified
avrdude done. Thank you.
avrdude(33055,0xa6f4e1c0) malloc: *** error for object 0x810608: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Error while burning bootloader.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the serial-upload and bootloader commands using the bundled avrdude 6.3.0-arduino12, the IDE 1.8.5 avrdude 6.3, and the corrected avrdude.conf shown in the report. Compare the results for the ATtiny1634; done means serial upload and bootloader programming work with the Arduino 1.6.206 tool.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100