[开发工具] 请教:IAR编译问题

[复制链接]
7565|8
 楼主| dizhu 发表于 2008-5-8 11:34 | 显示全部楼层 |阅读模式
按照iar教程建立并设置项目,make后,提示错误:
Building configuration: GPIO_Example - Debug 
Updating build tree... 
Linking 
Error[e46]: Undefined external "RCC_APB2PeriphClockCmd" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObj 
main.r79 ) 
Error[e46]: Undefined external "GPIO_Init" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "GPIO_SetBits" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "GPIO_ResetBits" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_DeInit" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_HSEConfig" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_WaitForHSEStartUp" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "FLASH_PrefetchBufferCmd" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79  

Error[e46]: Undefined external "FLASH_SetLatency" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_HCLKConfig" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_PCLK2Config" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_PCLK1Config" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_PLLConfig" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_PLLCmd" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_GetFlagStatus" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_SYSCLKConfig" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "RCC_GetSYSCLKSource" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
Error[e46]: Undefined external "NVIC_SetVectorTable" referred in main ( E:PDF资料STM32FWLibexamplesGPIOExample1DebugObjmain.r79 ) 
 
Total number of errors: 18 
Total number of warnings: 0

检查了很多次,还是如此。请问是什么原因?怎么解决?
lovegoogle 发表于 2008-5-8 12:23 | 显示全部楼层

stm32f10x_conf.h

看看是不是stm32f10x_conf.h文件需要define对应的模块!
 楼主| dizhu 发表于 2008-5-8 13:37 | 显示全部楼层

检查了的,对应的模块都是到工程的

dy008 发表于 2008-5-8 15:41 | 显示全部楼层

检查FWLib库的文件路径!

根据以上错误,都是发生在FWLIB的声明出错,最大可能是你的库路径不对!
检查iar的编译选项!
 楼主| dizhu 发表于 2008-5-8 17:01 | 显示全部楼层

上个问题解决了,又有新的了。

Building configuration: SPI_Example4 - Debug 
Updating build tree... 
main.c 
stm32f10x_dma.c 
Fatal Error[Pe005]: could not open source file "stm32f10x_conf.h" E:PDF资料STM32FWLibexamplesSPIExample4LIBRARYINCstm32f10x_map.h 26 
stm32f10x_flash.c 
Fatal Error[Pe005]: could not open source file "stm32f10x_conf.h" E:PDF资料STM32FWLibexamplesSPIExample4LIBRARYINCstm32f10x_map.h 26 
stm32f10x_gpio.c 
Fatal Error[Pe005]: could not open source file "stm32f10x_conf.h" E:PDF资料STM32FWLibexamplesSPIExample4LIBRARYINCstm32f10x_map.h 26 
stm32f10x_it.c 
stm32f10x_lib.c 
Fatal Error[Pe005]: could not open source file "stm32f10x_conf.h" E:PDF资料STM32FWLibexamplesSPIExample4LIBRARYINCstm32f10x_map.h 26 
stm32f10x_nvic.c 
Fatal Error[Pe005]: could not open source file "stm32f10x_conf.h" E:PDF资料STM32FWLibexamplesSPIExample4LIBRARYINCstm32f10x_map.h 26 
stm32f10x_rcc.c 
Fatal Error[Pe005]: could not open source file "stm32f10x_conf.h" E:PDF资料STM32FWLibexamplesSPIExample4LIBRARYINCstm32f10x_map.h 26 
stm32f10x_spi.c 
Fatal Error[Pe005]: could not open source file "stm32f10x_conf.h" E:PDF资料STM32FWLibexamplesSPIExample4LIBRARYINCstm32f10x_map.h 26 
stm32f10x_vector.c 
Fatal Error[Pe005]: could not open source file "stm32f10x_conf.h" E:PDF资料STM32FWLibexamplesSPIExample4LIBRARYINCstm32f10x_map.h 26 
 
Total number of errors: 8 
Total number of warnings: 0 
mj2008 发表于 2008-5-8 17:14 | 显示全部楼层

库的路径的设置,使用项目文件的相对位置

 楼主| dizhu 发表于 2008-5-8 17:29 | 显示全部楼层

搞定了,谢谢!受教了

myl593799546 发表于 2014-7-9 17:19 | 显示全部楼层
楼主解决问题了也不说,你这种人下次碰到了知道的人谁愿意告诉你?
水手辛巴德 发表于 2014-9-2 15:28 | 显示全部楼层
对啊,楼主解决问题了为何不分享,我现在也遇到相同问题了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

15

主题

39

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部