Community
Participate
Working Groups
Arduino CDT should support the auto-reset feature of Arduino boards and the loading of a program on the board without the need to press the board's hardware reset button. This feature is implemented by the Arduino IDE. Note that there are different auto-reset strategies for different Arduino boards. Uno: https://www.arduino.cc/en/Main/ArduinoBoardUno#documentation "Automatic (Software) Reset One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino Software (IDE) uses this capability to allow you to upload code by simply pressing the upload button in the interface toolbar. " Leonardo/Micro: https://www.arduino.cc/en/Guide/ArduinoLeonardoMicro#toc12 "(Note that the auto-reset is initiated when the computer opens the serial port at 1200 baud and then closes it; this won't work if something interferes with the board's USB communication - e.g. disabling interrupts.)"
Created attachment 258466 [details] pyton script that resets the Arduino Micro board connected on /dev/micro (Linux)
Isn't that implemented in the Arduino uploaders? The IDE just calls out to them passing them the arguments specified in the platform.txt file.
(In reply to Doug Schaefer from comment #2) > Isn't that implemented in the Arduino uploaders? The IDE just calls out to > them passing them the arguments specified in the platform.txt file. https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java#L106 It seems that it is implemented in the IDE. Also, according to the comments, it seems that only Leonardo and derivatives need this "use_1200bps_touch" strategy.
I don't have a Leonardo but I do have a Uno and I'm getting auto-resets without this. Seems like this should be avrdude's responsibility. But I'm not sure about the Leo.
(In reply to Doug Schaefer from comment #4) I have an Ardiuno Micro, which is a Leonardo "derivative". (same hardware, different form factor). I am quite sure it does not reset if just avrdude is started. See "Uploading Code to the Leonardo and Micro" https://www.arduino.cc/en/Guide/ArduinoLeonardoMicro#toc12 Also - the Ardiuno IDE sourcecode (see github link in bug description) shows that the IDE performs the Leonardo-specific reset sequence "open/close 1200 baud".
> Also, according to the comments, it seems that only Leonardo and derivatives > need this "use_1200bps_touch" strategy. It seems as the Arduino IDE has definitely to set the port to 1200 bps to initiate the reset into the bootloader. Further on the bootloader is now on a different COM port that has to be identified and then passed to avrdude to achieve a sucessful upload. A batch file perfoming the necessary steps under windows can be found here: https://github.com/p1ne/arduino-leonardo-uploader Could this be implemented into Eclipse C++ IDE for Arduino ? I think this might improve the acceptance for users that have experiences on the arduino IDE and might give eclipse with its more sophisticated code management a chance. greetings
I modified the batch script mentioned in the previos comment a little bit: https://github.com/zephram2015/avrdude_autoreset_wrapper Not quite the pure eclipse way, but flashing and uploading now works seamlessly.
Thank you for taking the time to file a bug report about the Arduino component of the CDT project. The Arduino component is no longer maintained and will be removed from CDT 10 (Bug 562498). The final Eclipse CDT version that will include Arduino support is the CDT 9.11 series. Please consider using The Arduino Eclipse IDE and plug-ins named Sloeber (https://marketplace.eclipse.org/node/2637354) for your future Eclipse CDT powered Arduino development.