Wrong build workflow causes freeze

Hello All,

So I was building Marlin 2.0 firmware (which is a long process on PIO, why?) on Visual Studio Code (VSC) and PlatformIO using Build command and my 3D printer was connected to my computer. I reset my printer, and the VSC window freezed.

While I investigate the stuation, I noticed that PIO locks up the printer drive in the begining of build process, even I was not uploading the code. (I was using Platform IO: Build command).

Then I searched about disabling the upload feature and find nothing about it, I tried some arbitary string on upload_port like upload_port = none, but it not worked. It just nags about this and fallls in to the default behaviour which is locking the drive.

So my question is, why PIO locksup the drive (or serial, or whatever connection mode is used) in the begining of build process? Why it is not locking the upload port until after the compilation finished, and while it is actually trying to upload the code?

Marlin takes 20 minutes to build on my computer so I want to change build workflow from

  • Lock Drive
  • Build
  • End
  • Build
  • End

How can I do that?