How do i burn .hex files to the ATMega328p using arduino and avrdude as AVR ISP

Hi,

After long hours of searching, the only thorough explanations i could find was for programming arduino code. atleast to my knoledge, I am really unexperienced, but usually seem to get there looking at instructables and so on...

I want to build a midipal, to do that i need to burn custom firmware/bootloader .hex file to a ATMega328p chip.

So what i'm asking for is, does any of you can give me a explanation of how this could be done with the arduino, and or have some good reference/tutorials/forum related threads in mind, that explanes this thorough, and most importantly for me to understand ;).

How do i burn .hex files to the ATMega328p using arduino and avrdude ?

Now for firmware flashing reference on this project: http://mutable-instruments.net/midipal/build

At Firmware setup he explance (in short) how to burn 2 .hex files with avrdude and set the fuses using 2 command lines.

I think this is all i need, the github link directs you to the bare bootloader.cc code.

What i want to do is build the ATMega328p version that can be found here:

I'm always on a tight budget so using the arduino and some inexpencive parts is my first choice atleast worth a try.. instead of buying a atmel avrisp mkii.

All help is much appreciated, thank you.

Check out these scripts... all of the needed runline commands are there: LINK

Ray

Another option:

mrburnette:
Check out these scripts...

Thank you, good link! this seems to get me further! atleast here i see commands containing flash and eeprom .hex files

The board i need to flash with firmware contains a (6pin) isp port, so i don't think i need to buy a shield, atleast if its possible to flash it "somewhat" directly i would prefer it that way.

The supplied voltage should be close to 3.3 volt on the board instead of the 5v (+Vcc) arduino. how do i do this?

I think this could also do the trick? any advice?: Arduino Playground - HomePage

Only thing is that i dont read anything about setting fuses.. also no info on burning flash and eeprom .hex files.

Is it possible to skip all the last steps (8-12) and use the given commands lines, slightly modified for arduino purpose offcourse.

for setting fuses:

avrdude -B 100 -V -p m328p -c avrispmkII -P usb -e -u -U efuse:w:0xfd:m -U hfuse:w:0xd4:m -U lfuse:w:0xff:m -U lock:w:0x2f:m

for flashing:

avrdude -B 1 -V -p m328p -c avrispmkII -P usb -U flash:w:midipal_flash_golden.hex:i -U eeprom:w:midipal_eeprom_golden.hex:i -U lock:w:0x2f:m

where "usb" should be replaced by the port arduino is using for instance "com1" ?
and offcourse set the place the .hex files are located.

@crossroads, thank you.. some good info on there as well.

You could use arduino IDE and the option "upload with programmer" , also selecting arduino as isp programmer option.

[quoteOnly thing is that i dont read anything about setting fuses.. also no info on burning flash and eeprom .hex files.

Is it possible to skip all the last steps (8-12) and use the given commands lines, slightly modified for arduino purpose offcourse.][/quote]

AVRDUDE could care less if you do one fuse at a time or all 3. You can create your own script of just type away at the Command console.

Maybe someone else has an answer for the 3.3V question in regard to ArduinoISP. I'd probably just use one of my bare 328 builds and run it at 3.3V but maybe better ideas are out there?

Ray