Go Down

Topic: Writing an Arduino using ISP without damaging bootloader? (Read 1 time) previous topic - next topic

DrAzzy

Do we know why the outwardly strange decision to program the bootloader in two steps was made in the first place? There must have been a reason...
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

bperrybap

Do we know why the outwardly strange decision to program the bootloader in two steps was made in the first place? There must have been a reason...
I believe that it was an oversight and that there was a lack of understanding that it could be done in a single command.
They didn't read the documentation to understand how avrdude works.
The fuses need to get set one way, then a burn has to be done then the fuses need to be set another way.
So they simply used multiple commands to do it.
The documentation is very clear if you specify multiple things on the command line, they happen in the order you specify, so you can do multiple things in one avrdude command.
I even had trouble convincing westfw to modify his optiboot makefile for the single command work around over this very point even when I showed that it worked by actually doing it all in a single avrdude command.
My assumption:
The issue, was only seen by such a relatively few number of people, literally probably only a handful, particularly in more recent avrdude versions with newer libusb libraries on Windows.
So the issue has been allowed to languish.
I also think that some of the developers are afraid to go in an touch any of the IDE java code which is where this stuff is being done.


There are many things in Arduino that are done or not done out of ignorance and lack of understanding.
And along that same line, the developers are sometimes very reluctant to fix things or modify any code when they don't understand the issue or don't have lots of complaints over it.
(like the atomicity issue in digitalWrite())
Sometimes there is no technical reason not to fix things and it is just plain obstinacy
(like the single tab vs whitespace (multiple tab or multiple spaces) separator in the keywords.txt file)
It has been be very frustrating at times to get things fixed.
In recent years things have gotten much much better, but it often comes down to the individual developer.

For now, I whenever a I want/need to use ISP programming I use a cheap USBasp device with my updated code. It can reburn a bootloader in about 1 second vs 30+ seconds to use the AVR dragon.

--- bill

Go Up