arduino / arduino/ArduinoCore-avr

Programmer Speed setting is ignored when USB port is used. [imported]

Open
#202 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1.5k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

This is [Issue 1087](http://code.google.com/p/arduino/issues/detail?id=1087) moved from a Google Code project.
Added by 2012-10-29T03:37:49.000Z by [w...@wolfpaulus.com](http://code.google.com/u/112812210174415916443/).
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium
### Original description

**What steps will reproduce the problem?**
1. create a speed setting for a programmer in the hardware/programmers.txt file
2. upload a sketch using the programmer
3. see that the speed is totally ignored for USB programmers

**What is the expected output? What do you see instead?**
apply the -b setting to Avrdude no matter if usb or serial programmers are used.

What version of the Arduino software are you using? 1.0.1
On what operating system? Mac
Which Arduino board are you using? Uno, NG, ProNano, custom

**Please provide any additional information below.**
Here is the source in AvrdudeUploader.java that shows the ignored -b parameter for USB based programmers:

private Collection getProgrammerCommands(Target target, String programmer) {
Map programmerPreferences = target.getProgrammers().get(programmer);
List params = new ArrayList();
params.add("-c" + programmerPreferences.get("protocol"));

```
if ("usb".equals(programmerPreferences.get("communication"))) {
params.add("-Pusb");
} else if ("serial".equals(programmerPreferences.get("communication"))) {
params.add("-P" + (Base.isWindows() ? "\\\\.\\" : "") + Preferences.get("serial.port"));
if (programmerPreferences.get("speed") != null) {
params.add("-b" + Integer.parseInt(programmerPreferences.get("speed")));
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in AvrdudeUploader.java, especially getProgrammerCommands, and compare its handling of the speed entry from hardware/programmers.txt for USB and serial programmers. Reproduce an upload with a USB programmer and verify that the generated avrdude command applies the configured speed setting in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.