完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
亲爱的先生,
我开始研究STM8S并构建一个简单的代码。但是在编译器之后,它显示'& sharperror cpstm8 stm8s103.h:600(0 + 6)缺失; main.c中: 命令:''cxstm8 + debug -pxp -no -l + mods0 -pp -i''C: Program Files(x86) COSMIC CXSTM8_32K Hstm8''-clDebug -coDebug main.c''失败,返回值为:1 退出代码= 1.test.elf - 3个错误,0个警告'' 有谁知道问题是什么以及如何解决? 谢谢。 克里斯 #compiler-messages #c-learning 以上来自于谷歌翻译 以下为原文 Dear sir, I am starting to study STM8S and build a simple code. But after complier, it show '' &sharperror cpstm8 stm8s103.h:600(0+6) missing ; main.c: The command: ''cxstm8 +debug -pxp -no -l +mods0 -pp -i''C:Program Files (x86)COSMICCXSTM8_32KHstm8'' -clDebug -coDebug main.c'' has failed, the returned value is: 1 exit code=1.test.elf - 3 error(s), 0 warning(s)'' Is anyone know what's the problem and how to solve? Thanks. Chris #compiler-messages #c-learning |
|
相关推荐
5个回答
|
|
它清楚地告诉你,你错过了一个 - '
' - 不是吗? 所以看一下报告文件中的报告行,并修复它! 请注意,错误可能实际上已经发生了一些报告点 - 但编译器一直在努力并且达到这一点,没有分号就没有进一步意义。 这是基本的“C” - 与STM8无关 http://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/ 以上来自于谷歌翻译 以下为原文 It is clearly telling you that you are missing a -' ' - isn't it? So look at the reported line in the reported file, and fix that! Note the the error might actually have occurred somewhat the reported point - but the compiler has struggled on and gets to this point where it makes no further sense without a semicolon. This is basic 'C' - nothing specifically to do with STM8 http://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/ |
|
|
|
我在STM提供的HEADER文件上遇到相同的编译器错误。
回复: “这显然告诉你,你错过了 - ” ' - 不是吗? 请查看报告文件中的报告行,并修复它!'' 由于STM8 std periph库中的所有头文件都产生了这些类型的错误,所以这是一个粗鲁和不必要的响应,所以在忘记'';''或任何其他角色时,这不是我的愚蠢,也不是其他人的愚蠢。编译器错误。这些包含文件尚未编辑。 有没有人有这个真正的解决方案? 我想也许库已经过时,因为每个头文件中的错误也会给出错误:''旧样式参数声明''但我在这个论坛中找不到任何解决问题的方法。根据UM0834 Discovery用户手册的建议,我也找不到当前库的任何下载。 以上来自于谷歌翻译 以下为原文 I am getting the same compiler errors on STM-provided HEADER files. The reply: ''It is clearly telling you that you are missing a -' ' - isn't it? So look at the reported line in the reported file, and fix that!'' Is rather a rude and unnecessary response as all of the header files in the STM8 std periph library are generating these types of errors, so it is not my stupidity, nor anyone else's, in forgetting a '';'' or any other character the compiler is error-ing on. These include files have NOT been edited. Does anyone out there have a real solution to this? I thought maybe the libraries are outdated as the error in each header file also gives the error: ''old style argument declaration'' but I can't find any solutions in this forum to the problem. I also cannot find any downloads for current libraries, as suggested by the UM0834 Discovery User Manual. |
|
|
|
你好,
这是我认为当前STM8S外设库的位置: http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC1807/SS1754/PF258009?s_searchtype=keyword 谢谢, 伊恩 以上来自于谷歌翻译 以下为原文 Hello, Here's the location to what I think are the current STM8S peripheral libraries: http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC1807/SS1754/PF258009?s_searchtype=keyword Thanks, Ian |
|
|
|
您使用的是ST标准外设库吗?如果是这样你只应该包括''stm8s.h''看来你有宇宙编译器,所以我想知道你在哪里找到''stm8s103.h''
另外,我不建议使用该库。它没有为代码大小的增加提供任何附加值,而且只是新手必须学习的一件不必要的事情。 您也可以将您的来源发布到至少包含“stm8s103.h”的位置。通常,省略的括号或括号会使编译器混淆不好,直到很久以后它才会检测到错误。 JDF 以上来自于谷歌翻译 以下为原文 Are you using the ST Standard peripheral library? If so you should ONLY be including ''stm8s.h'' It appears you have the Cosmic compiler so I'm wondering where you found ''stm8s103.h'' Also, I would not recommend using the library. It offers no value added for the increase in code size and is simply one more unnecessary thing a newbie has to learn. You might also post your source at least up to the point where you include ''stm8s103.h''. Quite often an omitted parenthesis or bracket will confuse the compiler so bad it won't detect the error till MUCH later. jdf |
|
|
|
谢谢,伊恩!
这个链接实际上有效!拥有一个更新的图书馆是件好事。 我发现了我的问题。它正在寻找Cosmic编译器CXSTM32文件夹中的stdint.h头文件中的定义,但不在CXSTM8中查找。 以上来自于谷歌翻译 以下为原文 Thanks, Ian! This link actually works! It is good to have a more recent library. I found my problem. It was looking for definitions in the stdint.h header file that was in the Cosmic compiler CXSTM32 folder, but not in CXSTM8. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2655 浏览 1 评论
3216 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1790 浏览 1 评论
3619 浏览 6 评论
5997 浏览 21 评论
946浏览 4评论
1319浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
591浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1309浏览 3评论
1369浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-30 12:06 , Processed in 2.043427 second(s), Total 90, Slave 71 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号