2

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

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 Dec 9 '15 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 Dec 13 '15 at 15:20
  • Can you elaborate a bit (in noob terms)? – orome Dec 14 '15 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 Dec 14 '15 at 3:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.