Pages: [1]   Go Down
Author Topic: avrdude to load bootloader and a program at the same time  (Read 1028 times)
0 Members and 1 Guest are viewing this topic.
Shrewsbury, MA
Offline Offline
Jr. Member
**
Karma: 2
Posts: 89
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have installed the libusb drivers for the avrisp mk2 programmer and that is working.  From the Arduino IDE if I choose to load a bootloader via the avrisp mk2 and then load my arduino sketch that works.  Does anyone know how to get to this to one step?

I was thinking there might be a way to do this if I installed a standalone version of avrdude.  I did get this loading a bootloader, but the chip didn't work.  I'm sure it's something else I'm missing (perhaps I could just use one of the makefiles that the arduino bootloader uses?).  But before I go to the trouble of this I thought I'd check to see if it's going to be reasonable to load the bootloader and an initial sketch?

Anyone have experience with this?

Thanks!
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can merge the .hex files to do that.

Just remove the ":00000001FF" line of your main program's .hex file and append the bootloader code.
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Shrewsbury, MA
Offline Offline
Jr. Member
**
Karma: 2
Posts: 89
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I finally got around to testing this and it worked great.  Thanks!
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4246
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm curious as to why you would want to use the AVRISP to load a bootloader along with the program?  You generally use a bootloader to load a program when you don't have or for some reason don't want to use an ISP programmer.

[Edit] Never mind -  I missed the word "initial" when I read it the first time.

Don
« Last Edit: March 16, 2011, 08:52:34 pm by floresta » Logged

Pages: [1]   Go Up
Jump to: