platformIO doesn't understand files and paths given in cmakelists

I would like to build same zephyr based project using west and platform io both. While I am successful in achieving it, I still need to put duplicate efforts in defining few symbols and mention files to be excluded from the build. whereas the the same information is already available in cmakelists.txt ( that which files must be considered for build only ) It would have been better that platform IO and west could utilize single source of truth ie. cmakelists.txt for such purpose.

Can you file an issue with a project that reproduces the problem into the PlatformIO platform that you’re using? E.g., Issues · platformio/platform-ststm32 · GitHub for a STM32 microcontroller, GitHub - platformio/platform-nordicnrf52: Nordic nRF52: development platform for PlatformIO for nRF52 etc.

@maxgerhardt I feel this problem is not really specific to any controller. its part of basic build system where It doesn’t follow the instructions provided in CMakeLists.h. For example I just specify ( using target_sources ) that what all files should be part of build in theCMakeLists.txt however when platform IO starts building the code it tries to build all files part of folder. The same code works fine and only relevant files are compiled when I use west. I know that I can include/exclude the files using platformio.ini but I want to avoid that.
I have created this project but don’t know How to upload the same. please help.

The organization of the github repositories is that there is no “PlatformIO Zephyr” repo, it’s always per-microcontroller or in the PlatformIO core (which in this case does not have any Zephyr specific code). While the issue is not specific to the microcontroller, opening the issue in the repository of the microcontroller type that you’re using is correct.

You can just open a github repo and upload the files there – this can all be done in the browser with the “Upload files” button.

Posted it here. Thanks