I want to program my Arduino Mini Pro 328 5V, with a standard FTDI board. I want to program the board via the FTDI header (RX, TX, CTS pins), not the ISP pins(MISO, MOSI, SCK). But i dont like using the Arduino IDE. I would prefer to use avrdude or some equivalent, and script it via my preferred IDE, currently Platform I/O + Atom.
I have sucsesfully programmed via Arduino IDE, but have failed using avrdude.
I have tried several variation of the following command, but have failed. My understanding is that arvdude with programmer ft232r uses the ISP pins not the FTDI header, and i am not sure how to get around this. I have tried -p ft232r, arduino-ft232r, and some other variations
File > Preferences > Show verbose output during: > Upload(check)
Sketch > Upload
After the upload completes scroll the black console window at the bottom of the IDE window up until you see the AVRDUDE command that successfully uploaded to your Pro Mini. Use that as a reference for the command you use in your script.
for those interested the command given by Arduino IDE is
/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -carduino -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/tmp/build9081096245698280394.tmp/Blink.cpp.hex:i
I have simpilfied the command to:
avrdude -patmega328p -carduino -P/dev/ttyUSB0 -b57600 -D -Uflash:w:ExampleHexFile.hex:i
I tried the programmer "arduino", but missed the "-D" and "-b" flags which upload fails without.