AnsweredAssumed Answered

What is the relationship between CubeMX code and the BSP?

Question asked by Brooks.David.001 on May 26, 2016
Latest reply on Mar 14, 2018 by greenwood.greg
I have created a new IAR Workbench project using the 469i-Disco board that started as a collection of various projects found in the CubeMX Repository that include the following features: LCD, Touchscreen, SD Card with Chan FatFs, DMA2D, DSIHOST and RTC. I started the CubeMX project by selecting the 469i-Disco board and was expecting Cube to know how to generate code for this board. (It doesn't really.) I was surprised that CubeMX adds the bsp_driver_sd.c file to my project and this is the only bsp_xxx.c file it adds to the project. Inclusion of this bsp_ file results in compiler errors where functions have been redefined. This bsp_ file conflicts with functions already defined in stm32469i_discovery_sd.c, which came from the example projects.

So, did CubeMX make a mistake in adding the bsp_driver_sd.c file to my project or not? And why didn't it include bsp_xxx files to replace stm32469i_discovery_lcd.c, stm32469i_discovery_sdram.c and stm32469i_discovery_ts.c files.

Is the intended approach to configure CubeMX to match the settings in the stm32469i_discovery_xx.c files and then eliminate them from the project? Or what?

A broader question is, what is the intended relationship between Cube-generated files/functions and bsp files/functions?

Can't wait until all of the Example Projects get converted to CubeMX!!!

Outcomes