cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f4 Discovery- standart peripherial labrary

titkin
Associate
Posted on March 09, 2014 at 20:43

Hi,

I have downloaded the STM32F4xx_DSP_StdPeriph_Lib_V1.3.0

which contains the standart peripherial labrary and examples:

Im trying to study  GPIO & TIM using this examples....

I understand the code and the architecture but no success in buiding and running these examples.

Im using Keil uVision5.

for example: theTIM_PWM example

is attached

and contains the following files:

  - TIM/TIM_PWMOutput/system_stm32f4xx.c   STM32F4xx system clock configuration file

  - TIM/TIM_PWMOutput/stm32f4xx_conf.h     Library Configuration file

  - TIM/TIM_PWMOutput/stm32f4xx_it.c       Interrupt handlers

  - TIM/TIM_PWMOutput/stm32f4xx_it.h       Interrupt handlers header file

  - TIM/TIM_PWMOutput/main.c               Main program

  

what should I do to make it run?

it seems that additional includes are needed...I tried to add some h files from the labrary with no success.

the stm32f4 discovery board is selected sinces I used the blinky example platform for this avaluation board and replaced the main.c file

Hope to get some help....

4 REPLIES 4
Posted on March 09, 2014 at 21:40

Use uv4, you'll have less headaches. Once built you need to make sure the debug pod is correctly configured and can see the board, that the flash algorithm is set for the F4 series parts.

The DSP firmware package targets the EVAL series boards, you'll have to port or adjust them for the DISCOVERY series boards. One notable issue will be that the DISCO boards use an 8 MHz HSE clock source, and the EVAL boards an 25 MHz crystal, so you'll have to modify HSE_VALUE (nominally in stm32f4xx_conf.h) and the PLL settings (system_stm32f4xx.c)
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
titkin
Associate
Posted on March 10, 2014 at 07:50

I have moved to uv4

 

it improved only a little -still have 'undifined simbol' errors:Any Ideas? Thank you.

Rebuild target 'Target 1'

compiling main.c...

compiling stm32f4xx_it.c...

compiling misc.c...

assembling startup_stm32f40xx.s...

compiling system_stm32f4xx.c...

linking...

.\proj.axf: Error: L6218E: Undefined symbol GPIO_Init (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol GPIO_PinAFConfig (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol GPIO_ToggleBits (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol RCC_AHB1PeriphClockCmd (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol RCC_APB1PeriphClockCmd (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_ARRPreloadConfig (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_Cmd (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_OC1Init (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_OC1PreloadConfig (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_OC2Init (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_OC2PreloadConfig (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_OC3Init (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_OC3PreloadConfig (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_OC4Init (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_OC4PreloadConfig (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_TimeBaseInit (referred from main.o).

.\proj.axf: Error: L6218E: Undefined symbol CCR1_Val (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol CCR2_Val (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol CCR3_Val (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol CCR4_Val (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol STM_EVAL_LEDToggle (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_ClearITPendingBit (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_GetCapture1 (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_GetCapture2 (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_GetCapture3 (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_GetCapture4 (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_GetITStatus (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_SetCompare1 (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_SetCompare2 (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_SetCompare3 (referred from stm32f4xx_it.o).

.\proj.axf: Error: L6218E: Undefined symbol TIM_SetCompare4 (referred from stm32f4xx_it.o).

Not enough information to list image symbols.

Finished: 1 information, 0 warning and 31 error messages.

''.\proj.axf'' - 31 Error(s), 0 Warning(s).

Target not created

________________

Attachments :

simbol_missing.JPG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzoM&d=%2Fa%2F0X0000000bPy%2FbsaACP9v7najO9YSv3VoQ.yYFthXhphJODSlZNO854s&asPdf=false
Posted on March 10, 2014 at 14:33

Your project needs to contain the assorted library files for the components you are using.

You would need to Add to Group, files from the Library / Firmware source directories. Files like stm32f4xx_gpio.c, stm32f4xx_rcc.c, etc.

Review the Template project
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 10, 2014 at 21:39

''Your project needs to contain the assorted library files for the components you are using''

Either as individual source  files, to be compiled as part of your project build, or as a pre-built library.

Note that this has nothing specifically to do with Keil or STM32 - it's the way programming works in general!