The problem exists when STM32F407VGTx_FLASH.ld file is empty. You can double click on it to open and to watch what is inside.
If file is empty, I do next to solve the problem:
- Right click over “STM32F407VGTx_FLASH.ld” in the project tree at eclipse and select “delete” file.
- Now go to CubeMX and GENERATE CODE again.
- Right boton in our project and “Refresh”.
Now, new STM32F407VGTx_FLASH.ld file appears with correct content.