Go Down

Topic: use Arduino sketch without bootloader? (Read 7367 times) previous topic - next topic

kg4wsv

Is it possible to use the Arduino output (the .hex file, specifically) to program an ATmega without the bootloader?

I've got an application where it is critical that the bootloader not hang the system when it starts, and I will definitely have a serial device spewing characters at the arduino on powerup.

ideas?

-j

mellis

You can burn your sketch directly onto the board, replacing the bootloader.  There are some instructions at: http://www.arduino.cc/en/Hacking/Programmer, but post again if you have more questions - that's not the most comprehensive page.

kg4wsv

thanks!

A couple of questions:  the instructions say to make three changes to preferences.txt, but they only mention 2.  What's the third?

I thought the hex file included the address of the program/data to be loaded to memory.  Is this true, and if so, how does it know to start at 0 instead of 0x1000 above the bootloader?

thanks again,
-j

mellis

I was counting upload.erase and upload.verify as separate changes, making three total.  Your sketch always starts at location 0 - the bootloader's actually at the end of memory - so you don't need to change anything.

Go Up