Go Down

Topic: avrdude to load bootloader and a program at the same time (Read 1 time) previous topic - next topic

GlacialWanderer

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!

madworm

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

GlacialWanderer

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

floresta

#3
Mar 17, 2011, 02:50 am Last Edit: Mar 17, 2011, 02:52 am by floresta Reason: 1
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

t0bias

Hello everybody,

I started writing a simple tool a couple of days ago for just this task: merging two Arduino Hex-files into one.
If you are brave enough to try some beta-software, please go ahead here: https://github.com/tobiasvogel/hexMerger  ;)

The latest released version can always be found under "Release" at the top of the page.

Please be aware that I just started this project, so there may be bugs, or it even may not work at all under certain circumstances.
Leave a comment or feedback and I will be happy to review it and improve the tool as far as I can!

Thanks!

Go Up