How to get rid of zephyr folder created automatically by platform IO

when using zephyr OS based project on platform IO, platform IO expects cmakelist to be part of zephyr folder in the project folder. how can I instruct pio to use the cmakelist available in the project folder directly. I have observed that when if I delete this folder, pio automatically creates it before building

The usage of os.path.join(PROJECT_DIR, "zephyr", "CMakeLists.txt") (and related files) is hardcoded in the Zephyr builder scripts in the framework-zephyr package’s scripts/platformio/platformio-build.py file and can’t be modified. That’s a design decision made by the PlatformIO team.

If you have improvement suggestions for this, best to post them as issues in the repo containing that code. Sadly the Zephyr PlatformIO builder scripts doesn’t seem to be in one of PlatformIO’s github repos, so the next best thing is to open an issue in the platform for your microcontroller (e.g., Issues · platformio/platform-ststm32 · GitHub) or the PlatformIO core (Issues · platformio/platformio-core · GitHub).