PlatformIO Community

Question about the .pio Folder

Hi,
inside my project I have .pio folder which contains a build and a libdeps folder. The build folder is around 90mb which is unacceptable. The Header Files that are included are WiFi.h and ArduinoOTA.h. How can this folder be 90mb then? The libdeps folder is empty. What I also noticed: Inside the build folder there is a FrameworkArduino folder which I don’t even include in my cpp files. I read the documentation and it is suggested that you can put this folder in another directory but that is not a good solution because of issues considering the portability of the project. Is there any option I have or does my project with 4cpp files require 90mb which is kinda ridiculous.

Thank you

1 Like

The build folder contains the compiled object files with all the debug information. This is perfactly normal.

You are not supposed to copy the hidden .pio folder when copying a project – that’s why it’s a hidden folder and must be excluded in the .gitignore etc.

Executing pio run -t clean or the “Clean” target will remove these files.

1 Like

I’m using an ESP32. Since it is a hidden folder, I can assume that this folder does not get uploaded to the board. Am i right on this? I have also very long compile times because of this when compiling the first time or when I change the upload_protocol to espota in the platform.ini.

The firmware is built inside this hidden folder, and does contain the firmware.elf and firmware.bin file which is uploaded to the board. That’s the resulting binary artifact from the compilation. Since you provide the source, this file should also not be uploaded (unless you want to distribute binaries of course).

2 Likes

Ok. Thank you very much I appreciate your help.