I have built my own IoT framework for teaching (ulnoiot), based on platformio. The system runs in class on raspberry pis and manages 4-10 Wemos D1 minis (based on esp8266) all with one different configuration cpp-file. Compiling each of these takes initially 5 minutes, totaling easily 30 minutes class time lost (with explanations and coaching this is more like several hours of class time lost).
As there is only a difference in code of less than 2%, I was wondering how I could re-use or pre-compile some of the used libraries or equivalent C+±files. The only things I could avoid was downloading the libraries for each time in sym-linking the .piolibdeps to a pre-compiled node-folder. Other experiments with sym-links, copies, or extra-libs build options all fail and require a complete re-built.
How can I avoid compiling the same code for the same platform/microcontroller again and again?
Can anybody point me into the right direction for this?