Src_dir is not being read

Using esp-idf on esp32, trying to change src_dir from “src” to “main”, seems like src_dir is not being read and an hard coded “src” is read instead.

My platformio.ini:
src_dir = main

platform = espressif32
framework = espidf
monitor_speed = 115200
board_upload.flash_size = 8MB
debug_tool = jlink
debug_speed = 1000
upload_protocol = jlink

board = esp32dev

Working on windows vscode I get the following message:
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\Users\***\Documents\PlatformIO\Projects\softAP\src’:
File "C:\Users*
.platformio\penv\Lib\site-packages\platformio\builder\", line 177:

As you can see it is searching in src instead of main. This is after renaming the src dir to main.
The project is the esp-idf softAP example.
I also attach my cmakelists files
The project cmakelists:
cmake_minimum_required(VERSION 3.16.0)

The main cmakelists:
file(GLOB SOURCES main.c .//.c .//.cpp)
file(GLOB APP_INCLUDE_DIRS “.” ./*/include)

idf_component_register(SRCS ${SOURCES}
REQUIRES nvs_flash esp_adc_cal)

Please advice! thank you

Report bug to Issues · platformio/platform-espressif32 · GitHub.

I have an equivalent problem, I the build log i get the message:

Warning! Ignore unknown configuration option src_dir in section [env:CommBadge]
Warning! Ignore unknown configuration option src_dir in section [env:Bridge]

the idea is that i have multiple sub parts that belongs to one big project.

description = NowTalk

platform = espressif32
board = esp32dev
framework = arduino
upload_port = COM11
src_dir = src/commBadge

board = esp32cam
platform = espressif32
framework = arduino
src_dir = src/bridge
upload_port = COM8

You cannot set this per-environment, see Src_dir doesnt work inside a specified environment - #2 by maxgerhardt.