The .pio folder temporary/build files

Hi, can PlatformIO be setup so that the .pio folder is created on a separate location to my main project?

I have a separate drive I used for temporary data, which isn’t backed up and is optimised for lots of read/writes.

Please see the workspace_dir:

https://docs.platformio.org/en/latest/projectconf/sections/platformio/options/directory/workspace_dir.html

Ahh! Fantastic, I’ll try this now :smiley:

Apologies, struggling with this as there are no examples in the Documentation.

This is what I used:

[PlatformIO]
build_dir = /temp/platformIO/$PROJECT_HASH

/temp is where my temporary drive is mounted.

The Error: File contains no section headers

Ok, I moved this:

[PlatformIO]
build_dir = /temp/platformIO/$PROJECT_HASH

to the bottom of the platformio.ini file and it has worked perfectly! Not sure why :slight_smile:

1 Like

You can also set this as a global environment variable PLATFORMIO_WORKSPACE_DIR