Running an Arduino program without a boot loader.

I keep hearing that the bootloader is not required, However, after many searches and lots of google, I have not come across the steps required. I'm on a Mac, so, I'd rather not use AVR studio. I've worked out the bugs with my code, and have a bare circuit with the 328. I can "upload using programmer" (avrisp mkII). However with no bootloader this will not run.

Are there any good tutorials on the steps needed to set the vectors and fuses to run without a boot loader?

Thanks.

Set the fuses with: Tools->Burn Bootloader

Then upload the sketch with: File->Upload Using Programmer

http://www.gammon.com.au/forum/?id=11637

IF one does a lots of breadboarding with bare 328s, something like this is useful if you have a spare UNO laying around http://www.adafruit.com/products/462

Also, easy to build as a strip board project for under $7.

Ray

Don’t forget to reset the fuses NOT to start at the bootloader address, if your program actually goes that far.
Normally, using “upload using programmer”, there will be useless but not damaging instructions at the bootloader location, and starting there will shortly end up at the beginning of memory and the actual sketch start address. But if your sketch actually had code or data at those locations, lots of bad things could happen.

Don't forget to reset the fuses NOT to start at the bootloader address,

ADVDUDE should not allow this to happen from the Arduino GUI. One could mess up things from the commandline with the "-D" switch:

-D Disable auto erase for flash. When the -U option with flash memory is specified, avrdude will perform a chip erase before starting any of the programming operations, since it generally is a mistake to program the flash without performing an erase first. This option disables that. Auto erase is not used for ATxmega devices as these devices can use page erase before writing each page so no explicit chip erase is required. Note however that any page not affected by the current operation will retain its previous contents.

Odd that after asking how to run without a boot loader, I'm told to load the bootloader..

The issues is that I'm not using a crystal. If I "burn bootloader" the chip will stop working.

I've used avrdude to read and set the fuses (the defaults were mostly OK). The Amtel spec sheet was a great help. Then I used upload using programmer.

This has been successful so far.

Thanks, Dave

Odd that after asking how to run without a boot loader, I'm told to load the bootloader..

Yep. The fuses need to be set appropriately. If one were to not want to read the datasheet or fiddle with avrdude, the easiest way to get the clock fuse settings "correct" is to use a "burn bootloader" command on a "board" that matches the target hardware.

This has been successful so far.

So your initial problem was resolved by "use avrdude to set fuses" ?

westfw: So your initial problem was resolved by "use avrdude to set fuses" ?

Yes, the 8x clock divider was causing a timing issue that made it appear that the program was not running at all. After reading the spec sheet, avrdude manual, and http://www.ladyada.net/learn/avr/fuses.html page, I was able to clear it up.

DaveOldham: Odd that after asking how to run without a boot loader, I'm told to load the bootloader..

I have a sketch that lets you alter fuses. It has nothing to do with the bootloader.

http://www.gammon.com.au/forum/?id=11638

You can also change fuses using avrdude.