cancel
Showing results for 
Search instead for 
Did you mean: 

How to add BSPs to code generated by STM32CUBEMX/IDE?

JTurn.2
Senior

I'm currently having trouble adding BSPs my project using the STM32F769I-DISCO. After generating the code using STM32CUBEMX/IDE, I then downloaded the BSP file and copied and pasted it into the Drivers folders. I then manually added all the necessary folders into the "Paths and Symbols", but for some reason it keeps returning a build error. Could anyone point out what I'm doing wrong? Thank you for your time and help!

Photo showing the project structure:

0693W00000NqfUDQAZ.png 

Photo showing "includes":

0693W00000NqfUXQAZ.png

1 REPLY 1
SFent.3
Associate II

Hi, perhaps a bit late to the party, but the reason for this is you must have the DFSDM  module enabled as this then links in some defines that are used by xxx_discovery_audio.h and .c files. You can enable it, for example 'parallel'  in the .ioc config, then select disable on each channel.

Another method is to link in the defines without the DFSDM flag used in the conf.h file but this may upset  the auto  code gen part.

Also, if you're not using the SD card, remove those support files. 

This may help others that come across this error.