I see when you change settings on RCC, from internal oscillator to external, both line on .ioc file are setted and the code generated is this:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE;
On .ioc file you can find this lines, and i think is not normal
Not only, normaly before generate file, cubemx ask me for enable TIMBase when i use FREErtos, now ask nothing.
Try my ioc. attached
Sorry for my english !