找不到PIC10F200的随附文件 [英] Included file not found for PIC10F200

查看:226
本文介绍了找不到PIC10F200的随附文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 PIC10F200 上编译一些代码,并且我正在使用MPLABX .
以下代码是main.asm文件:

I am trying to compile some code on a PIC10F200 and I am using MPLABX.
The following code is the main.asm file:

#include "p10f200.inc"
; CONFIG
    __CONFIG _WDT_OFF & _CP_OFF & _MCLRE_OFF
    ORG 0x0000
INIT ; We are initializing the microcontroller over the next three lines.
    MOVLW ~(1 << GP1)  ;these two lines set GP1 as an output
    TRIS GPIO
    BSF GPIO, GP1 ;this line is where we set GP1 output high to light the LED
LOOP 
    GOTO LOOP                          ; loop forever
END ; Needed to end the program.


该错误表明编译器找不到p10f200.inc文件.

The error says that the compiler cannot find the p10f200.inc file.

"C:\Program Files\Microchip\xc8\v2.20\bin\xc8-cc.exe" -c  -mcpu=10F200   -mdfp="C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/PIC10-12Fxxx_DFP/1.3.46/xc8"  -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=default  -msummary=-psect,-class,+mem,-hex,-file  -ginhx032 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -std=c99 -gdwarf-3 -mstack=compiled:auto   -o build/default/production/main.o  main.asm 
::: advisory: (2049) C99 compliant libraries are currently not available for baseline or mid-range devices, or for enhanced mid-range devices using a reentrant stack; using C90 libraries
main.asm:1:10: fatal error: 'p10f200.inc' file not found
#include "p10f200.inc"
         ^~~~~~~~~~~~~
1 error generated.
make[2]: *** [build/default/production/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
(908) exit status = 1
nbproject/Makefile-default.mk:113: recipe for target 'build/default/production/main.o' failed
make[2]: Leaving directory 'C:/Users/build/MPLABXProjects/Demo Final.X'
nbproject/Makefile-default.mk:91: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/build/MPLABXProjects/Demo Final.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

BUILD FAILED (exit value 2, total time: 457ms)

很抱歉,如果这是一个基本错误,那么我对使用微控制器和汇编是超级新手.

Sorry if this is a basic error, I am super new to using micro-controllers and assembly.

推荐答案

我知道这并不是一个完整的答案,但我希望它能使您走上正确的轨道.

I know this won't be a complete answer, but I hope it will place you on the right track.

Microchip在最新版本的XC8中用新的汇编器代替了它的旧汇编器.有很多更改,包括语法,很难在此答案中进行总结.您需要参考新汇编器的手册.不幸的是,您可以在互联网上找到的大多数示例不再有效.

Microchip replaced its old assembler with a new one in the latest releases of XC8. There are lots of changes, including the syntax, which is hard to summarize in this answer. You need to refer to the manual of the new assembler. Unfortunately, most of the examples you can find on internet are not valid anymore.

例如,您只需要在开始时输入#include "xc.inc".不再支持绝对内存分配.配置也具有不同的语法,例如CONFIG WRT = OFF.还有很多...同样,您需要参考手册.

For example, you need just #include "xc.inc" at the beginning. Absolute memory allocation is not supported anymore. Configs also have a different syntax, like CONFIG WRT = OFF. And a lot more... Again, you need to refer to the manual.

这篇关于找不到PIC10F200的随附文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆