I spend most of my time writing C code for STM32 microcontrollers. I have recently considered writing more code in C++, mainly for easier implementation of various design patterns and especially for using abstract classes for dependency injection when writing testable modules/classes. However, when using STM32CubeMX to generate hardware initialization code, there is no option…