Sysprogs forums › Forums › VisualGDB › Nebie question on STM libraries
- This topic has 2 replies, 3 voices, and was last updated 10 years, 2 months ago by Robermeyer.
-
AuthorPosts
-
August 26, 2014 at 21:53 #896AnonymousParticipant
Hi I am (newbie to STM boards) working on my first embedded project targeting the STM32F429I-Discovery board and VisualGDB in VS 2013. I have already made quite a bit of progress with the default project and toolchain VisualGDB created for me. Lately however I was looking at some other peoples examples and published libs out in the wild for some sensors I am planning to utilize. I’ve notices that those sample (supposedly targeting same hardware) use a very different version of the STM standard peripheral libraries, for example VisualGDB provides this RCC header with the standard settings, stm32f4xx_hal_rcc.h.
When I look at the device specific files included in the C:SysGCCarm-eabi toolchain I see v1.0.0******************************************************************************
* @file stm32f4xx_hal_rcc.h
* @author MCD Application Team
* @version V1.0.0
* @date 18-February-2014
* @brief Header file of RCC HAL module.But when I look at the files included in these other toolchains for Keil or TrueStudio they all seem to use this instead, which references V1.3.0.
2 ******************************************************************************
3 * @file stm32f4xx_rcc.h
4 * @author MCD Application Team
5 * @version V1.3.0
6 * @date 08-November-2013
7 * @brief This file contains all the functions prototypes for the RCC firmware library.Both of these seem to be describing similar things for the RCC, but they certainly do not appear to be from the same code base. Since many of the samples I am finding for this board use these different headers, many of the samples do not work for me because they are calling different function prototypes that are not present in the stm32f4xx_hal_rcc.h provided in my toolchain.
Is there an easy way for me to use the other set of “standard stm” libraries for this board or port samples to use the VisualGDB versions of the same? I would like to understand this better so I can utilize some of these samples in VisualGDB to further my learning. Maybe I am just a newbie thinking about this all wrong? Can someone set me straight?
August 31, 2014 at 03:06 #3361phildimondParticipantI have just been working on exactly that – building templates using the STM32F4Cube library and examples.
The process is fairly easy. First download and install the STM32F4Cube software.
1. Create a new directory for your solution.
2. Copy the template or example from the Cube library in there.
3. Create a new VisualGDB project in that same directory for the same processor you will be using.
4. Remove all of the source and header files from the VisualGDB project.
5. Copy in all of the source from the STM32F4 Cube project that you will need, plus the startup_stm32F4_whatever.s file from the MDK-Arm directory.
6. Right-Click on the VisualGDB project and select the VisualGDB Project Properties option.
7. Remove all the include file entries.
8. Add an include file entry for the project inc directory (the one you copied from the STM32F4Cube set).
9. Do a build – you will get errors for missing headers. Add the directories containing the required files into the includes per steps 6 & 7.
10. Add any source files associated with those headers to your Device Specific Source filter in your project (this will be for things like the HAL and CMSIS code, etc).
11. Iterate through 9 & 10 until you get all the required source and headers.By the end of those iterations you will have a project that builds and runs successfully. I just did exactly that this morning for the GPIO_EXTI example in the STM32F4 discovery example in the STM32F4Cube set, and wiull have a go at one of the Ethernet examples tonight (which will be the same, just a lot more libraries to add).
Why use these instead of the STM32 ones that come with VisualGDB? Because you get Ethernet and RTOS examples, plus I find the STM32Cube code to be better and operate at a higher level with the HAL implementation, basically.
Phil
September 6, 2014 at 02:13 #3362RobermeyerParticipantPhil
Do you have a working sample with the STM core libraries used?
Seems rather silly for everybody to generate their own stuff for each project if you have already done it.I would be happy with the simple blinking led sample program to start.
-
AuthorPosts
- You must be logged in to reply to this topic.