Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
    
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? – raxacoricofallapatorius 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)? – raxacoricofallapatorius 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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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