If it's planned to make, say
0) 10 .bas SW-modules to read from hardware sensors boards
1) 5 kinds of devices (sensors), where the sketches contain different sets of SW-modules
2) 2 device roles - receiver or transmitter-sensor
3) 2-3 MCU-types among ESP32 family - that can be chosen better for roles OR kinds (depending on ports qty)
... how better to organize the B4R sketch or sketches (using the conditional compilation and variables of the kinds and roles) set to have clear .bin FW files set ?
Compilation for each MCU means to choose the SDK\device\port...
Different B4R projects. Different sensors are supported by different libraries and yet B4X IDEs do not support conditional library loads. I had proposed something like this on the near past but @Erel is one all around supporter and it's logical that it has to put some order in his schedule.
I can't remember if B4R has conditional Builds, but if it does, just create as much conditional build you need, and use the tags in your code.
In compilation stage, choose the build you want, and the resulting "sketch" will ignore every non-related stuff, libraries included.
That can help you keep a simgle "project" for all your builds, but be carefull... to many build options and you may end up confusing it all!
IMHO, it's not a problem, if .bin fits the partition.
Different modules (that include other libs) are included, but not used, if not called - due to conditional compilation.
Here the less .bin variants - the better order among versions.
IMHO, it's not a problem, if .bin fits the partition.
Different modules (that include other libs) are included, but not used, if not called - due to conditional compilation.
Here the less .bin variants - the better order among versions.
That is correct, but it gets the the bin file to be burned bigger. I prefer to use Ocahm's Razor also in code (a literal approach in the code case would be: "just use only the necessary code/libraries to make your program work and never more").