Hi,I have an AVR ISPMKII USB dongle and when I try to burn my bootloader to my NG board with a 168 chip on it, I always get the following error:
avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Any ideas? It clearly sees my dongle,just can't do anything with it. Lights do blink...
Things are better- I didn't realize the board had to be powered as well as the mkII, so it burned the boot loader. However, I'm using a 168 with an old NG board, and it doesn't work after burning the new bootloader. I'm going to see if I can find an old bootloader to try on it...
Also, it took about 10 minutes to burn the boot loader. Maybe put in the avr messages as it's doing this, 10 minutes is a long time for an app to be unresponsive. I remember it taking this long from the command line when I did it last year, but it worked. It also seems to take about as long from the command line now.
The mkII's seem to die relatively easily. Did you have NG selected in the Boards menu when you burned the bootloader? If you had Diecimila selected, you'll have the bootloader with a very short timeout, since it's intended for boards that auto-reset. You should be able to burn the NG bootloader from the IDE.
And yea, there should probably be some sort of progress notification as you burn the bootloader.
Hi Mellis,
Yeah, I tried burning the bootloader as the 168 on an NG board, but so far NG It looks like my mkII is still working, the lights still do their thing and I don't get any error messages, but who knows?
I have 4 diecimila boards on order, they should should be here next week, so even if this doesn't work I won't be out of commision too long.
One other thing I've noticed in my 10 months or so away from this stuff- the sketches I had from version 7, when re-compiled with 8, 9 or 10 are much smaller and didn't work on the NG boards I had with Atmega8 chips. Any ideas?
The smaller size is because of some optimizations we did in Arduino 0008. Did you have the "Arduino NG or Older w/ ATmega8" board selected when you compiled and uploaded the sketches?
avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Have tried for both mega8 and mega168 on Windows XP. I am gonna try with the good old command line and report back to the forum
This resulted in success burning my blank mega168 using an older arduino NG. Maybe being able to manually verify fuse bits and such, made it seem more likely to work.
Please note the following from the above link:
Click the "Board" panel, set and write the ISP frequency. If this is a virgin chip you must select 125.0 kHz. If you have already flashed this chip you can set it to 2.0 Mhz without issues. It will be a long day of programming if you don't take this step, as burning at 1.049 Khz takes forever.
This explains why some such as glasspusher experienced extremely long burntimes. Appropriately setting this frequency sped things up quite a bit.
just wanted to throw in that i'm successfully burning bootloaders to atmega168s using an mkII + an arduinoNG on an Intel Macbook running 10.4.9
thank you very much for this feature. if it does not work for anyone and you're sure that your mkii is not dead, check those 3 things mentioned before:
arduino has to get power from an external source (wall plug)
set the power source jumper on your arduino accordingly
plug-in the ICSP-cable correctly.
if the programmers shows the green light (instead of red or orange or blinking or something ) the hardware part should be fine. Start the arduino application now and begin burning your bootloader (or sketch soon :-).
the arduino app seemed frozen when i did it the first times, not telling me something new for a couple of minutes, just a "burning bootloader". the process takes something like 5-10 minutes on this machine, but it works. After some lightshow, the programmer shows the green light again, and arduino tells me "Done burning bootloader". No other messages in between, which you just have to know.
If it's that slow, you might want to speed it up with AVR studio under windows. I don't remember what the setting is called - some type of clock or timing parameter that seems to be set somewhat randomly by default.
well i did burn my first bootloaders under AVR Studio and it was much faster. is there any way to speed it up from within arduino? or do you recommend using AVR studio? i don't really mind the ten minutes for the handful burns that i do.
ps:
how does the board-selection in version 0010 work? i can't get the Diecimila bootloader burned on an atmega168 (inside an arduinoNG). burning completes successfully, but the chip is useless. it just continously blink on pin13. if i select the ArduinoNG as a board and bootloader everything works fine. just with the old bootloader, which doesn't timeout on invalid data, or does it?
with version 0009 i had no problems burning each with the same hardware setup!?
Hmm, I think there's a way to change a setting on the AVRISP itself from within AVR Studio in a way that it persists when you use avrdude too.
The NG bootloader that comes with Arduino 0010 also times out on invalid data; if you've got an NG, you want the NG bootloader. They only difference between it and the Diecimila one is the number of blinks on startup (3 instead of 1) and a longer timeout. That continuous blinking is actually the Diecimila repeatedly timing out, restarting, and flashing the LED once on startup.