cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f30x_rcc.h 'RCC_PLLSource_HSI' undeclared

hhosburg
Associate II
Posted on November 02, 2016 at 14:33

where can  found this definiton RCC_PLLSource_HSI

thanks for any help

7 REPLIES 7
slimen
Senior
Posted on November 02, 2016 at 15:30

Hi,

RCC_PLLSource_HSI is defined understm32f30x_rcc.h

#define RCC_PLLSource_HSI RCC_CFGR_PLLSRC_HSI_PREDIV /*!< Only applicable for STM32F303xE devices */

Regards
Posted on November 02, 2016 at 16:04

Please consider placing all related questions in a [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/Compilation%20fails%20stdlib%20stm32f3x_rcc.c&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx&currentviews=15]single thread.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hhosburg
Associate II
Posted on November 02, 2016 at 16:25

Thanks, for the information, but the compiler says also:

'RCC_CFGR_PLLSRC_HSI_PREDIV' undeclared (first use in this function)

Posted on November 02, 2016 at 16:41

Suggests that you don't have the right defines passed to the compiler, and it is not including the files it needs properly.

With USE_STDPERIPH_DRIVER defined, you should just need to pull stm32f30x.h, and it in turn will pull stm32f30x_conf.h from your project directory, and the other includes it needs from the assorted peripheral files.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hhosburg
Associate II
Posted on November 02, 2016 at 17:22

I'm trying to compile the ST32F3Discovery project  from ST using CrossStudio for Arm.

I have  defined USE_STDPERIPH_DRIVER   ant as target STM32F303VC.

but  more other defines are missed.

for example RCC_CFGR_PLLNODIV , which is used in stm32F30x_rcc.c

Posted on November 02, 2016 at 17:52

May be you can ''grep'' the files within the library to find these?

STM32F30x_DSP_StdPeriph_Lib_V1.2.3\Libraries\CMSIS\Device\ST\STM32F30x\Include\stm32f30x.h

#define  RCC_CFGR_PLLNODIV                   ((uint32_t)0x80000000)        /*!< PLL is not divided to MCO */

As I said, should be pulling stm32f30x.h

Make sure that the compiler is searching the right Include file directories, in a suitable order.

Try using an evaluation of a supported tool-chain, and review the template/example projects, then apply that to your chosen chain.

Pay attention to

a) Defines

b) Project specific files and overall structure

c) Include paths, to library copies, not tool-chain defaults

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hhosburg
Associate II
Posted on November 02, 2016 at 18:26

i have compared the Crossworks stm32f30x.h with the file in the ST Library, they are different !!!

I have copied the file into the targets dir of Crossworks, now it works.

Thanks