Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Programmer setting is ignored, causing upload to fail #1722

Open
kaysond opened this issue Mar 11, 2024 · 8 comments
Open

Programmer setting is ignored, causing upload to fail #1722

kaysond opened this issue Mar 11, 2024 · 8 comments

Comments

@kaysond
Copy link

kaysond commented Mar 11, 2024

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"
@kaysond
Copy link
Author

kaysond commented Mar 11, 2024

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

@kaysond
Copy link
Author

kaysond commented Mar 20, 2024

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

@itodirel
Copy link
Member

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

@kaysond
Copy link
Author

kaysond commented Mar 25, 2024

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

You don't plan on supporting USB programmers?

@itodirel
Copy link
Member

itodirel commented Mar 25, 2024

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.

@kaysond
Copy link
Author

kaysond commented Mar 25, 2024

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...

@CodeAsm
Copy link

CodeAsm commented Apr 20, 2024

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

@buiapp
Copy link

buiapp commented Jul 8, 2024

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants