Hanging on create project/project examples

I really want to like this platform but it’s fighting me all the way.

Every time I try to create a project it either hangs for hours with the “Please be patient” slideshow, fiddles about for a minute or so then throws an error, or just throws the error right away.

The errors have been different I think (hard to tell because it’s an unformatted slab of text) but the last time I got this

PIO Core Call Error:
"The current working directory C:\Users\graynomad\Documents\PlatformIO\Projects\test will be used for the project.\r\n\r\n
The next files/directories have been created in C:\Users\graynomad\Documents\PlatformIO\Projects\test\r\n
include - Put project header files here\r\n
lib - Put here project specific (private) libraries\r\n
src - Put project source files here\r\n
platformio.ini - Project Configuration File\r\n\n\n
Error: Processing zeroUSB (platform: atmelsam; board: zeroUSB; framework: arduino)\r\n
Tool Manager: Installing platformio/framework-arduino-samd @ ~1.8.10\r\n
Tool Manager: framework-arduino-samd @ 1.8.11 has been installed!\r\n
Tool Manager: Installing platformio/framework-cmsis @ ~1.40500.0\r\n
Tool Manager: framework-cmsis @ 1.40500.0 has been installed!\r\n
======================== [SUCCESS] Took 111.11 seconds ========================"

Note that it says success. It always does and it seems that the directory structure has indeed been created but not populated with any files except READMEs, and nothing appears in the VScode explorer panel.

I’ve read many similar threads but none seem to provide an answer, mostly talking about uninstalling Python etc but I don’t seem to have Python installed in the first place.


Does this appear with the latest versions of everything?

  • VSCode PlatformIO extension version at 2.2.1?
  • PlatformIO core updated to latest dev version using the CLI and pio upgrade --dev followed by a VSCode restart?

I just downloaded everything yesterday so I assume it’s the latest.

How do I tell? All I can see is Core 5.0.4 and Home 3.3.1

Doing pio upgrade --dev now

Tried to load the “blink” example

PIO Core Call Error: "The current working directory C:\Users\graynomad\Documents\PlatformIO\Projects\210112-210923-arduino-blink will be used for the project.\r\n\r\n
The next files/directories have been created in C:\Users\graynomad\Documents\PlatformIO\Projects\210112-210923-arduino-blink\r\ninclude - Put project header files here\r\nlib - Put here project specific (private) libraries\r\nsrc - Put project source files here\r\nplatformio.ini - Project Configuration File\r\n\n\n

Error: Processing uno (platform: atmelavr; framework: arduino; board: uno)\r\n

--------------------------------------------------------------------------------\r\n========================= [SUCCESS] Took 0.21 seconds =========================\r\n\r\nEnvironment Status Duration\r\n------------- -------- ------------\r\nuno SUCCESS 00:00:00.210\r\n========================= 1 succeeded in 00:00:00.210 ========================="

Same thing

1 Like

Found the extension version, v2.2.1

Seems like a bug, I’ve opened Initializing project gives "PIO Core Call Error" although error text says "Succeeded" · Issue #2308 · platformio/platformio-vscode-ide · GitHub, please participate there if questions arise.

After the project files were created, these should still be loadable with the “Open Project” button in PIO Home though.

I can open the the project but there are NO files in it except READMEs.

But it seems that I can compile and download

12-01-2021 9-20-05 PM

How is that even possible with no source code?

12-01-2021 9-21-19 PM

Hm if it’s for the Arduino framework it should have triggered the logic to auto-generate a src\main.cpp with some basic code.

Can you try these things:

  • close VSCode
  • remove all folders within C:\Users\<user>\.platformio\platforms
  • remove all folders within C:\Users\<user>\.platformio\packages
  • Deactivate Antivirus
  • Startup VSCode
  • wait for the initial download to be finished (this might take a minute) and the PIO Home screen to be shown
  • Retry creating a project

Getting there, but something is odd.

The project seems to be properly populated with files now bit it compiled a huge amount of stuff (mostly Adafruit) and now is taking forever to upload.

12-01-2021 10-03-44 PM

That is expected since PlatformIO needs to have the framework packages, aka the Arduino cores, and the compiler, and the upload tools, and platform files… All that is only downloaded on demand when a user creates and compiles a project for that.

And different boards use different cores. Your Adafruit Metro M4 uses the Adafruit SAMD core while the Due uses Arduino’s SAMD21 core.

Once downloaded, it will be faster. All the framework’s source files will still have to be compiled though on a build. (But not if only the user’s project file change – PlatformIO is well capable of caching).

OK. What about the upload time, it’s still going, been about 10 minutes now.

Is it uploading or compiling? The BOSSAC firmware upload procedure can’t possibly take this long. Screenshot?

12-01-2021 10-14-00 PM

I killed it and started again. Same thing.

o_O. Please abort it with Ctrl+C.

Then use the PIO sidebar to go to the project tasks and from there Due -> Build.

Does the build okay and only once?
Does then “Upload” just attempt and upload and nothing more?

Also I have a strong suspicion that this behavior is mostly caused by an antivirus software running amok, causing incomplete downloads or interfering with them, quarantining the firmware build process to check if if it’s mallicious, restriciting its file access capabilities and then restarting it once it seems “ok”, but in a loop. Are you using an antivirus software, and if yes, which? Have you temporarily deactivated that?

AVG, disabled.

I can’t see any “PIO side bar”, or at least what I think is that doesn’t have anything about “project tasks”.

And I have a Zero plugged in, not a Due, but it seems to be compiling a lot of Adafruit stuff.

The alien icon as normal.

Check the platformio.ini of the project that it only contains the environment section for the due.

I’ve been locked out of the forum for 22 hours, too many posts in one day for a new user :grimacing:

platformio.ini had 23 entries in it :open_mouth:

No idea how.

I’ve deleted all except “zero” and it seems to be working now.

Thanks for your help.