The command line that my toolchain (CLion + PlatformIO) uses to program my Arduino (Uno) includes includes
avrdude ... -c arduino ...
but the documentation for this programmer simply reads
-c programmer-id
...
arduino Arduino
...
What does the arduino
programmer do. Does it just correspond to using the bootloader?
1 Answer 1
Yes, the -c option specifies the methods of interacting with the device's loader.
The source code of the arduino programmer is http://svn.savannah.nongnu.org/viewvc/trunk/avrdude/arduino.c?root=avrdude&view=markup
Specifically, '-c arduino' chooses the client side code tailored to the bootloader in the Arduino Uno. Looking at the code in the above link, it tweaks the DTR and RTS lines to get the Ardunino into an stk500 compatible mode, and then invokes the stk500 protocol.
-
Yes, I know the
-c
option generally specifies "methods of interacting". The question is: What does choosing-c arduino
do? Specifically, is it using the bootloader, when I'm connected to the Uno using the serial port?orome– orome2015年12月09日 12:56:22 +00:00Commented Dec 9, 2015 at 12:56 -
1'-c arduino' chooses the client side code tailored to the bootloader in the Arduino Uno. Looking at the code, it tweaks the DTR and RTS lines to get the Ardunino into an stk500 compatibple mode, and then invokes that.Dave X– Dave X2015年12月13日 15:20:45 +00:00Commented Dec 13, 2015 at 15:20
-
Can you elaborate a bit (in noob terms)?orome– orome2015年12月14日 00:20:59 +00:00Commented Dec 14, 2015 at 0:20
-
I don't know much, but I'd look in the code and "Trust the source, Luke". The avrdude has '-c ??????' options for a large number of embedded systems, and from a cursory browse, it seems like each one may have different initialization and protocol schemes. The '-c arduino' has its own that apparently works with whatever is normally loaded into the arduino's bootloader. You can look at the avrdude code to see how one side interacts with the other. I don't know what's in the chip's bootloader, but maybe arduino.cc/en/Hacking/Bootloader would help you.Dave X– Dave X2015年12月14日 03:14:07 +00:00Commented Dec 14, 2015 at 3:14