Open MCUdude opened 6 years ago
Hi @MCUdude ,
you are right, actually the problem lies in -carduino
switch. I mistakenly committed a patch to avrdude to allow changing the bitclock on the fly if ArduinoAsISP was used (https://github.com/facchinm/avrdude/blob/d8928325064d13c86c7822956ac5b04bd5de874e/arduino.c#L91). Unfortunately, usage of "arduino" programmer is more widespread, so I'm removing that patch and rebuilding avrdude.
As soon as core .207 is out I'd be very glad if you could test it and report if the problem is gone, thanks!
Committed as https://github.com/facchinm/avrdude/commit/e202cc747109be34642ee127e45a39b77a32a48f, sourceforge is down so it will take a bit to get the new binaries up and running.
Thanks! I’m on vacation right now, so I’m not able to test it before the end of next week.
Why do you use sourceforge to host your binaries? Isn’t that just a bloated, virus infected site developers have have left in favor to Github?
Yep, all the adjectives perfectly describe it :smile: Unfortunately, libusb and other dependencies are hosted there, so right now we are unable to compile "cacheless"
@MCUdude sourceforge is up again, I'm attaching the build result here so you can test it before pushing to the staging json, thanks! avrdude-6.3.0-arduino13-i386-apple-darwin11.zip
Hi! I've replaced avrdude and avrdude.conf with the version you provided. I'm now able to burn bootloader using USBtinyISP and USBasp, but serial upload still fails..
/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_502760/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 done. Thank you.
An error occurred while uploading the sketch
I'll check the build script again, the line trying to set bitclock at 5.000000
shouldn't be there, so probably there was a problem in the build (or I attached the wrong zip)
Indeed, the build script didn't pick the latest branch, attaching the new artifact avrdude-6.3.0-arduino13-i386-apple-darwin11.zip
Thanks! Seems like it works like it should. Anyways why is this outputted when uploading?
avrdude: stk500_initialize(): n_extparms 4 mayor 6 minor 2
avrdude: stk500_initialize(): n_extparms = 4
I don't think I've seen that with avrdude shipped with IDE 1.8.5. Is it a way to spot what version of optiboot the device is running?
Full output:
/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_100636/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
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
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: stk500_initialize(): n_extparms 4 mayor 6 minor 2
avrdude: stk500_initialize(): n_extparms = 4
avrdude: reading input file "/var/folders/2f/bk0yr6zx4290kvkss8ty0gxc0000gn/T/arduino_build_100636/Blink.ino.hex"
avrdude: writing flash (1044 bytes):
Writing | ################################################## | 100% 1.78s
avrdude: 1044 bytes of flash written
avrdude: verifying flash memory against /var/folders/2f/bk0yr6zx4290kvkss8ty0gxc0000gn/T/arduino_build_100636/Blink.ino.hex:
avrdude: load data flash data from input file /var/folders/2f/bk0yr6zx4290kvkss8ty0gxc0000gn/T/arduino_build_100636/Blink.ino.hex:
avrdude: input file /var/folders/2f/bk0yr6zx4290kvkss8ty0gxc0000gn/T/arduino_build_100636/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 done. Thank you.
You can use the extended parameters to control N different resets with the same ArduinoAsISP sketch, it's something we'll publish later this year :wink:
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 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:
Serial upload with avrdude that ships with IDE 1.8.5:
Attempt to burn bootloader using 1.6.206: