microsoft / vscode-arduino

Visual Studio Code extension for Arduino

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Programmer setting is ignored, causing upload to fail

kaysond opened this issue · comments

I have a USBASP programmer, and my arduino.json has "programmer": "usbasp". I have no choice but to set a COM port, or the extension won't allow me to upload In this case I used "port": "port" as suggested in #630 (comment). The programmer setting then seems to be ignored, as avrdude tries to upload via the com port even though I've selected my programmer.

"C:\Users\aram\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\aram\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-Pport" -b57600 -D "-Uflash:w:y:\git\hawgtrophy\build/hawgtrophy.ino.hex:i"

This looks like a pretty easy fix, and I'd be happy to submit the PR if you'll merge it.

Update src/arduinio/programmer.ts to parse *.communication from programmers.txt.

Update

if (!dc.port) {
await selectSerial();
return false;
}
if (this.useArduinoCli()) {
args.push("compile",
"--upload",
"--programmer", programmer);
} else {
args.push("--upload",
"--useprogrammer",
"--pref", `programmer=${programmer}`);
}
args.push("--port", dc.port);

and

if (!dc.port) {
await selectSerial();
return false;
}
if (!this.useArduinoCli()) {
arduinoChannel.error("This command is only available when using the Arduino CLI");
return false;
}
args.push("upload",
"--programmer", programmer,
"--port", dc.port);

to only call selectSerial and push the argument if *.communication === "serial

Bumping. @gcampbell-msft - is this project still active?

Hi, we see this as a feature request. At this time we don't plan on supporting this scenario.

At this time we don't plan on supporting this scenario.

You don't plan on supporting USB programmers?

We don't plan on supporting the scenario you outlined. If you connect an Arduino via USB and use the built-in bootloader, that's the only scenario we support and that should work. If you have issues with that scenario, let us know.

We don't plan on supporting the scenario you outlined. If you connect an Arduino via USB and use the built-in bootloader, that's the only scenario we support and that should work. If you have issues with that scenario, let us know.

That's disappointing. Why such limited support? There seems to be a lot of interest from the community to improve the extension, but not so much from Microsoft to accept the help...

Please support this scenario. the core of teh arduino is being able to programm arduino boards. If the bootloader is missing, using a usbasp, same for debugging

Please support this. Because of this missing feature my team can't completely ditch the Arduino IDE.