-
Notifications
You must be signed in to change notification settings - Fork 319
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
Added support for AVR Dragon, tested in 1.6.7 #136
Conversation
Thanks! |
@bperrybap The scope of this PR is only to provide support for programming ATtiny in Arduino with AVR Dragon. Once either of the teams finally bothers addressing the bug, then I would think it should be possible to use AVR Dragon or any of the other supported programmers. |
But what does "support for programming" really mean? don't get me wrong, I think the update to include the dragon in the known programmers is a really good thing, but if the AttinyCore can't use the burn bootloader function with the dragon, there needs to be a "known issue" about it somewhere. This is only an issue for Atmel ISP programmers like the Dragon and a few other atmel ISP programmers. I run a patched version of avrdude to fix the issue. |
Points taken and agree about "known issue" though I defer to @SpenceKonde on that. It seems like the biggest challenge for the issue is finding out who is really responsible... and willing. :) It may well be a libusb thing, given some of my past struggles. I recall vaguely something about a kludge that "resets" the Dragon after every programming activity. Is this an issue on Linux, MacOS, and Windows? Curious... do you have any details about the underlying libusb issue which you could forward to me? Agree that Dragon is (glacially) slow on avrdude. Wished it weren't so. Maybe I should break down and get a USBasp. It's just that I have built such a nice enclosure for my Dragon. :) Kidding. Thanks. |
Here's the issue that bperrybap is referring to: arduino/Arduino#2986. As I reported there, the issue as it occurs with the Atmel AVRISP mkII programmer was solved for me when Arduino updated AVRDUDE to 6.3.0 but apparently the issue still occurs for bperrybap even with AVRDUDE 6.3.0. I also found that switching from libusb-win32 to the libusbK driver solved the issue with older AVRDUDE versions. I don't own an AVR Dragon so I can't say what the situation is with that programmer. |
@shimniok Definitely go get yourself a USBasp. You will like the results. They are cheap so no reason not to. Yes it is still a problem.
@per1234 @shimniok The summary is that Avrdude resets the USB just before exiting after using certain USB devices. According to the comment in the code, it is to clear some kind issue between the Atmel devices and libusb. However, due to the way Atmel ISP devices work, a USB reset causes the f/w in the device to restart and the f/w takes several seconds to restart and re-enumerate with the host. If the host looks for the device during that time (which is what happens if you run two avrdude commands back to back) the device has not yet enumerated with the operating system so it will appear that the device is not plugged in. This issue is caused by avrdude doing a USB reset and so it must be fixed in avrdude. Here are some links for more reading: --- bill |
@shimniok I actually did build a case for my dragon: http://www.instructables.com/id/A-protective-case-for-the-Atmel-AVR-Dragon/ |
Added Atmel AVR Dragon support to programmers.txt / externalprogrammers.txt. Tested that AVR Dragon option appears when ATTiny841 (no optiboot) selected, and verified that programming works, in Arduino 1.6.7. Thanks! --Michael