OK, Changing the toolchain/IDE environment in STMCubeMX from EWARM ( the default ) to STMCubeIDE fixed the problem.