PlatformIO Community

Platformio build fails

Well I was having no luck with Windows, so I did install Linux on the laptop. Linux took a little while getting around it but vscode and platformio built right away. Copied it to SD card and flashed my printer. Works like a charm. Little awkward having to break out the laptop just to build firmware but I won’t be doing that very often, so that will be great. Again thanks for all your time and effort. I’m sure if I would have stayed with you guys on this we would have gotten it to work on windows. But, as I said, being 85 I can’t spend too much time on anything. Got a todo list a mile long. At least now I can start making some 3d printed jigs for my w0\ood shop. Thanks so much and I hope you have a great Year (well lors of years). Bye larsnavy

1 Like

Good luck, and happy printing! Glad you got something working for you in the end! :slight_smile:

Hello. Having the exactly same issue with exactly same results. All i wanted is to modify Bigtreetech TFT35 touchsceen firmware, disable few features like BLtouch. What should have been a 5 minute job turned into a 3h+ search on the internet for a solution.
When I had everything ready to complie and hit BUILD, I got this msg in terminal:
The terminal process command ‘C:\Users\me.platformio\penv\Scripts\platformio.exe run’ failed to launch (exit code: {2}).
I tried a few things you suggested above, when trying to open a new terminal from inside VSC I get:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe’ failed to launch (exit code: {2})

Manual launch of those programs works fine, just not through VSC.
Windows always updated, VSC was installed today, so it should be up to date.

Anybody any idea what else to try or is this a lost cause, by the looks of posts above?

Thank you

I think the issue is (yet again, a change made in a recent version of VSCode :confused:) …

Judging from these issues…

… it looks like they’re really pushing for the newer terminal subsystem, and that’s causing some … issues… partly because it requires a newer build of Windows 10, and probably hasn’t been fully tested across all possible configurations since it’s still a work in progress. Setting "terminal.integrated.windowsEnableConpty": false, and falling back to the older winpty seemed to help one user.

The other possibility, although it’s an older one cuplrit, could be that you also get an exit code: 2 error when there are files/folders missing, and the workspace is out of sync with those changes (as it is supposed to be a ‘file/folder not found’ error code)… but since it sounds like you only just got things set up, it shouldn’t be the case.

thanks for your indepth reply.
I looked at those links, won’t lie, I don’t understand all of it. I wanted to try disabling the Conpty in settings.json, but can’t find that file in my folders where I have my TFT35 touchscreen firmware. But even if, I somehow doubt it would help me.
I’ll just wait for some kind of update and wait with my touchscreen for the time being.

Thank you.

Ok, so the setting is also directly available in the GUI, not just in the VSCode settings.json configuration file… just untick the ‘Enable Conpty’ checkbox as shown at 5. If you really wanted to play with the settings.json file, you’d click the icon at the top right that looks sort of looks like a page turn icon… but there’s no need since the options in the main GUI.

Fingers crossed that works! :wink:

Hello pfeerick,

Just joined this community so please excuse any errors in protocol I make:

Discovered this conversation and am hoping you may be able to help with the following problem I am having:

BTT SKR MINI E3 V1.2 Board - Ender 3 - Windows 10 64 bit pc

Have attempted to flash firmware without success if I BUILD the firmware.bin file from various BTT or Marlin2.0 downloads from github - (including the one by Ivan Kravets).
Am able to COMPILE SUCCESSFULLY but cannot flash the firmware.bin file generated USING my pc - (VSCode/PlatformIO)
Red leds flash - blank screen on printer -
A firmware.cur file is written to the sd card but is apparently blank or corrupted because it cannot be deleted from sd card - must reformat card to erase it
However, if I use the downloaded PRECOMPILED firmware.bin file from github, then the flash is SUCCESFUL! A good .cur file is produced.
Updated to the latest PlatformIO release but this makes no difference -
Read that this problem may be resolved by downgrading to earlier release of PlatformIO but have been unable to find out how to do this.
Have spent many hours trying to research this problem. Thus far the only information I have found is that apparently many others are experiencing the same issue -
(FYI: Before upgrading to SKR MINI E3 Board was able to successfully compile and flash Marlin bugfix 2.0.X to the stock Creality Ender 3 Board - no firmware.bin involved) using the VS Code/PlatformIO installation)
Would very much appreciate your assistance
Thank you

1 Like

Are you having the the exact same error as described in this thread, C:\users\me.platformio.exe run’ failed to launch (exit code: {2})? If not, you already opened your own thread in which your error is discussed, so better not post in this thread.

1 Like

thanks for your effort pfeerick, but disabling the Terminal Conpty didn’t solve the issue. still same error

EDIT: I fixed it. the build went through and finished compiling with success!! it was the Malwarebytes software I was running in the background, turned it off and the compile went through.
I hope this helps somebody.
Check your antivirus and/or anti-malware softwares running in the background. It is blocking access.

thank you all for your time!

3 Likes

This fixed it for me too! I went to the extent of setting up visual studio code and platformIO on a VM with linux for a work around. Glad to see that a fix has been found. Cheers

1 Like

Yuk! And Malwarebytes didn’t warn you? How rude. Thankfully my version seems to place nice… I’ve yet to have it trigger when it shouldn’t. Bitdefender on the other hand… sheesh… made the mistake of not re-configuring my projects folder to NOT be in my Documents folder the other day after updating… Bitdefender then persistently and consistently blocked every single process in the compile toolchain when I tried to compile a project… so I had to go in and exclude/mark safe a the process, try to build again, exclude/mark safe the next blocked process, rinse, repeat… sigh… antivirus software can be so over-eager to show it’s doing something at times…

yup, really rude o.O got us guessing into oblivion. But I know what you mean, anti-viruses never stopped my computer from being eaten up by viruses before, but intrude when it has nothing to do with them, like in this case now.
Ah well, at least this got solved. How silly, sometimes the most simple solutions are right in front of our noses and never see it.

What is your antivirus?

I use Malwarebytes and the default windows defender firewall. I use Wise Care 365 to clean my registry and cache twice a month or so and also use Wise Program Uninstaller when removing software or games. You wouldn’t believe how many files and reg entries are left behind after a regular uninstall.
All of these keep my Windows10 running smooth, bug, malware and virus free.
WiseProgram uninstaller is free.
Check it out, it will help your PC run faster much longer.

1 Like