(This PR should supersede: #2314, #2315.)
I recently picked up the effort to make ArduinoISP more reliable and better working on more (hopefully all) arduino models. I started again from rsbohn's last work and try to fix only things that help achieving these two goals.
This effort is in branch issue-3321 of my Arduino fork and in the master branch of my ArduinoISP fork
This is still a work in progress, but here is a summary of the status:
Therefore on the Due it is already working (untill now I only tested reading signatures) but not for slow targets like the attiny85...
Testing: I am composing a test suite bundling a set of about 10 typical/important use cases for ArduinoISP. The suite needs to be fleshed out, but here is a preview:
(the name Chaucer comes from the optiboot test suite that burns big sketches that output part of the "knight's tale" by Chaucer on the console)
Avrdude: I think it would be better to upgrade to avrdude 6.1 because this version implements some clever fixes that make it possible to program high addresses (over 128KB) with stk500v1 (which is what ArduinoISP uses). This makes it possible to reliably burn the bootloader of an atmega2560 using ArduinoISP.
Hi @PeterVH , I'm keeping an eye on your repo and it seems that the Bitbang SPI on Due is solved 🤘
If you could open a proper PR the bot will automatically create a build so people could start testing it easily!
Hi @facchinm, thanks for giving it a try. Beware, I did a push -f a couple of times last days. Of coarse I will stop doing that from now on.
Just created the pull request. (Why did this create a new issue?, could I have avoided that?)
On linux I carried out the test "4. program an attiny85", on a Leonardo, Due and Mega 2560.
It should work on a Zero too, but I can't buy one from Belgium.
I elaborated the test suite, and created some more background info about this enhancement request. But it is not yet ready to publish (say mid next week).
There's more than one fork to fix/improve ArduinoISP (but too many forks spoil the code...) ArduinoISP included with 1.6.3 works OK with a target connected, but without a target connected it hangs at the programming command (heartbeat stops cycling):
avrdude -C /etc/avrdude.conf -c avrisp -p t85 -P com16 -b 19200 -vvvv
avrdude: Send: E  .  .  . [d7] . [a0] .  
avrdude: Recv: . 
avrdude: Recv: . 
avrdude: Send: P  
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
I tried Randall Bohn's version and it gracefully handles the case of no target connected:
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
I imagine Peter's version also works OK since it is forked from Randall's.