OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 7916|回复: 4

STVD中出现库函数里面的东西提示没有定义,求助

[复制链接]

15

主题

46

帖子

0

精华

初级会员

Rank: 2

积分
151
金钱
151
注册时间
2014-9-29
在线时间
10 小时
发表于 2014-11-20 15:58:10 | 显示全部楼层 |阅读模式
5金钱
错误信息如下,不知道有没有知道是什么原因,求教,谢谢!
#error cpstm8 ..\lib\src\stm8s_uart2.c:52(18+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:53(17+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:55(11+4) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:56(11+4) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:58(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:59(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:60(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:61(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:62(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:63(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:52(11+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:95(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:97(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:100(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:102(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:105(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:107(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:110(11+4) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:112(11+4) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:114(11+4) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:126(11+4) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:128(11+4) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:131(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:133(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:135(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:141(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:146(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:151(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:156(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:163(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:167(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:95(4+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:183(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:188(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:183(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:188(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:226(19+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:230(19+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:234(19+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:238(19+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:246(19+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:250(19+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:254(19+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:258(19+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:226(12+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:230(12+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:234(12+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:238(12+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:246(12+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:250(12+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:254(12+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:258(12+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:274(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:278(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:278(47) const assignment
#error cpstm8 ..\lib\src\stm8s_uart2.c:274(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:278(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:296(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:301(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:296(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:301(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:319(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:323(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:319(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:323(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:348(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:352(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:357(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:357(23) const assignment
#error cpstm8 ..\lib\src\stm8s_uart2.c:361(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:366(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:370(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:348(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:352(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:357(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:361(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:366(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:370(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:387(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:392(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:392(48) const assignment
#error cpstm8 ..\lib\src\stm8s_uart2.c:387(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:392(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:409(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:414(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:409(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:414(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:432(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:437(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:437(49) const assignment
#error cpstm8 ..\lib\src\stm8s_uart2.c:432(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:437(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:451(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:452(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:451(4+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:468(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:468(22) const assignment
#error cpstm8 ..\lib\src\stm8s_uart2.c:473(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:468(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:473(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:484(28+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:484(21+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:496(50+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:498(39+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:496(43+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:509(11+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:509(16+4) const assignment
#error cpstm8 ..\lib\src\stm8s_uart2.c:509(4+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:520(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:523(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:526(11+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:526(32) const assignment
#error cpstm8 ..\lib\src\stm8s_uart2.c:520(4+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:537(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:537(18) const assignment
#error cpstm8 ..\lib\src\stm8s_uart2.c:537(4+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:551(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:553(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:553(18+13) const assignment
#error cpstm8 ..\lib\src\stm8s_uart2.c:551(4+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:565(11+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:565(4+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:593(11+4) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:593(4+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:612(20+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:625(20+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:638(20+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:651(20+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:612(13+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:625(13+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:638(13+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:651(13+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:701(15+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:706(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:706(47) const assignment
#error cpstm8 ..\lib\src\stm8s_uart2.c:711(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:716(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:701(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:706(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:711(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:716(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:755(49+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:758(21+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:772(49+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:774(21+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:788(49+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:790(21+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:804(49+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:806(21+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:755(42+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:772(42+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:788(42+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:804(42+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:854(15+2) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:859(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:864(15+3) bad struct/union operand
#error cpstm8 ..\lib\src\stm8s_uart2.c:854(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:859(8+5) UART2 undefined
#error cpstm8 ..\lib\src\stm8s_uart2.c:864(8+5) UART2 undefined
..\lib\src\stm8s_uart2.c:
 The command: "cxstm8 +modsl0 +debug -pxp -no -pp -l -i..\user -i..\lib\inc -i"C:\Program Files\COSMIC\CXSTM8\Hstm8" -i"C:\Program Files\COSMIC\CXSTM8\Lib"  -clDebug\ -coDebug\ ..\lib\src\stm8s_uart2.c" has failed, the returned value is: 1
exit code=1.

spi_ssd2828.elf - 161 error(s), 0 warning(s)

最佳答案

查看完整内容[请看2#楼]

问题已经解决 谢谢各位
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

15

主题

46

帖子

0

精华

初级会员

Rank: 2

积分
151
金钱
151
注册时间
2014-9-29
在线时间
10 小时
 楼主| 发表于 2014-11-20 15:58:11 | 显示全部楼层
问题已经解决 谢谢各位
回复

使用道具 举报

8

主题

32

帖子

0

精华

初级会员

Rank: 2

积分
87
金钱
87
注册时间
2014-4-20
在线时间
0 小时
发表于 2014-11-24 09:41:15 | 显示全部楼层
回复【2楼】aleelau:
---------------------------------
你好,我也遇到了同样的问题了,请问是怎么解决的。
回复

使用道具 举报

15

主题

46

帖子

0

精华

初级会员

Rank: 2

积分
151
金钱
151
注册时间
2014-9-29
在线时间
10 小时
 楼主| 发表于 2014-11-25 12:34:44 | 显示全部楼层
问题出现在stm8s.h文件中,下面这处根据实际情况改。
/* Uncomment the line below according to the target STM8S or STM8A device used in your
   application. */

 /* #define STM8S208 */         /*!< STM8S High density devices with CAN */
 /* #define STM8S207 */      /*!< STM8S High density devices without CAN */
 /* #define STM8S007 */      /*!< STM8S Value Line High density devices */
 /* #define STM8AF52Ax */    /*!< STM8A High density devices with CAN */
 /* #define STM8AF62Ax */    /*!< STM8A High density devices without CAN */
  #define STM8S105      /*!< STM8S Medium density devices */
 /* #define STM8S005 */      /*!< STM8S Value Line Medium density devices */
 /* #define STM8AF626x */    /*!< STM8A Medium density devices */
 /* #define STM8S103 */      /*!< STM8S Low density devices */
 /* #define STM8S003 */      /*!< STM8S Value Line Low density devices */
 /* #define STM8S903 */      /*!< STM8S Low density devices */

/*   Tip: To avoid modifying this file each time you need to switch between these
        devices, you can define the device in your toolchain compiler preprocessor.
回复

使用道具 举报

7

主题

38

帖子

0

精华

初级会员

Rank: 2

积分
134
金钱
134
注册时间
2013-10-6
在线时间
15 小时
发表于 2016-7-5 07:24:29 | 显示全部楼层
我已经选择好了,为什么还是出现这样的问题?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-7-1 05:04

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表