I published a few CubeMX project files for discovery boards. The general idea how prepare such project files is as follow:
-reverse engineer the example for particular board to see what pheripherals are used and how they are configured (for example FSMC configuration)
-run CubeMX and enable pheripherals required for the board e.g. FSMC (for LCD TFT)
-copy BSP files to the project folder
-add include search paths to your project (subfolders in BSP folder)
-add *.C files from Drivers folders (subfolder of the BSP folder) to satisfy linker
-then work with the API
The details can be seen in my example project files. See my content.