SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By vputz
#154753
Tried the Arduino and Adafruit fora; going for three :)

I remember taking a class at Sparkfun and watching them burn a sketch onto a pro or simon kit using avrdude. So I've gotten that far myself with a USBTiny and a minimalist ZIF socket board.

But for an upcoming project (an interface between an old serial gaming device and USB HID, like a hardware driver) I want to be able to ship with a preloaded sketch so people who assemble it can plug and play without additional steps, but also with the bootloader preloaded so that they can upload new sketches with the Arduino environment using a FTDI cable rather than forcing them to get an ISP.

Is there a way to flash both at the same time in one pass using an ISP like USBTiny? I'm assuming it means making one big .hex file, but I'm unclear how to do that.
Last edited by vputz on Sun Feb 03, 2013 8:19 am, edited 1 time in total.
By vputz
#154974
MMMV, and you may not have tried it, but it's the only useful response I've gotten on three different fora. There may be a "better way" but I'm sure going to try this this weekend. Thanks!
By vputz
#155050
Solved, by the option of reading the full chip and writing it (backup/restore) rather than properly "uploading the software".
Code: Select all
avrdude -C ..\etc\avrdude.conf -p m328p -c usbtiny -U flash:r:backup_flash.bin:r
avrdude -C ..\etc\avrdude.conf -p m328p -c usbtiny -U eeprom:r:backup_eeprom.bin:r
avrdude -C ..\etc\avrdude.conf -p m328p -c usbtiny -U hfuse:r:backup_hfuse.bin:r
avrdude -C ..\etc\avrdude.conf -p m328p -c usbtiny -U lfuse:r:backup_lfuse.bin:r
avrdude -C ..\etc\avrdude.conf -p m328p -c usbtiny -U efuse:r:backup_efuse.bin:r
and then swapping chips and doing
Code: Select all
avrdude -C ..\etc\avrdude.conf -p m328p -c usbtiny -U flash:w:backup_flash.bin
avrdude -C ..\etc\avrdude.conf -p m328p -c usbtiny -U eeprom:w:backup_eeprom.bin
avrdude -C ..\etc\avrdude.conf -p m328p -c usbtiny -U hfuse:w:backup_hfuse.bin
avrdude -C ..\etc\avrdude.conf -p m328p -c usbtiny -U lfuse:w:backup_lfuse.bin
avrdude -C ..\etc\avrdude.conf -p m328p -c usbtiny -U efuse:w:backup_efuse.bin
It didn't seem to work with just "flash", so I added everything else. Perhaps overkill, but it works.
By zshnhaque
#168955
Hi all,
I have successfully made my own arduino using Atmega328, but I problem I am facing that I have to bootload the atmega328 chip every time when I have to update the sketch. Can anyone suggest solution for this?