As at today, the Arduino extension for Visual Studio Code relies on the arduino_builder as build manager. Problem is, it is especially slow.
The feature request is about using the standard GNU make with makefiles as build manager.
See this post in Gitter
Rome Li @akaroml June 13 05:27
@sytone PlatformIO has its own make logic instead of using what comes with Arduino IDE. That's why it can accept extra build parameters. We'll investigate how to achieve that goal but still keep the vanilla Arduino tool chain.
Agree
but why upload is really slower than with the Arduino IDE ?
Not the same builder used ?
Currently, the upload of VSCode is from this comands from this page:
https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc
which doesn't reuse the built out binaries.
It can use another tool calls arduino-builder but it take times.
Not using cached binaries seems to really increase compile times, especially when using large libraries. The official Arduino IDE does this, but VS Code seems to do a full rebuild on every verify. Adding --preserve-temp-files doesn't help, probably unsurprisingly.
Wait to see what arduino-cli can provide.
@liydu, Sorry to disagree. The post in Gitter was about exploring plain make along the Arduino tools solution.
Otherwise, by over-relying on Arduino tools, the whole Visual Code Studio Arduino extension is a mere front-end, not a real solution.
Have priorities shifted?
@ArthurMa1978 , this issue is duplicate with issue #478 , Can we close this issue?
@czgtest, @ArthurMa1978: I鈥檓 not sure this is a duplicate.
make with makefiles. @rei-vilo agree, it's not the same issue.
And for make, as liya mentioned above, we are working on a new iteration of this extension, both make and arduino-cli are candidates.
@czgtest
Maybe you can help with How to pass VSC variables from c_cpp_properties.json to a Task? #742.
@ArthurMa1978, @czgtest
Any news on this and related topics?
This extension relies on the integration with Arduino tooling. It was designed as straight integration for existing Arduino projects. If you use a different build tool like make or cmake many of the Arduino concepts here won't map in, e.g. board manager, libraries, etc. won't integrate with updating the other build script. I am open to further discussion, but I don't think this is something we would pursue. If you want to leverage Arduino tools for use from say CMake I think a toolchain file that knows where the Arduino compilers, libs, etc. are would be a good approach. It leaves open questions about upload etc. though. So which pieces should work together and which not?
With Arduino developing the Arduino Pro IDE based on Eclipse Theia, the Visual Studio Code extension for Arduino might no longer be relevant.
I am no longer using the Visual Studio Code extension for Arduino, so I am closing this ticket.
I think your feedback is valid, it raises some interesting questions so thank you for it.
On the make topic, I'm using embedXcode.
Most helpful comment
See this post in Gitter