I'm trying to upload a hex file to an Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328. I burned the bootloader from the arduino IDE and I can upload sketches no problem. However, I have a hex file and no idea how to upload it.
Currently I have the command:
avrdude -C "C:/Program Files (x86)/Arduino/hardware/tools/avr/etc/avrdude.conf" -p atmega328p -c stk500v1 -P \.\COM13 -b 19200 -U flash:w:PATH_TO_HEX_HERE:i -U lock:w:0x0F:m
I'm getting the error:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
So what's wrong with the command? Is stk500v1 the right programmer?
"I have a hex file "
You need a Programmer that connects to SCK-MISO-MISO-Reset-Vcc-Gnd to load hex files.
stk500v1 is a programming protocol, not a programmer. I don't know how to use the USB/Serial interface to upload a hex file, it may certainly be possible.
Uno and bits as a Programmer from hex file on SD card:
Or my dedicated standalone programming board (runs the same code):
http://www.crossroadsfencing.com/BobuinoRev17/
My bad on the terminology. I don't have a programmer on hand (but I do have another arduino I used to burn the bootloader using ArduinoISP). Also no sd card breakout board + no time to wait for parts to arrive.
So what are my options?
I figured it out thanks to this: c++ - Uploading Arduino hex file using avrdude - Stack Overflow.
I enabled verbose upload in preferences and copied the command replacing the hex file.
The following worked:
avrdude -C"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v true -patmega328p -carduino -PCOM13 -b57600 -D -Uflash:w:C:\SimbleBCG.hex:i