PIO project inside subdirectory

Hi all.
I’m developing a project with multiple components, not all are Arduino-based.
The git repo is pointing to the main folder, like :

/home/my/myproject

inside I have all “modules”:
/home/my/myproject/scad
/home/my/myproject/docs
/home/my/myproject/firmware

and so on.

As most of the time , a firmware change has to be reflected in multiple places (docs and so on), we open the main directory with vscode, but the pio project is inside the firmware folder, so pio doesn’t reconize that. As workaround , we have to open directly the firmware directlry, but we would like to avoid that.

Is possible to move platformio.ini one level up (so to /home/my/myproject/) and specify which is the project directory WITHOUT setting src_dir, lib_dir and so on ? Something general like “project_dir”

is this possible ?

That is exactly the canonical way.

So the only solution is to set both src_dir and lib_dir (and others) ?

Because i didn’t find any “project_dir” to set

Exactly Redirecting... does not say anything else.

that’s why i’ve asked.

That’s strange because I have to set 9 different folders. Won’t be possible (asking to devs) to add a “project_dir” option ?

5 should cover all critical things technically.

[platformio]
src_dir = subproject/src
lib_dir = subproject/lib
include_dir = subproject/include
test_dir = subproject/test
data_dir = subproject/data

I’m sure it is, file a feature request in Issues · platformio/platformio-core · GitHub

Thanks. Done right now.