One .ioc project for different hardware configurations
Hi all
First of all, merry christmas to all of you. As I got a little spare time between the years I'm thinking about a STM32 project again.
I'm wondering if there's a best practice for one hex file supporting several hardware configurations. The configuration could be set by reading a config file or by checking IDs from each peripheral.
To be clear: the STM32 MCU is the same for each configuration. I'm thinking about supporting different GNSS-, Display-, WiFi- Modules etc. Having one library for each component (e.g. display module) calling the correct method for each driver IC (e.g. ST7789V instead of a ILI9488).
To make life's of consumers and me as a "sw provider" easier, it would be great to provide one hex only that supports every possible hardware composition.
First approach coming to my mind is to check the config file at boot, setting a flag which then is used in the libraries to differ between display IC A or B respectively the methods.
But I guess there's a better option for that?! :D
Best
Matthias
