cancel
Showing results for 
Search instead for 
Did you mean: 

Compilation fails stdlib stm32f3x_rcc.c

hhosburg
Associate II
Posted on November 02, 2016 at 10:44

I have downloaded the std driver from st. Trying to compile stm32f3x_rcc.c following erros are displayed:

1> Compiling ‘stm32f30x_rcc.c’

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c: In function 'RCC_HSEConfig':

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:239:3: warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration]

1> In file included from C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:58:0:

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c: In function 'RCC_PLLConfig':

1> ../STM32F3_libs/inc/stm32f30x_rcc.h:100:42: error: 'RCC_CFGR_PLLSRC_HSI_PREDIV' undeclared (first use in this function)

1> ../STM32F3_libs/inc/stm32f30x_rcc.h:106:25: note: in expansion of macro 'RCC_PLLSource_HSI'

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:433:16: note: in expansion of macro 'IS_RCC_PLL_SOURCE'

1> ../STM32F3_libs/inc/stm32f30x_rcc.h:100:42: note: each undeclared identifier is reported only once for each function it appears in

1> ../STM32F3_libs/inc/stm32f30x_rcc.h:106:25: note: in expansion of macro 'RCC_PLLSource_HSI'

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:433:16: note: in expansion of macro 'IS_RCC_PLL_SOURCE'

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c: In function 'RCC_MCOConfig':

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:531:30: error: 'RCC_CFGR_PLLNODIV' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c: In function 'RCC_GetClocksFreq':

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:969:20: error: 'RCC_CFGR3_I2C3SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1024:21: error: 'RCC_CFGR3_HRTIM1SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1050:21: error: 'RCC_CFGR3_TIM15SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1063:21: error: 'RCC_CFGR3_TIM16SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1076:21: error: 'RCC_CFGR3_TIM17SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1089:21: error: 'RCC_CFGR3_TIM20SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c: In function 'RCC_I2CCLKConfig':

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1329:22: error: 'RCC_CFGR3_I2C3SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c: In function 'RCC_TIMCLKConfig':

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1379:22: error: 'RCC_CFGR3_TIM15SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1382:22: error: 'RCC_CFGR3_TIM16SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1385:22: error: 'RCC_CFGR3_TIM17SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1388:22: error: 'RCC_CFGR3_TIM20SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1390:22: error: 'RCC_CFGR3_TIM2SW' undeclared (first use in this function)

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1392:22: error: 'RCC_CFGR3_TIM3SW' undeclared (first use in this function)

1> In file included from C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:58:0:

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c: In function 'RCC_HRTIM1CLKConfig':

1> ../STM32F3_libs/inc/stm32f30x_rcc.h:334:45: error: 'RCC_CFGR3_HRTIM1SW' undeclared (first use in this function)

1> ../STM32F3_libs/inc/stm32f30x_rcc.h:336:89: note: in expansion of macro 'RCC_HRTIM1CLK_PLLCLK'

1> C:/code/CrossStudio3/STM32F3Discovery/../STM32F3_libs/src/stm32f30x_rcc.c:1419:16: note: in expansion of macro 'IS_RCC_HRTIMCLK'

Build failed

2 REPLIES 2
slimen
Senior
Posted on November 02, 2016 at 15:24

Hello,

Probably, you are missing an include file which define the undeclared RCC functions.

 

Regards

Posted on November 02, 2016 at 16:01

You presumably need the right command line defines passed to the compiler. ie USE_STDPERIPH_DRIVER,STM32F30X

The stm32f4xx_conf.h include file for your project, and the #include paths provided to the compiler.

You should review the structure of the projects provided in the Templates for supported tool chains, and map them to yours.

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