Skip to content

ArduinoISP: reliability and portability improvements. #3321

Closed
@PeterVH

Description

@PeterVH

(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

Status

This is still a work in progress, but here is a summary of the status:

  • Rsbohn's last work introduced some regressions, but these are fixed.
  • On the Uno it works much more reliable than the version in the IDE, mainly by simply removing the delay() call from the heartbeat() method.
  • On the Due. There is no bit bang spi yet: I think this would better be handled by a SPI.setSpeed() method in the SPI lib (if the selected speed is too slow, the implementation could automatically switch to bit banged SPI).

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:

  1. No target connected. (note this does not work as it should with the current version in the IDE)
  2. Burn UNO bootloader
  3. Burn mega bootloader (requires programming above 128KB)
  4. Program an attiny85
  5. Program an attiny841
  6. Program an at89s52
  7. Chaucer115 to 1284p: Program a big (115KB) sketch into an atmega 1284p
  8. Chaucer115 to mega: Program a big (115KB) sketch into an arduino mega
  9. LongStoryShort: Program above 128KB.

(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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions