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

2019-07-19 21:14发布

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

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

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
4条回答
aleelau
2019-07-20 04:21
问题出现在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.

一周热门 更多>