Too slow to create a new project

I am an engineer in China .When I create a new project using the platformIO, the program stuck and told me to wait for moment.shown as fellow.


I waited for hours but the program didn’t continue running.
the board I used is the Arduino nano 33 ble sense
the default framework is arduino
Someone said I should change to the Agents library, cause download the modules from the default library in China is extremely slow but I don’ t know how . Do anyone know what cause the problem and how to solve it?

Well let’s see if you can get to see progress first.

Please open a PIO CLI and execute

mkdir ble_test
cd ble_test
pio init -b nano33ble
pio run

Does that have some progress indicators?

the progress indicated like this

This is good, showing it worked. All packages are there, there’s just no code.

You can use PIO Home and the “Open Project” button to just open the project at C:\Users\james\ble_test now. Then you must add a file in src\main.cpp and fill it with some code, e.g.

#include <Arduino.h>
void setup() { pinMode(LED_BUILTIN, OUTPUT); }
void loop() { 
    digitalWrite(LED_BUILTIN, HIGH);
    delay(500);
    digitalWrite(LED_BUILTIN, LOW);
    delay(500);
}

(untested)

and then build.

If building fails, please post an error message. There might be corrupted downloaded packages, in which case they should be removed from C:\Users\james\.platformio\packages\<package> to force a redownload.

1 Like

thanks a lot ! it works !!!
I opened this project and add a new file named "mian.cpp " with the code .Then I built the program and upload the file to my arduino.

This way should work but the program still stuck when I try to use the window interface to create a new project. Can I fix that too ?

Hmm I don’t why the PIO Home screen is so buggy for you.

Can you show the contents of Help -> Toggle Developer Tools -> Console to check if there are any logged errors?

something like this

Hm I don’t see anything too sketchy in there.

If in doubt, make sure that the only installed VSCode extension are PlatformIO (v.2.2.1) and C/C++ by Microsoft (v1.1.3). You may also try to temporarily disable your antivirus software.

A full PlatformIO re-install can be done by first removing the VSCode extension, closing VSCode, then removing the folder C:\Users\<user>\.platformio, and installing the VSCode extension again.

If none of that helps, please file an issue in Issues · platformio/platformio-vscode-ide · GitHub to get help and link to this thread.

I had run into the same problem, which was resolved when I removed the other extensions.

I’m also facing the same issue. PlatformIO on VSCode on windows10.

Any fix would be highly appreciated.


:cold_face:

:fire: :fire:

hello, it will sound trivial, but for real, the thing that helped me was just let it be and do not do anything else on computer. Before I thought that problem is with my slow computer, so i was using time until the new project is created to do something else but the initialization couldnt get finished. So i just started a new project and didnt do anything else and like a magic, it only took few minutes.

It works… Thanks a lot.
MacOS