Home › Forums › Mastering STM32 book support forum › Convenient way to add BSP to eclipse project
Tagged: lcd bsp
- This topic has 2 replies, 2 voices, and was last updated 7 years, 10 months ago by Carmine Noviello.
-
AuthorPosts
-
January 16, 2017 at 11:59 pm #5591nefariousParticipant
Is there a convenient way to add STM32Cube_FW_F&… BSP Drivers to an eclipse project. I have tried several options and all have missing parts headers and I can’t seem to get everything. Maybe I am attempting to add too much? All I want to do is to write to the display and that should be very straight forward.
January 17, 2017 at 8:00 pm #5611nefariousParticipantIf you are unable to answer this question, it is no problem. I just don’t know where else to look.
What I have been able to do to make some progress: I created a directory BSP in the project and added the Components directory and the STM32F746G-Discovery folder. I put the Discovery directory in the path.
At first I didn’t enable hal-uart in cube-mx and the BSP required it. I went back to the cube-mx and added it and regenerated the code. The hal_uart and hal_uart_ex header files were generated in the cube-mx code. If I reran your cubemximporter the new files were not copied in so I did that by hand and that error was overcome.
Now the problem is in the BSP stm32746g_discovery_sdram.h file which can’t find ‘SDRAM_HandleTypeDef’. My suspicion is this is another cube-mx problem and I can’t tell which option to set to bring that out in the driver folder.
January 18, 2017 at 6:55 am #5613Carmine NovielloKeymasterHi,
There is no quick recipe to add BSP packages. Which board are you using? In my github account (https://github.com/cnoviello?tab=repositories) you can find some projects related to the disco F7 that already include BSPs.The workflow is usually based on these steps:
– Create a root folder named BSP with two subfolders, named “src” and “inc”
– Place “.c” files in “src” and “.h” files in “inc”
– Add the path to the “../BSP/inc” folder to project settings, inside include paths section
– Import the complete HAL inside the project. This will prevent you from errors related to not exported modules by CubeMX. You can download the complete HAL from ST website.
– Some BSPs (especially those belonging to boards with LCDs) require the import of additional packages found in the “BSP/Components” folder. For every imported component you need to ensure that the folder containing include files are inside the include paths.The error regarding the sdram module is caused by the fact that CubeMX has not exported the corresponding file. Moreover, ensure that the corresponding module is enabled inside the “stm32fxx_hal_conf.h” file (you enable a module by decommenting the corresponding macro).
Hope that helps.
-
AuthorPosts
- You must be logged in to reply to this topic.