Problem compiling on STM32F405

Unfortunately some files have to be build as C++.
I am currently evaluating whether platformio could be a suitable replacement for CubeIDE.