完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
怪怪的。在主题处理器(PIC16F15324)上使用XC8 1.45构建最小测试项目(无语法设置)。IE()宏未被识别,导致编译器错误。简单地删除它可以编译。注意,大多数(没有穷尽地)识别其他符号,例如,GIE=1。我知道我可以代替GIE= X,但是这就引出了一个问题,那就是我可能错过什么其他的异常。有人有见识吗?附上的主要C代码是如何简单地创建问题。山姆
以上来自于百度翻译 以下为原文 Weird one. Building a minimal test project (no pragma settings) using xc8 1.45 on the subject processor (PIC16F15324). ei() macro is not recognized causing compiler error. Simply removing it allows compiling. Note that most (have not tried exhaustively) other symbols are recognized including, for example, GIE = 1. I know I can substitute GIE = x, but this begs the question as to what other anomalies am I possibly missing. Anybody have any insight? Attached is just how simple the main C code is to create the problem. Sam Attachment(s) newmain.c (0.19 KB) - downloaded 41 times |
|
相关推荐
5个回答
|
|
它似乎是一个编译器错误,它影响所有PIC16F153XX处理器。XC.H在PIC.H中拉入,它包含:这可能不是定义了PyP14也不是PyP14E。在一些头文件中确实存在一个新的值“O-PIC14EX”,这是针对PIC16F153XX族定义的,因此我猜PIC.H中的代码应该被修改,这可能会影响到一些其他的细节。
以上来自于百度翻译 以下为原文 It seems to be a compiler bug to me, which affects all PIC16F153xx processors. xc.h pulls in pic.h, which contains this: #if defined(_PIC14) || defined(_PIC14E) #ifndef ei #define ei() (GIE = 1) // interrupt enable bit #endif so presumably neither _PIC14 nor _PIC14E is defined. There does appear to be a new value, "_PIC14EX" in some of the header files, and that is defined for the PIC16F153xx family, so my guess is that the code in pic.h should be changed to #if defined(_PIC14) || defined(_PIC14E) || defined(_PIC14EX) #ifndef ei #define ei() (GIE = 1) // interrupt enable bit #endif This probably affects some other details too though... |
|
|
|
我也向下看了页眉“树”,注意到了对标题PIC.H的引用,但我没有追求它。想知道为什么是PIC14?我有一个寻找编译器错误的诀窍。不知何故,我抓住了一张照片,它让我耽搁了好几天。有点让人沮丧。别误会我的意思,我一般都在一些项目上取得了巨大的成功。我只是希望微芯片在收购Atmel线方面不会太多。谢谢你们的帮助和洞察力。非常感激,山姆
以上来自于百度翻译 以下为原文 I too looked down the header "tree" and noticed reference to header pic.h. But I did not pursue it. Wonder why _PIC14? I have a knack for finding compiler bugs. Somehow, I always seize on a PIC that has some issue that delays me for days. Somewhat frustrating. Don't get me wrong, I do love PICs in general and have used for some projects with great success. I just hope that Microchip is not taking on too much with the acquisition of the Atmel line. Thanks for your help and insight. Much appreciated, Sam |
|
|
|
我已经把你的问题交给XC8论坛了。
以上来自于百度翻译 以下为原文 n.b. I've cross-posted your question to the XC8 forum. ei() macro not defined for PIC16F153xx devices |
|
|
|
|
|
|
|
这已经被报道了。请看这里。我错过了一个分开的线程。杰夫。
以上来自于百度翻译 以下为原文 This has been reported. Please see here. I missed that there was a seperate thread. Jeff. |
|
|
|
只有小组成员才能发言,加入小组>>
5183 浏览 9 评论
2005 浏览 8 评论
1932 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3178 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2229 浏览 5 评论
739浏览 1评论
626浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
510浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
637浏览 0评论
535浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 22:14 , Processed in 1.327705 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号