z18497 发表于 2012-3-22 11:07:03

IAR编译后提示库文件里面出错.

请问,编译后出现下面错误是怎么回事.我看头文件里面都已经定义了啊
Building configuration: LCD - Release
Updating build tree...
stm8s_adc2.c 
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 50
Error: identifier "ADC2_CSR_RESET_VALUE" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 50
Error: identifier "ADC2_CR1_RESET_VALUE" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 51
Error: identifier "ADC2_CR2_RESET_VALUE" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 52
Error: identifier "ADC2_TDRH_RESET_VALUE" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 53
Error: identifier "ADC2_TDRL_RESET_VALUE" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 54
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 108
Error: identifier "ADC2_CR1_ADON" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 108
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 126
Error: identifier "ADC2_CR1_ADON" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 126
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 130
Error: identifier "ADC2_CR1_ADON" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 130
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 149
Error: identifier "ADC2_CSR_EOCIE" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 149
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 154
Error: identifier "ADC2_CSR_EOCIE" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 154
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 172
Error: identifier "ADC2_CR1_SPSEL" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 172
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 198
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 203
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 211
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 215
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 222
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 226
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 251
Error: identifier "ADC2_CR2_ALIGN" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 251
Error: identifier "ADC2_CR1_CONT" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 258
Error: identifier "ADC2_CR1_CONT" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 263
Error: identifier "ADC2_CSR_CH" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 267
Error: identifier "ADC2" is undefined C:\Documents and Settings\zjq\桌面\LCD\src\stm8s_adc2.c 292
......
Error while running C/C++ Compiler
 
Total number of errors: 333
Total number of warnings: 0
 

发表于 2012-3-22 15:32:24

RE:IAR编译后提示库文件里面出错.

stm8xxx.H,你是不是没有添加?

z18497 发表于 2012-3-22 15:43:16

RE:IAR编译后提示库文件里面出错.

谢谢!问题解决了.是由于这个芯片没有这些外设.本人是新手所以提这种弱智问题!不好意思啊!
页: [1]
查看完整版本: IAR编译后提示库文件里面出错.