we should always avoid to use variant handling in software development, because one solution for all variants is the best solution.But sometimes we should compromise due to some limits.
Here are some scenarios I can see now:
- one platform solution for different microconroller/hardware. pre-compile. link different libs
- confilict functions. during-compile
- cross platform(algorithm development on PC, target is other MCU). during-compile. link different libs
- one ECU for different vehicle models. one-time configuraton. bootloader
- differnt Transmission type for one vehicle model. constant configuration
copy choosed target files to target directory
parameter is seleted by vehicle configuration shored in NVM/flash.
One signal in the frame is used as a multiplexor and the remaining payload is interpreted depending on the value of the multiplexor signal.
differnt parameter according different condition(eg.temperature/huminity/speed…)
pre-condition: parameter size for different variants is the same
manage by version tools using branch, development path.
use bootloader to flash seperate calibartion data during End of Line according to different vehilce models.
different executable files for differnt ECUs.