How to add library to BSP driver and install it in STM32CubeIDE - TouchGFX project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-26 08:23 PM
Hello everyone!
I am a person who is learning about GUI programming, my project requires interface design on touchgfx software and using STM32F429ZI kit.
I am doing reading a signal from a kit's button, the purpose is to use this signal to trigger another action.
I referenced a sample project from the developer following the link below (From GUI Task -> A working example for STM32F429):
Here I see a sample project that uses the STM32F429I-Discovery library (added in the BSP driver) to use a function that reads data from the kit's button.
I have created a new project that also uses the STM32F429I-Discovery library to read data from the kit's button using the STM32CubeIDE software. I followed the instructions in the link below to add the STM32F429I-Discovery library:
https://www.youtube.com/watch?v=5gCNhFbwrLU&t=214s
But then I got the error "undefined reference to `BSP_PB_GetState'" in the model.cpp file (the BSP_PB_GetState function is the function that reads the signal from the button, placed in the Model::tick() function of the model.cpp file).
As far as I think the error could be because the file.h and file.c of the library were not linked together when I installed. Or I installed it wrong.
Can someone show me how to correctly add the library to the BSP driver?
Software I am using:
TouchGFX 4.16.1
STM32CubeMX 6.2.0
STM32CubeIDE 1.6.1
This is my project:
https://drive.google.com/file/d/1ZkqQEz21tRwr7N1oGBaPsd6pIVBhDACy/view?usp=sharing
Thank you so much everyone!
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
-
STM32F4 Series
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-27 12:54 AM
Hello @Trần Tú​ and welcome to the Community :)
Go to Tool Settings tab and C Compiler->Directories section, then add the new folders containing include files:
../Drivers/BSP/Components/Common
../Drivers/BSP/Components/<library>
../Drivers/BSP/STM32F429I-Discovery
To figure out what is missed in your configuration, please have a look at this ST video, and this article that can help you to add the library to the BSP driver in STM32CubeIDE.
Please mark my answer as best by clicking on the "Select as Best" button if it fully solved your issue. This will help other users find this solution more quickly.
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-27 12:54 AM
Hello @Trần Tú​ and welcome to the Community :)
Go to Tool Settings tab and C Compiler->Directories section, then add the new folders containing include files:
../Drivers/BSP/Components/Common
../Drivers/BSP/Components/<library>
../Drivers/BSP/STM32F429I-Discovery
To figure out what is missed in your configuration, please have a look at this ST video, and this article that can help you to add the library to the BSP driver in STM32CubeIDE.
Please mark my answer as best by clicking on the "Select as Best" button if it fully solved your issue. This will help other users find this solution more quickly.
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-27 06:31 PM
Thanks for your help!