Welcome! Log In Create A New Profile

Advanced

Can I build Marlin with PlatformIO CLI (i.e. without VSCode) ?

Posted by Tornado-Markus 
Can I build Marlin with PlatformIO CLI (i.e. without VSCode) ?
May 20, 2021 10:53AM
Hi, I've just learned here that I need to switch from Arduino IDE (which I am familiar with) to VSCode / PlatformIO (which I'm both new to).

For Linux users, VSCode is hard to set up, e.g. it does not find the PlatformIO IDE extension in the marketplace. But I think there is a solution: As far as I understand, PlatformIO (core) has a CLI (command line interface), and Linux users usually are not afraid of the command line. :-)

I'm not experienced enough in microcontroller programming to contribute source code anyway, so the editing functions of VSCode are not important in my case. For Configuration.h, any text editor will do. :-)

As I wrote above, I'm also new to PlatformIO, and I could not figure out how I start the build process. Can somebody help me ?

Thanks.
Re: Can I build Marlin with PlatformIO CLI (i.e. without VSCode) ?
May 20, 2021 10:04PM
"For Linux users, VSCode is hard to set up, e.g. it does not find the PlatformIO IDE extension in the marketplace. "

This is not correct.

I use PlatformIO in vscode under Ubuntu all the time. As do many many others.

In vscode you click on the build icon, on the bottom task bar

In command line you run "pio run"
Re: Can I build Marlin with PlatformIO CLI (i.e. without VSCode) ?
May 21, 2021 03:37AM
In that case, Ubuntu seems to have a customized or extended version of vscode. The version you get on Arch Linux (and any Arch derivative, e.g. Manjaro) does not find the extension. So I can not click on the build icon.

As I wrote, I'm also new to platformio. And I've tried a few commands like
pio run --target build
with some variations. None of them worked, that's why I've asked here.

If you click on "build" in your working vscode installation, does it say what it runs ? If so, could you please paste these commands here in this thread ? I'm mostly interested in build and (if here is one) clean Edit: and upload.

Edited 1 time(s). Last edit at 05/21/2021 03:47AM by Tornado-Markus.
Re: Can I build Marlin with PlatformIO CLI (i.e. without VSCode) ?
May 21, 2021 11:40PM
it runs "pio run" where pio is in path /home/{username}/.platformio/penv/bin/pio
This must be executed in the Marlin directory with the platfomio.ini file.

It uses the default_envs in platformio.ini to set the build environment.
Sorry, only registered users may post in this forum.

Click here to login