完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
亲爱的所有人,在我的应用程序中,我使用PIC18F14K22与外部的RUS232通信的激活的UART接口。当我尝试编译代码时,出现了一个以下错误:C:程序文件(x86)Microchip xC8v1.40\Pic18F14K22.h:3352:错误:(1098)VALA冲突声明BLE“txxSTAtiTY”(C:程序文件(x86)Microchip xC8v1.40\包含PIC18F14K22.H:3124),并且构建失败。有人知道线索吗?非常感谢任何帮助,阿切尔
以上来自于百度翻译 以下为原文 Dear All, In my application I use PIC18F14k22 with activated UART interface for the RS232 communication with external world. When I try to compile the code a following error pops up: C:Program Files (x86)Microchipxc8v1.40includepic18f14k22.h:3352: error: (1098) conflicting declarations for variable "_TXSTAbits" (C:Program Files (x86)Microchipxc8v1.40includepic18f14k22.h:3124) and the built is failed. Does anybody have a clue what's up? Much appreciate any help, Archer |
|
相关推荐
9个回答
|
|
是否包括特定于设备的头文件和XC.H?
以上来自于百度翻译 以下为原文 Are you including device-specific header file AND xc.h too? |
|
|
|
或者你可能试着用XC8 V1.40使用PLIB?
以上来自于百度翻译 以下为原文 Or do you possibly try to use PLIB with xc8 v1.40? |
|
|
|
“是否包括特定于设备的头文件和XC.H?”下面是:C:程序文件(x86)Microchip xC8v1.40>包含以下文件:-XC.H-XC.Inc -PIC18F14K22.H-PIC18F14K22.Inc“或者您可能尝试用XI8V1.40使用PLIB吗?”我在上面的链接下有PLIB文件夹。这是错的吗?我把它踢出去好吗?
以上来自于百度翻译 以下为原文 "Are you including device-specific header file AND xc.h too?" Under: C:Program Files (x86)Microchipxc8v1.40include I find, among all, following files: - xc.h - xc.inc - pic18f14k22.h - pic18f14k22.inc "Or do you possibly try to use PLIB with xc8 v1.40?" I have plib folder under link as above. Is it wrong? Shall I kick it out? |
|
|
|
好吧,试着用另一种方式问;-你安装PLIB了吗?你试着用XI8V1.40的PLIB函数吗?请张贴完整的构建结果…
以上来自于百度翻译 以下为原文 Ok, try to ask it a different way ;-) Did you install plib and do you try to use functions from plib with xc8 v1.40? Post full build result please... |
|
|
|
Halo VLoKi,“你安装PLIB了吗?你试着用XI8V1.40使用PLIB的功能吗?”对。事实上(与其他应用程序)的问题是,即使安装时,PLIB功能也没有反应。我不得不对它们进行COP/巴斯丁:程序文件(x86)Microchip xC8v1.40[PLIbIntoc:程序文件(x86)Microchip xC8v1.40],以便完成构建。稍后我将发布完整的构建结果。我一时没有机会进入我的机器。
以上来自于百度翻译 以下为原文 Hallo vloki, "Did you install plib and do you try to use functions from plib with xc8 v1.40?" Yes. Actually the problem (with other application) was that even when installed the plib function didn't react. I had to cop/pastey them from C:Program Files (x86)Microchipxc8v1.40includeplib into C:Program Files (x86)Microchipxc8v1.40include in order to make it possible to complete built. I'll post the complete built results later on. At a moment I don't have access to my machine. |
|
|
|
它没有找到头文件,因为你没有改变程序设置来包括PLIB。你原来的问题是因为PLIB与XC8的最新版本不完全兼容。如果你使用一个较旧的版本,它会起作用。这就是vloki所说的:“你有可能试着用XC8 V1.40使用PLIB吗?”
以上来自于百度翻译 以下为原文 It didn't find the header files because you didn't change the prooject settings to include the plib. Your original problem is because plib is not fully compatible with the latest version of XC8. If you go to an older version it will work. That is what vloki was getting at with " do you possibly try to use PLIB with xc8 v1.40?" |
|
|
|
BTW.PLIB库附带完整的源代码。我通常的建议是,找到您要使用的硬件的源代码(例如,USAT),只需将所需函数的源复制到项目中,或者只是使用它们来编写自己的版本。B函数是,你会想知道为什么你不是从头开始自己做的。
以上来自于百度翻译 以下为原文 BTW. the plib libraries come with full source code. My usual advice is, find the source for the hardware you want to use, (e.g. the USART), and just copy the source for the required functions into your project, or just use them for ideas to write your own version. When you see how short a typical plib function is, you'll wonder why you didn't just do it yourself from scratch. |
|
|
|
Halo VLogi,下面是一个完整的“构建”窗口的内容:.NbPosij/Maul-Frime-Debug。St/RealthAuto/RelaTraceRyDATORGEGRIX,XD.x.Fux.[ 2 ]:进入目录“C//StudioSt/SturaTraceLoGrogRyx,显示/温度,DATORGEGRY,X D','C:程序文件(x86) Microchip xC8V1.40bin xC8.exe”-PAS1-芯片= 18F14K22-Q-G-双=24浮点=24 EMI=WOrdWrd-- OpT++ASM,+ASMQue++空间,-Debug——AdDrQual=忽略-Apple -N255-AdvReal-DXPRJIOUTAL=缺省-CONDE=默认,-PSECT,-MEM,+MEM,-HEX,-file = -inHX032——运行时=缺省,+清除,+init,-STOP,-NONY启动,下载,+CONFIG,+CURB,+PLIB输出= -MCOF,“Endos=编译:Auto:Auto:Autoto”-Errave= %F:%L:错误:(%N)%F:%L:警告:(%N)%F: %L:咨询:(%N)%s“-OBug /默认/生产/ TwiteLoGurgRy.OpDIS.P1 TimeLoGrGrGyO.P.TimeLoGrgRy.Of TimeLoGrgRy.O.DISP.C:379:警告:(356)隐式转换n的浮点到整数“Cd:FC40BIxC8.exe”——芯片=18F14K22-Guest-Madit/Duffica/DeaTraceRyDATORGRYS.X.PRODATION.MAP-双=24 -浮点=24 EMI=WordDead -opt= +ASM,+ASMFILE,-+速度,+空间,-Debug -ADDQUALAL=忽略-MODE=-P -N255-警告=0——ASMList-DXPRJIOUTAL =默认值---PTECT,-MEM,+MEM,-HEX03-运行时=默认,+,清除,+NIT,-NoW,-No.No下载,+CONFIG,+CURB,+PLIB输出=-MCOF,+ELF:多点-堆栈=编译:Auto:Auto: Auto-“ErrFrase= %F:%L:错误:(%N)%s”-WAN格式= %F:%S:警告:(%N)%F:%L:咨询:(%N)%MeLy.xml:ODIST/Deult/MaultAutoRealDATORGRYS.OpDeX.X.Studio.ELF构建/默认/生产/ TunpLogLogGyO.OpDIS.P1微芯片MPLAB XC8C编译器(免费模式)V1.40Bug日期:11月30日2016部分支持版本:1.40版权(C)2016 Microchip Technology Inc.许可类型:节点配置::(1273)在免费MODEC中不可用的全知代码生成:程序文件(x86)Microchip xC8v1.40\包含PIC18F14K22.H:3352:错误:(1098)冲突声明对于变量“xTxStutsIt”(C:程序文件(x86)xC8v1.40\Pic18F14K22.h:3124)使
以上来自于百度翻译 以下为原文 Hallo vloki, Below is a complete content of 'built' window: **************************** make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf make[1]: Entering directory 'C:/Projects_SW/Temperature_logger_with_display/Temperature_datalogger_with_disp.X' make -f nbproject/Makefile-default.mk dist/default/production/Temperature_datalogger_with_disp.X.production.hex make[2]: Entering directory 'C:/Projects_SW/Temperature_logger_with_display/Temperature_datalogger_with_disp.X' "C:Program Files (x86)Microchipxc8v1.40binxc8.exe" --pass1 --chip=18F14K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,+plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/Temp_logger_with_disp.p1 Temp_logger_with_disp.c Temp_logger_with_disp.c:379: warning: (356) implicit conversion of float to integer "C:Program Files (x86)Microchipxc8v1.40binxc8.exe" --chip=18F14K22 -G -mdist/default/production/Temperature_datalogger_with_disp.X.production.map --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,+plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --memorysummary dist/default/production/memoryfile.xml -odist/default/production/Temperature_datalogger_with_disp.X.production.elf build/default/production/Temp_logger_with_disp.p1 Microchip MPLAB XC8 C Compiler (Free Mode) V1.40 Build date: Nov 30 2016 Part Support Version: 1.40 Copyright (C) 2016 Microchip Technology Inc. License type: Node Configuration :: warning: (1273) Omniscient Code Generation not available in Free mode C:Program Files (x86)Microchipxc8v1.40includepic18f14k22.h:3352: error: (1098) conflicting declarations for variable "_TXSTAbits" (C:Program Files (x86)Microchipxc8v1.40includepic18f14k22.h:3124) make[2]: *** [dist/default/production/Temperature_datalogger_with_disp.X.production.hex] Error 1 make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 (908) exit status = 1 nbproject/Makefile-default.mk:125: recipe for target 'dist/default/production/Temperature_datalogger_with_disp.X.production.hex' failed make[2]: Leaving directory 'C:/Projects_SW/Temperature_logger_with_display/Temperature_datalogger_with_disp.X' nbproject/Makefile-default.mk:84: recipe for target '.build-conf' failed make[1]: Leaving directory 'C:/Projects_SW/Temperature_logger_with_display/Temperature_datalogger_with_disp.X' nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed BUILD FAILED (exit value 2, total time: 23s) ******************************** Any suggestion? Arch |
|
|
|
查看这个帖子和FF:HTTP://www. McCHIP.COM/FUMMS/FUNDPOST/896907
以上来自于百度翻译 以下为原文 View this post and ff: http://www.microchip.com/forums/FindPost/896907 |
|
|
|
只有小组成员才能发言,加入小组>>
5243 浏览 9 评论
2035 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3208 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2258 浏览 5 评论
779浏览 1评论
672浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
598浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
680浏览 0评论
578浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 16:55 , Processed in 1.894689 second(s), Total 94, Slave 77 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号