-
-
Notifications
You must be signed in to change notification settings - Fork 7k
add mega and due compatible ArduinoISP sketches #2315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add mega and due compatible ArduinoISP sketches #2315
Conversation
The example present does not work with either Arduino Mega 2560 or Arduino Due Tested this https://raw.githubusercontent.com/rsbohn/ArduinoISP/master/ArduinoISP/ArduinoISP.ino to work perfectly to turn Mega into a stk500v1 programmer And tested this https://raw.githubusercontent.com/PeterVH/ArduinoISP/due/ArduinoISP/ArduinoISP.ino to be compatible with Due to turn it into a stk500v1 programmer. (using the native port) Signed-off-by: Arnav Gupta <[email protected]>
Hmm, instead of having three separate sketches, I'd rather add some preprocessor macros or otherwise improve the existing sketch to support more hardware. Did you compare the different sketches to see what the differences are? |
@matthijskooijman I have tested the DueISP sketch with a Due and a Leonardo and a Mega (the only boards I have), and all three satisfactorily work as avrisp programmers. |
Can one of the admins verify this patch? |
Both versions doesnt work with a Leonardo to me. I also found this tutorial, but that also doesnt work. Using IDE 1.6 rc1 Does anyone know a working ISP sketch for the 32u4? Edit: now working: |
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 my master branch. Status 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 recently took a look at your patches over ArduinoISP and it works much better then the one upstream. Would you mind opening a PR (with the complete history, not only a squash of the patches) on the top of the current sketch? It will of course supersede this PR. Test suite is also a great idea! We'd be glad to include it once it's ready. About avrdude 6.1, I'm 👍 for the update; if you want to speedup the process please add a comment on arduino/toolchain-avr/issues/17 |
Done : #3321
I also kept the link with rs-bohn's work: in my ArduinoISP fork, I created a branch at commit db0fd332 on which I applied the IDE's later patches (basically an auto format and a baudrate/heartbeat delay dance). Then I rebased rsbohn and my patches on that branch. I forced (!) that branch to become my master branch. (My previous master branch is still there, it is called called rs-bohn). The same history is also in branch issue-3321 of my Arduino fork There is no pull request yet as I still need to address the slow spi clock issue on the due. |
Hi @PeterVH , |
superseded by #3321 |
To fix #2314
The example present does not work with either
Arduino Mega 2560 or Arduino Due
Tested this
https://raw.githubusercontent.com/rsbohn/ArduinoISP/master/ArduinoISP/ArduinoISP.ino
to work perfectly to turn Mega into a stk500v1 programmer
And tested this
https://raw.githubusercontent.com/PeterVH/ArduinoISP/due/ArduinoISP/ArduinoISP.ino
to be compatible with Due to turn it into a stk500v1 programmer. (using the native port)
Signed-off-by: Arnav Gupta [email protected]