Hello,in order to become familiar with the STM32F10X I first modified the Blinky program.But I have a problem.When I Build Target,there are errors as follows:
Build target 'STM32F10x' compiling Blinky.c... compiling Setup.c... compiling spi_flash.c... compiling lcd.c... assembling STM32F10x.s... compiling ImageBMP.c... linking... .\Obj\Blinky.axf: Error: L6218E: Undefined symbol GPIO_ReadInputDataBit (referred from blinky.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol FLASH_PrefetchBufferCmd (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol FLASH_SetLatency (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol GPIO_EXTILineConfig (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol GPIO_Init (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_ADCCLKConfig (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_APB2PeriphClockCmd (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_DeInit (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_GetFlagStatus (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_GetSYSCLKSource (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_HCLKConfig (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_HSEConfig (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_PCLK1Config (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_PCLK2Config (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_PLLCmd (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_PLLConfig (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_SYSCLKConfig (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol SysTick_CounterCmd (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol SysTick_ITConfig (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol SysTick_SetReload (referred from setup.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol GPIO_ResetBits (referred from spi_flash.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol GPIO_SetBits (referred from spi_flash.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol SPI_Cmd (referred from spi_flash.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol SPI_I2S_GetFlagStatus (referred from spi_flash.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol SPI_I2S_ReceiveData (referred from spi_flash.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol SPI_I2S_SendData (referred from spi_flash.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol SPI_Init (referred from spi_flash.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol GPIO_WriteBit (referred from lcd.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol RCC_APB1PeriphClockCmd (referred from lcd.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol SPI_DataSizeConfig (referred from lcd.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol SPI_I2S_DeInit (referred from lcd.o). .\Obj\Blinky.axf: Error: L6218E: Undefined symbol __REV_HalfWord (referred from lcd.o). Target not created
What did I forget, do wrong ?
Thnks for any help,
mouxiang
Those symbols all look like names from the STM32 Firmware Library - so it looks like you forgot to link the STM32 Firmware Library
Thanks. but I don't know how to link the STM32 Firmware Library. "Options for target ..."->"Linker" Is that right?
Hi xiang mou,
Do you have the below file?
C:\Keil\ARM\RV31\LIB\ST\STM32F10xR.LIB
Try to find it on your KEIL PC, and add it to your project, just like you add a new source file.
"in order to become familiar with the STM32F10X I first modified the Blinky program"
That should be your second step - not your first!
Your first step should be to build & run the blinky project unmodified.
Then, once you know you can successfully build and run the project as supplied, you can move on to modifying it - knowing that you are starting from a working base.
And always do your modifications one small step at a time, keeping copies of the previous working versions. That way, when something stops working, you can easily compare it against the previous working version to see exactly what changed...
Here is an excellent free tool for comparing complete folder trees: http://winmerge.org/
Thanks very much ,John. I find STM32F10xR.LIB and add it to my project,and this time there's no error!
Build target 'STM32F10x' compiling Blinky.c... compiling Setup.c... compiling spi_flash.c... compiling lcd.c... assembling STM32F10x.s... compiling ImageBMP.c... linking... Program Size: Code=7364 RO-data=6476 RW-data=16 ZI-data=512 FromELF: creating hex file... ".\Obj\Blinky.axf" - 0 Error(s), 0 Warning(s).
Thanks for your advice,Andy! I viewed http://winmerge.org/ and download the winmerge.I'm now trying to use this software.