Run arduino HEX code in raw avr?

Once I get a project debugged on the Arduino board which uses the ATmega328, is there .HEX file I can just burn into a stock ATmega328 using AVR Studio? Meaning an AVR chip without the Arduino boot loader?

I know AVRs inside and out for 10 years now using the Image Craft compiler. But the Arduino offers some great libraries.

At the time of compilation, the Arduino IDE creates a firmware file in a temporary directory. When you click "download" you can read in the IDE messages where this file is located.
It can be copied and flashed into any other AVR of the same model, not only in an arduino board

A factory-fresh ATmega328P is configured to use the internal 8 MHz RC clock with a prescale of 8. If you burn an Arduino UNO .HEX to it, your sketch will run fine but at 1/16th speed.

If you turn off the prescale (you can do that in your sketch or use a programmer to set the configuration fuse to turn it off) your sketch will run at 1/2 speed (8 MHz).

To run at full speed you will have to provide a 16 MHz crystal or resonator and use a programmer to configure the fuses to select the crystal clock.

After that, all you need is Vcc (3.8V to 5.5V), Ground, and bypass capacitors, and your sketch will run. Search for "Bare-Bones Arduino" for schematics and circuit boards you can buy.

To program an ATmega328 blank from the factory (if you can find one) you would use an ISP (in circuit programmer) I don't know if AVR Studio supports one but I'm sure others do.

I've used a "AVRISP mkII " clone from the Arduino IDE. But I know you can use other Arduino boards.

I would be surprised if the AVR studio did not support the AVRISP mkII .

The final sketch has no dependencies on the bootloader, and will run on an avr chip with or without the bootloader present (assuming fuses are set correctly.)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.