Compiler stuck on "Building..." when building Marlin Firmware

I’m using vscode and trying to compile my 3D printer firmware (Marlin 2.0x, Debug 2.0, and all other compatible options). It won’t compile at all, no messages or anything in progress. I’ve tried various solutions for other people but it won’t work for me.

I press check to compile and get the message: “> Executing task: C:\Users\patri.platformio\penv\Scripts\platformio.exe run <”
and with the blue box with the spinning cirle saying “Building…”

It’s supposed to complete within two minutes but I’ve left it for as long as two hours with no progress. Tried reinstalling both vscode and PIO separately and no luck.

Does PlatformIO work when you create a simple project for e.g. an Arduino Uno, using the reference example project? If that doesn’t work, it hints to a PlatformIO core installation problem.

Can you temporarily disable the antivirus software if it exists?

Thanks for the response! Same issue going on w/ the Arduino blink example.

I just wiped everything involving vscode and PIO from my harddrive, w/ uninstalling vscode altogether. I then reinstalled and still experiencing the same issue.

1 Like

That is a very tiny terminal window. Does no output appear after that after resizing, too?

Can you again:

  • Remove the PIO extension from VSCode
  • Remove the folder C:\Users\patri\.platformio\ completely
  • Re-install the PIO VSCode extension

Does the PIO Home screen show up at the start? Does compilation now work?

And you did try to disable the antivirus, too?

Been fighting same issue and after putting it aside for 5months, tried something that seems to work around. Still no compiler output in Terminal, but copy/pasted my firmware folder contents to new directory on desktop and saved it as a new workspace in same folder which I named MARLIN… Opened that workspace/directory, and it builds silently showing a folder for STM32F103RC_btt_512k in pio>build. Takes a long while however(not minutes) until a firmware.bin shows up. Copied that to sdcard and it uploaded to the skr_mini_e3_v1.2 works perfect.

Little late to the game here… I had this issue as well, I ended up fixing win 11 python issues, link below. I also had to upgrade python3 setuptools/wheel/pip pkgs, after all that, it finally worked.