cancel
Showing results for 
Search instead for 
Did you mean: 

Add examples in STM32Cube_FW_F4_V1.21.0 into TrueStudio

yang hong
Associate II
Posted on March 14, 2018 at 18:43

anybody know the process to load examples in STM32Cube_FW_F4_V1.21.0 into TrueStudio?

I suffer several major issues

1) folder 'driver' include all libraries for the whole stm32 family. How to set default path to take all of library into truestudio? 

2) all examples include folder into different toolchain; but for TrueStudio, how can I use it? 

3) I am using NUCLEO-F429ZI, there is library for this board (stm32f4xx_nucleo_144.h), how we set it to link to example folder

7 REPLIES 7
yang hong
Associate II
Posted on March 14, 2018 at 19:32

After I try to add some path into the example project, I got some progress, but I got the following compiler issue:

0690X0000060A5QQAU.png

How can I fix it?

Posted on March 14, 2018 at 19:46

Add library source files to the project with the code for those functions in them?

STM32Cube_FW_F4_V1.21.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c

STM32Cube_FW_F4_V1.21.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c

etc

Your project should have a configuration file pulling in the include files

stm32f4xx_hal_conf.h

And the define

USE_HAL_DRIVER

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 14, 2018 at 20:04

Your project should have a configuration file pulling in the include files

stm32f4xx_hal_conf.h

How can I get this configuration file? I import the fw folder into truestudio,  I can't imagine how difficult to start even one simple example using truestudio.

Posted on March 14, 2018 at 21:09

Use CubeMX to create a project for TrueStudio. You have from the start a compilable project with all the drivers included. Then it is really easy to add your code. This is the best method for HAL based projects. Even regarding the examples you want to import, just recreate them in CubeMX. 

Posted on March 14, 2018 at 20:24

Then why use TrueStudio? Do you have some prior experience with creating projects for it, driving the use here? Use something professional like Keil or IAR where examples and templates exist and work already

STM32Cube_FW_F4_V1.21.0\Projects\STM32F429ZI-Nucleo\Templates\Inc\stm32f4xx_hal_conf.h

STM32Cube_FW_F4_V1.21.0\Projects\STM32F429ZI-Nucleo\Examples\GPIO\GPIO_IOToggle\Inc\stm32f4xx_hal_conf.h

STM32Cube_FW_F4_V1.21.0\Drivers\BSP\STM32F4xx_Nucleo_144\stm32f4xx_nucleo_144.h

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 14, 2018 at 20:44

Thanks. It works now. 

Why I don't use other tools, first of all truestudio belongs to ST and free of charge. I don't have much experience for STM32 before. I am trying for our new project, but at this moment, I can't ask 5000USD to buy some tools if we finally decide not to use it.

Posted on March 14, 2018 at 20:59

The ST Workbench thing is free also, and most of the examples are small and will build in Eval download of Keil. It would be helpful to understand the form and construction of the examples/template.

http://www.st.com/en/development-tools/sw4stm32.html

 

https://www.keil.com/demo/eval/arm.htm

 
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..