2016-05-26 08:14 AM
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!!!2016-05-26 09:44 AM
Hi dmbrooks44,
What is the version of CubeMx you are using ? BSP library shouldn't be generated by CubeMx , it is added manually by user if needed. Then try , the last version of 4.150 and tell me if the problem still existing. Try to share your .ico file -Hannibal-2016-05-26 10:06 AM
V4.14
2016-05-26 10:30 AM
I upgraded to V4.15 and it also adds the bsp_driver_sd.c file to my project .
Also, can you guys get that ''const Diskio_drvTypeDef SD_Driver ={}'' fixed in sd_diskio.c please?2016-05-31 06:33 AM
Hi dmbrooks44,
Can you more explain the issue that you get from ''SD_Driver '' declaration in the conditions that lead to that ? (I see you input in this ). -Hannibal-2016-06-01 01:29 PM
My project started out as a copy ofone of theExamples Projects. So various stm32469i_discovery_***.c files are also included in the project, accordingly.Myproject grew from there, making use of other Example Projects involving other peripherals. As various peripherals were added to my project, Ialso reconfigured Cube each time to include the new peripheral. (After all, Cube is the wave of the future.) So, I see there is room for some overlap between the Example Projects (which came from theSTMCube folder, but were not actually generated by Cube???) and Cube-generated code. SoCube adds bsp_driver_sd.c to my project. I assume it does this since I selected the 468i-Disc board from the Cube dropdown menu. But now I get the errors in the attached file. So the whole thing is quite confusing to a new ST user. I realize I don't need to use Cube to run these Examples, but I want to in order to learn it. So how do the stm32469i_discovery_***.c files and bsp_***.c files work together? Or do they? Which takes precedence? I'dbe happy to read any documentation on the subject. I don't think this problem would exist if the Example Projects in the Cube folder were actually generated by Cube.
________________ Attachments : Compiler_Errors.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtrQ&d=%2Fa%2F0X0000000aY0%2F8cnO6ACfjw9dgPcou9z20P7k9le92s2duESzIdZhPZ8&asPdf=false2016-10-07 07:59 AM
Dear user,
In order for the generated project to compile, STM32CubeMX generates some bsp initialization code.
However, STM32CubeMX does not manage the BSP drivers used in the Cube examples and delivered as part of STM32Cube firmware packages for ST boards only.
Best regards.
2018-03-13 09:31 PM
This is still occurring (BSP_driver_sd.c in the user/src folder) and there has not been a succinct answer to the first question. So:
1) Should CubeMX be adding a board support package file to the src folder?
2) Why there and not in Driver/BSP/(board) folder?
Now a couple more questions:
3) If the user has selected a particular board, then why does CubeMX not pull the relevant files from the appropriate Driver/BSP area in the repository since CubeMX should know from the user choice which board is being used? Isn't that what computers and good software are good at?
4) Is there a reason why a user would not want to use a board support package that is already done and tested and version controlled?