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:
[plafromio]
src_dir = main

[env]
platform = espressif32
framework = espidf
monitor_speed = 115200
board_upload.flash_size = 8MB
board_upload.maximum_size=8388608
debug_tool = jlink
debug_speed = 1000
upload_protocol = jlink

[env:esp32dev]
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\main.py", line 177:
env.SConscript("$BUILD_SCRIPT")

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)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
list(APPEND EXTRA_COMPONENT_DIRS etl)
project(softAP)

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

idf_component_register(SRCS ${SOURCES}
INCLUDE_DIRS ${APP_INCLUDE_DIRS}
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.

[platformio]
description = NowTalk

[env:CommBadge]
platform = espressif32
board = esp32dev
framework = arduino
upload_port = COM11
src_dir = src/commBadge

[env:Bridge]
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.