Create your project for the first board you want to support. Then add additional environments for your other boards. Just as an example, having these two environments in my platformio.ini would allow me to compile my code for a STM8 or/and an ESP8266 based board… meaning the code would need conditional compile flags for any board/platform specific various. If I hit the main build option (cropped out) it will build/upload/etc all environments, or you can open the particular one you want to build/upload/monitor/etc.
1 Like