Dukebats / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

IDE uses bootloader folder name rather than upload protocol to determine upload protocol #1003

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In "boards.txt" change bootloader.path value for any board using the avr109 
USB upload protocol to anything but "caterina".
2. Attempt to upload a sketch to that board.

What is the expected output?
Arduino IDE should report that it changes the baud rate to 1200 and 
opens/closes the port; then it should wait until the current port disappears 
from the port list and a new one appears. It should use the new port to upload 
code to the board via avrdude.

What do you see instead?
Arduino IDE immediately attempts to upload code to the board without first 
activating the bootloader. avrdude communications fail because the bootloader 
isn't running.

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?
Using v1.0.1 under Win7 Pro; using a custom board.

Original issue reported on code.google.com by mike.h...@gmail.com on 9 Aug 2012 at 6:07

GoogleCodeExporter commented 9 years ago
Addendum- the offending line is line 88 in the AvrdudeUploader.java file.

Changing:
if((boardPreferences.get("uplo.path") != null && 
boardPreferences.get("bootloader.path").equals("caterina")))

to

if(protocol.equals("avr109"))

resolves the issue by checking the protocol used by the board rather than the 
bootloader name. This allows custom bootloader paths.

Original comment by mike.h...@gmail.com on 9 Aug 2012 at 9:09

GoogleCodeExporter commented 9 years ago
This is solved in Arduino 1.5 with the keyword:

upload.use_1200bps_touch=true

see:

https://github.com/arduino/Arduino/blob/429b5168d82a76b94e9360d9b416e5808e420119
/hardware/arduino/avr/boards.txt#L224

https://github.com/arduino/Arduino/pull/1547

C

Original comment by c.mag...@arduino.cc on 18 Oct 2013 at 10:24