Topic : why are .c files are not added in demo projects

Forum : ARM

Original Post
Post Information Post
October 1, 2010 - 4:27am
Guest

I am curious to know why are the library files like stm32f10x_gpio.c, stm32f10x_rcc and many more ST library source files not added in the FreeRTOS CORTEX_STM32F103_Primer_GCC project. I know that the header files are taken from the include directory in project properties. Where are the source files taken from.

Thanks.

Replies
Post Information Post
+1
0
-1
October 5, 2010 - 8:51am
Guest

check in project settings... if there is a check at "Use Old Precompiled Libraries" to "Yes".
if it is "yes" than no need to include .C files in the project. but if it is "No" than the RTOS might not use firm ware library functions instead it will use direct structure addressing, defined in stm32f10x.h file

+1
0
-1
October 5, 2010 - 2:28pm
Raisonance Support Team

@Kashif:

You are right, the "Use Old Precompiled Libraries" allow you to use the ST library in a precompiled form, so it is not necessary to have the library sources in your project.

However, we recommend not to use this option anymore, as the libraries are not designed to be precompiled. For instance, the clock speed is defined at compile time, so the precompiled libraries will not work if you need a specific oscillator in your design.
Moreover, the precompiled libraries are an old version, unsupported.

So it is much better to copy the library sources into your projet directory and add them to your project (with the "Use Old Precompiled Libraries" option off).

Regards,

+1
0
-1
February 18, 2011 - 2:49pm
Guest

@Bruno:

I tried to run FreeRTOS CORTEX_STM32F103_Primer_GCC project in the newest Ride7 7.30.10.0169, but i can't.
I set the Use Old Precompiled Libraries option to no and added libs manualy from Raisonance\Ride\Examples\ARM\ST\STM32Lib-v203\library folder but it don't work.

Could you write what and how exactly i should configure to run that project?

+1
0
-1
February 21, 2011 - 9:45am
Raisonance Support Team

Hi,

How to build an application with the ST Libraries is very well documented in the ST applciation notes about their firmware libraries. This contains plenty of information and working examples.

However, there are some issues that may be difficult to solve. When you say "it doesn't work", what do you really mean. Do you have missing modules upon link, missing header files, incorrect function calls?
We need some more information in order to help you on this topic.

BTW, you have the latest Ride7, but do you have the latest RKit-ARM installed? Check this out from http://www.mcu-raisonance.com/mcu_downloads.html

Regards,

+1
0
-1
February 21, 2011 - 10:55am
Guest

Yes i have latest RKit-ARM installed.

My error:
----------------Make Started: 'RTOSDemo' in configuration 'Standard'--------------------------

Building C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\RTOSDemo.rapp
Running: LD Linker
"C:\Program Files\Raisonance\Ride\arm-gcc\bin\arm-none-eabi-gcc.exe" -mcpu=cortex-m3 -mthumb -Wl,-T -Xlinker "C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\RTOSDemo.elf.ld" -u _start -Wl,-static -Wl,--gc-sections -nostartfiles -Wl,-Map -Xlinker "C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\RTOSDemo.map"
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\lcd.o: In function `LCD_CtrlLinesWrite':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:257: undefined reference to `GPIO_WriteBit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\lcd.o: In function `LCD_DataLinesConfig':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:184: undefined reference to `GPIO_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\lcd.o: In function `LCD_ReadLCDData':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:747: undefined reference to `GPIO_ReadInputData'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\lcd.o: In function `LCD_Init':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:620: undefined reference to `RCC_APB2PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:621: undefined reference to `RCC_APB2PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:622: undefined reference to `RCC_APB2PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:625: undefined reference to `RCC_APB2PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\lcd.o: In function `LCD_BackLightConfig':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:535: undefined reference to `RCC_APB2PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:542: undefined reference to `GPIO_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:548: undefined reference to `RCC_APB1PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:550: undefined reference to `TIM_DeInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:551: undefined reference to `TIM_TimeBaseStructInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:552: undefined reference to `TIM_OCStructInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:560: undefined reference to `TIM_TimeBaseInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:567: undefined reference to `TIM_OC2Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:568: undefined reference to `TIM_OC4PreloadConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:570: undefined reference to `TIM_ARRPreloadConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:573: undefined reference to `TIM_ITConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:576: undefined reference to `TIM_Cmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\lcd.o: In function `LCD_CtrlLinesConfig':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:225: undefined reference to `GPIO_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:231: undefined reference to `GPIO_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\lcd.o: In function `LCD_CheckLCDStatus':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:288: undefined reference to `GPIO_ReadInputData'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:292: undefined reference to `GPIO_ReadInputData'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:297: undefined reference to `GPIO_ReadInputData'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/lcd.c:302: undefined reference to `GPIO_ReadInputData'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\mems.o: In function `MEMS_SendByte':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:238: undefined reference to `SPI_I2S_GetFlagStatus'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:241: undefined reference to `SPI_I2S_SendData'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:244: undefined reference to `SPI_I2S_GetFlagStatus'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:247: undefined reference to `SPI_I2S_ReceiveData'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\mems.o: In function `MEMS_ChipSelect':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:217: undefined reference to `GPIO_WriteBit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\mems.o: In function `MEMS_Init':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:275: undefined reference to `GPIO_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:278: undefined reference to `RCC_APB1PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:279: undefined reference to `RCC_APB2PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:280: undefined reference to `RCC_APB2PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:287: undefined reference to `GPIO_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:294: undefined reference to `GPIO_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:307: undefined reference to `SPI_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:310: undefined reference to `SPI_Cmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:324: undefined reference to `GPIO_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:325: undefined reference to `GPIO_WriteBit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:328: undefined reference to `GPIO_WriteBit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:329: undefined reference to `GPIO_WriteBit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/mems.c:337: undefined reference to `GPIO_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\buzzer.o: In function `BUZZER_SetFrequency':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/buzzer.c:204: undefined reference to `TIM_TimeBaseInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/buzzer.c:211: undefined reference to `TIM_OC3Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/buzzer.c:212: undefined reference to `TIM_OC3PreloadConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\buzzer.o: In function `BUZZER_SetMode':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/buzzer.c:389: undefined reference to `TIM_Cmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ST_Code/buzzer.c:393: undefined reference to `TIM_Cmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\main.o: In function `prvSetupHardware':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:395: undefined reference to `RCC_DeInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:398: undefined reference to `RCC_HSEConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:401: undefined reference to `RCC_GetFlagStatus'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:409: undefined reference to `RCC_HCLKConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:412: undefined reference to `RCC_PCLK2Config'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:415: undefined reference to `RCC_PCLK1Config'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:418: undefined reference to `RCC_PLLConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:421: undefined reference to `RCC_PLLCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:424: undefined reference to `RCC_GetFlagStatus'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:429: undefined reference to `RCC_SYSCLKConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:432: undefined reference to `RCC_GetSYSCLKSource'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:437: undefined reference to `RCC_APB2PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:441: undefined reference to `RCC_APB1PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:445: undefined reference to `NVIC_SetVectorTable'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:447: undefined reference to `NVIC_PriorityGroupConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/main.c:450: undefined reference to `SysTick_CLKSourceConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ParTest.o: In function `vParTestInitialise':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ParTest/ParTest.c:75: undefined reference to `RCC_APB2PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ParTest/ParTest.c:82: undefined reference to `GPIO_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ParTest.o: In function `vParTestToggleLED':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\ParTest/ParTest.c:132: undefined reference to `GPIO_Write'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\timertest.o: In function `vSetupTimerTest':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:105: undefined reference to `RCC_APB1PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:106: undefined reference to `RCC_APB1PeriphClockCmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:109: undefined reference to `TIM_DeInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:110: undefined reference to `TIM_DeInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:111: undefined reference to `TIM_TimeBaseStructInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:119: undefined reference to `TIM_TimeBaseInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:120: undefined reference to `TIM_ARRPreloadConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:126: undefined reference to `TIM_TimeBaseInit'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:127: undefined reference to `TIM_ARRPreloadConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:134: undefined reference to `NVIC_Init'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:135: undefined reference to `TIM_ITConfig'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:138: undefined reference to `TIM_Cmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:139: undefined reference to `TIM_Cmd'
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC\timertest.o: In function `vTimer2IntHandler':
C:\Users\aikane\Desktop\pobrane\a\FreeRTOSV6.1.1\Demo\CORTEX_STM32F103_Primer_GCC/timertest.c:178: undefined reference to `TIM_ClearITPendingBit'
collect2: ld returned 1 exit status

+1
0
-1
February 21, 2011 - 11:26am
Raisonance Support Team

Hi,

It looks like your stm32f10x_conf.h file is not properly set. You have to uncomment all required peripheral header files, as well as define the USE_STDPERIPH_DRIVER preprocessor macro and the STM32F10X_xx that matches your device.

Please read the ST instructions for further detail.

Regards,