How to mix PIO with another developors build env

I’m writing an application with another developer for the ESP32.

I’m using the command line and the Espressif tools (,, etc.) and CMake. I’m writing the low level OS stuff.

My colleague is using PIO with VSC. He’s writing the app, which is really just an elaborate task that’s serviced by my OS layer.

With that in mind, I have my OS in one repository and he wants to be able to pull that OS project (written and developed within the CMake/ESP-IDF framework) into his repository so he can do his development with PlatformIO.

We’re running into a problem, because I need to have the app_main() function, but PIO is punching back saying ‘no, no, no, I need app_main()!’.

How should we handle this? What’s a sane workflow for this type of situation?

Ideally, if I make changes or improvements to the OS project, I want him to be able to do a little git-fu and be able to pull in the changes to the OS portion of his project, but as of right now, we can’t even figure out how to set up PIO to deal with a separate project having the keys to the car, so to speak.

Thank you!

Maybe look at git submodules? Can his app code plug into your OS layer with complete code isolation? i.e. Does he need to make any changes to code / files that overlaps with your code? If it doesn’t, then submodules should work… think of it as a nested git repository… there would be a subfolder in your code folder which points to his repo of code. Otherwise, it sounds like you have an issue where both of you need to be working from the one repo (but I’m no git expert by any stretch, so someone else may very well point out a way to do what you want).

1 Like