关于STM8编译问题

gf0608   2010-5-25 10:41 楼主
感觉编译莫名其秒,警告也看不懂,来请教过来,先申明软件安装和编译安装没问题,已用另个一个程序证实了,今天在ST官网上下了标准STM8各个模块标准文件,建了工程就是编译有问题。提示如下图:

1.JPG (188.79 KB)

回复评论 (3)

                                 用的是V1。0的固体库
点赞  2010-5-25 10:50
----------- Project qwe - STM8 Cosmic - Configuration Debug -------------
Removing intermediate files ... Done!

----------- Project qwe - STM8 Cosmic - Configuration Debug -------------

Compiling gpio_iotoggle_interruptmode\main.c...
cxstm8 -igpio_iotoggle_interruptmode -ilibrary\inc +debug -pxp -no -l +mods0 -pp -iC:\COSMIC\CXSTM8\Hstm8  -clDebug\ -coDebug\ gpio_iotoggle_interruptmode\main.c
gpio_iotoggle_interruptmode\main.c:

Compiling gpio_iotoggle_interruptmode\stm8s_it.c...
cxstm8 -igpio_iotoggle_interruptmode -ilibrary\inc +debug -pxp -no -l +mods0 -pp -iC:\COSMIC\CXSTM8\Hstm8  -clDebug\ -coDebug\ gpio_iotoggle_interruptmode\stm8s_it.c
gpio_iotoggle_interruptmode\stm8s_it.c:

Compiling library\src\stm8s_adc1.c...
cxstm8 -igpio_iotoggle_interruptmode -ilibrary\inc +debug -pxp -no -l +mods0 -pp -iC:\COSMIC\CXSTM8\Hstm8  -clDebug\ -coDebug\ library\src\stm8s_adc1.c
#error cpstm8 library\src\stm8s_adc1.c:48(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:49(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:50(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:51(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:52(10+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:53(10+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:54(10+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:55(10+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:56(10+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:57(10+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:58(10+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:59(10+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:48(4+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:59(18+22) ADC1_AWCRL_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:58(18+22) ADC1_AWCRH_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:57(17+21) ADC1_LTRL_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:56(17+21) ADC1_LTRH_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:55(17+21) ADC1_HTRL_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:54(17+21) ADC1_HTRH_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:53(17+21) ADC1_TDRL_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:52(17+21) ADC1_TDRH_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:51(17+20) ADC1_CR3_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:50(17+20) ADC1_CR2_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:49(17+20) ADC1_CR1_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:48(17+20) ADC1_CSR_RESET_VALUE undefined
#error cpstm8 library\src\stm8s_adc1.c:114(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:114(17+13) ADC1_CR1_ADON undefined
#error cpstm8 library\src\stm8s_adc1.c:114(4+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:132(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:136(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:132(21+13) ADC1_CR1_ADON undefined
#error cpstm8 library\src\stm8s_adc1.c:132(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:136(27+13) ADC1_CR1_ADON undefined
#error cpstm8 library\src\stm8s_adc1.c:136(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:154(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:158(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:154(21+13) ADC1_CR2_SCAN undefined
#error cpstm8 library\src\stm8s_adc1.c:154(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:158(27+13) ADC1_CR2_SCAN undefined
#error cpstm8 library\src\stm8s_adc1.c:158(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:176(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:180(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:176(21+13) ADC1_CR3_DBUF undefined
#error cpstm8 library\src\stm8s_adc1.c:176(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:180(27+13) ADC1_CR3_DBUF undefined
#error cpstm8 library\src\stm8s_adc1.c:180(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:204(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:209(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:204(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:209(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:227(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:229(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:227(4+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:227(23+14) ADC1_CR1_SPSEL undefined
#error cpstm8 library\src\stm8s_adc1.c:253(18+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:254(18+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:258(18+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:259(18+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:266(18+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:270(18+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:277(18+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:281(18+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:253(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:258(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:266(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:270(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:277(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:281(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:307(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:309(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:314(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:319(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:323(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:325(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:307(4+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:323(23+11) ADC1_CSR_CH undefined
#error cpstm8 library\src\stm8s_adc1.c:307(23+14) ADC1_CR2_ALIGN undefined
#error cpstm8 library\src\stm8s_adc1.c:314(21+13) ADC1_CR1_CONT undefined
#error cpstm8 library\src\stm8s_adc1.c:319(27+13) ADC1_CR1_CONT undefined
#error cpstm8 library\src\stm8s_adc1.c:348(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:353(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:358(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:362(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:348(4+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:348(23+15) ADC1_CR2_EXTSEL undefined
#error cpstm8 library\src\stm8s_adc1.c:353(26+16) ADC1_CR2_EXTTRIG undefined
#error cpstm8 library\src\stm8s_adc1.c:358(27+16) ADC1_CR2_EXTTRIG undefined
#error cpstm8 library\src\stm8s_adc1.c:379(10+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:379(17+13) ADC1_CR1_ADON undefined
#error cpstm8 library\src\stm8s_adc1.c:379(4+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:396(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:399(22+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:401(22+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:408(22+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:410(22+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:396(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:396(20+14) ADC1_CR2_ALIGN undefined
#error cpstm8 library\src\stm8s_adc1.c:437(18+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:441(18+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:448(18+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:452(18+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:437(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:441(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:448(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:452(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:465(10+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:466(10+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:465(4+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:477(10+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:478(10+4) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:477(4+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:497(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:497(20+14) ADC1_CR2_ALIGN undefined
#error cpstm8 library\src\stm8s_adc1.c:497(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:535(28+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:539(28+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:535(22+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:539(22+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:562(32+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:570(36+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:574(36+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:579(32+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:562(38+12) ADC1_CR3_OVR undefined
#error cpstm8 library\src\stm8s_adc1.c:562(26+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:570(30+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:574(30+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:579(26+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:601(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:609(18+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:613(18+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:618(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:601(27+12) ADC1_CR3_OVR undefined
#error cpstm8 library\src\stm8s_adc1.c:601(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:609(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:613(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:618(8+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:654(34+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:658(34+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:663(30+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:654(28+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:658(28+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:663(24+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:700(18+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:704(18+5) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:709(14+3) bad struct/union operand
#error cpstm8 library\src\stm8s_adc1.c:700(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:704(12+4) ADC1 undefined
#error cpstm8 library\src\stm8s_adc1.c:709(8+4) ADC1 undefined
library\src\stm8s_adc1.c:
The command: "cxstm8 -igpio_iotoggle_interruptmode -ilibrary\inc +debug -pxp -no -l +mods0 -pp -iC:\COSMIC\CXSTM8\Hstm8  -clDebug\ -coDebug\ library\src\stm8s_adc1.c " has failed, the returned value is: 1
exit code=1.

qwe.elf - 150 error(s), 0 warning(s)
点赞  2010-5-25 11:04
                                 看样子多半是头文件的路径没有包含进去,可以在 Project->Settings...->C Complier->Categoryreprocessor 里面的 Additional include directories框中把需要的路径加上。
点赞  2010-5-25 11:46
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复