完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,用PIC16F1829,XC8,自由模式启动一个项目,用MCC生成ADC、TMR0和PIN管理器的代码。从来没有见过MCC代码的警告“马上就出来”。有人能解释一下吗?看到附上的文本文件与th.HeldSDPWELL我试图上载得到这个…你没有权限访问“http://www. McCys.com /论坛/上载.ASPX?”参考文献18.9.A461160.79724141143DE28,这里是复制和粘贴。SRC/St/TMR0.C:68:警告:(373)隐式签名到无符号转换SRC/St/TMR0。C:83:警告:(2030)数据指针不能用来保存函数指针的地址,不带参数的函数。返回空隙-gt;指针指向VoIDSRC/St/TMR0. C:134:警告:(2029)函数指针不能用来保存DATAPONtiON的地址为空-gt;函数指针没有返回VoIDSRC/St/PixMealm的函数。C:106:警告:(2030)数据指针不能用于保存A。函数指针不带返回空格的函数-gt;指向VoIDSRC/ Spult/Pin管理器的指针。C:107:警告:(2030)一个数据指针不能用来保存一个函数指针的地址,没有返回空格的函数。C:150:警告:(2029)一个函数指针不能用来保存DATAPONTION的地址-gt;指向函数的指针,没有返回VoIDSRC/St/Pin管理器的参数。C:180:警告:(2029)一个函数指针不能用来保存DATAPONTION的地址无效。无参数返回VoIDSRC/系统/ ADC的功能。C:100:警告:(373)隐式签名到无符号转换SRC/St/ADC。C:106:警告:(373)隐式签名到无符号转换SRC/St/ADC。C:127:警告:(373)隐式签名到无符号转换Microchip MPLAB XC8C编译器(V1.42构建日期:4月12日2017部分支持版本:1.42版权(C)2017 Microchip Technology Inc.许可类型:节点配置
以上来自于百度翻译 以下为原文 Hello all, Started a project using a PIC16F1829, XC8, Free Mode. Used MCC to generate code for ADC, TMR0 and pin manager. Have never seen warnings from MCC code "right out-of-the-box". Can any one explain? See attached text file with them. Thanks DP Well I tried to up load got this .. You don't have permission to access "http://www.microchip.com/forums/upload.aspx?" on this server. Reference #18.9a461160.1497720014.1143de28 So here is copy and paste .. src/system/tmr0.c:68: warning: (373) implicit signed to unsigned conversion src/system/tmr0.c:83: warning: (2030) a data pointer cannot be used to hold the address of a function pointer to function with no arguments returning void -> pointer to void src/system/tmr0.c:134: warning: (2029) a function pointer cannot be used to hold the address of data pointer to void -> pointer to function with no arguments returning void src/system/pin_manager.c:106: warning: (2030) a data pointer cannot be used to hold the address of a function pointer to function with no arguments returning void -> pointer to void src/system/pin_manager.c:107: warning: (2030) a data pointer cannot be used to hold the address of a function pointer to function with no arguments returning void -> pointer to void src/system/pin_manager.c:150: warning: (2029) a function pointer cannot be used to hold the address of data pointer to void -> pointer to function with no arguments returning void src/system/pin_manager.c:180: warning: (2029) a function pointer cannot be used to hold the address of data pointer to void -> pointer to function with no arguments returning void src/system/adc.c:100: warning: (373) implicit signed to unsigned conversion src/system/adc.c:106: warning: (373) implicit signed to unsigned conversion src/system/adc.c:127: warning: (373) implicit signed to unsigned conversion Microchip MPLAB XC8 C Compiler (Free Mode) V1.42 Build date: Apr 12 2017 Part Support Version: 1.42 Copyright (C) 2017 Microchip Technology Inc. License type: Node Configuration |
|
相关推荐
4个回答
|
|
嗨,在XC8编译器的最新版本中,做了一些有意想不到的结果的改变,对代码进行了大量的警告,这些代码没有错。
以上来自于百度翻译 以下为原文 Hi, In the latest release of XC8 compiler, there was some changes done that have unexpected results, making heaps of warnings for code that is not wrong. There have been other threads about this: http://www.microchip.com/forums/FindPost/993488 Mysil |
|
|
|
其中一些看起来不像虚假警告,它们看起来像代码中的实际错误:看到产生这些警告的代码会很有趣。
以上来自于百度翻译 以下为原文 Some of these don't look like bogus warnings, they look like actual errors in the code:src/system/tmr0.c:83: warning: (2030) a data pointer cannot be used to hold the address of a function pointer to function with no arguments returning void -> pointer to voidIt would be interesting to see the code generating those warnings. |
|
|
|
嗨,这些警告是由MCC生成的,用于由指定函数PONTIN调用的回调函数。XC8不支持使用弱属性调用默认函数,因此,A.M.O.定时器回调函数和更改通知回调可以由函数PO分配。在运行时使用的这些代码,尽管编译器发出了丑陋的警告,但这些代码仍然起作用。迈西尔
以上来自于百度翻译 以下为原文 Hi, Those warnings are issued for code generated by MCC, for Callback functions designed to be called by assigned function pointers. XC8 do not support calls to default functions using weak attribute, so, a.m.o. Timer callback functions, and Change Notification callbacks may be assigned by function pointers in runtime. These codes function despite the ugly warnings from the compiler. Mysil |
|
|
|
啊,好的,这将解释为什么我以前没有见过这些,因为我的XC8在工作中不是最新的。很难在独立的PC上升级,只有在其他PC上有安全的连接。我会向前推进。;唐
以上来自于百度翻译 以下为原文 Ah, OK that would explain why I have not seen these before because my XC8 at work is not the latest. It is hard to upgrade on stand alone and only secured connections on other PCs. I will press ahead. ;) Don |
|
|
|
只有小组成员才能发言,加入小组>>
5166 浏览 9 评论
2000 浏览 8 评论
1929 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3175 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2227 浏览 5 评论
736浏览 1评论
619浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
507浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
633浏览 0评论
530浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 05:42 , Processed in 1.216895 second(s), Total 55, Slave 48 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号