Pages: [1] 2   Go Down
Author Topic: AVR Bootloader burn error in Arduino 9 and 10  (Read 2031 times)
0 Members and 1 Guest are viewing this topic.
Oakland California
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Any and all info, much appreciated.

Dave

Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you use the AVRISP mkII to burn any other chips?  Those things seem to die surprisingly easily.
« Last Edit: October 18, 2007, 12:38:23 pm by mellis » Logged

Oakland California
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Dave
Logged

Oakland California
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

what things die easily? The mkII or the 168 chips? smiley-wink
Logged

Oakland California
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Oakland California
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Mellis,
Yeah, I tried burning the bootloader as the 168 on an NG board, but so far NG smiley-wink 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?

Thanks!

Dave
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Forum Administrator
MMX
Offline Offline
Edison Member
*****
Karma: 37
Posts: 1139
hallo kompis
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Dave,

same problem here:

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 ;-)

/d
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you using an AVR ISP mkII also?  Let us know how the command line tests turn out.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 81
everywhen
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
I have yesterday received my AVRISP mkII and had troubles using the builtin arduino burn bootloader function which uses avrdude.

The error I'm getting is,
avrdude: usbdev_open(): did not find any USB device "usb"

I did however find this guide useful:
http://www.arduino.cc/playground/Learning/Burn168

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:
Quote
8. 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.

GL
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

yerg2k: what operating system are you using?
Logged

berlin
Offline Offline
Sr. Member
****
Karma: 0
Posts: 295
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.



Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

berlin
Offline Offline
Sr. Member
****
Karma: 0
Posts: 295
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!?

//kuk
« Last Edit: November 18, 2007, 11:25:58 pm by leKuk » Logged

Pages: [1] 2   Go Up
Jump to: