CMF错误:未为PIC18 MAPLABX行定义psect

问题描述

我是组装/ mcu开发的新手,当我要配置引脚时遇到此错误

什么是psect? 我已经做了一些研究,但还不是很清楚

使用MAPLABX v5.40 工具链:XC8 v1.45

 #include <pic18f27k40.inc>
    
     banksel TRISA     
     movlw 111111   ;set pins as input
     movwf TRISA 
     
     banksel TRISC     
     movlw 111010   
     movwf TRISC

这是错误/日志输出

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'D:/denozi/Documents/Embarqu�/2020/mcu/tp/disco/bsp/gpio/test/pjct/pic_essay.X'
make  -f nbproject/Makefile-default.mk dist/default/production/pic_essay.X.production.hex
make[2]: Entering directory 'D:/denozi/Documents/Embarqu�/2020/mcu/tp/disco/bsp/gpio/test/pjct/pic_essay.X'
"C:\Program Files (x86)\microchip\xc8\v1.45\bin\xc8.exe" -C  --chip=18F27K40 -Q -G    --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --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/pin-config.obj  pin-config.asm 
pin-config.asm:4: warning: (1352) truncation of operand value (0x1b207) to 8 bits
"C:\Program Files (x86)\microchip\xc8\v1.45\bin\xc8.exe"  --chip=18F27K40 -G -mdist/default/production/pic_essay.X.production.map  -DXPRJ_default=default    --double=24 --float=24 --emi=wordwrite --opt=+asm,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist --summary=default,+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/pic_essay.X.production.elf  build/default/production/pin-config.obj     
microchip MPLAB XC8 C Compiler (Free Mode) V1.45
Build date: Nov 15 2017
Part Support Version: 1.45
copyright (C) 2017 microchip Technology Inc.
License type: Node Configuration

:: warning: (1273) Omniscient Code Generation not available in Free mode
:0: error: (474) no psect specified for function variable/argument allocation
:0: error: (500) undefined symbols:
    _main(C:\Users\Denozi\AppData\Local\Temp\sdm8.obj) start_initialization(C:\Users\Denozi\AppData\Local\Temp\sdm8.obj) 
Non line specific message:: error: (1437) CMF error: no psect defined for the line
Non line specific message:: error: (1437) CMF error: no psect defined for the line
Non line specific message:: error: (1437) CMF error: no psect defined for the line
make[2]: *** [dist/default/production/pic_essay.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
(908) exit status = 1
nbproject/Makefile-default.mk:132: recipe for target 'dist/default/production/pic_essay.X.production.hex' Failed
make[2]: Leaving directory 'D:/denozi/Documents/Embarqu�/2020/mcu/tp/disco/bsp/gpio/test/pjct/pic_essay.X'
nbproject/Makefile-default.mk:91: recipe for target '.build-conf' Failed
make[1]: Leaving directory 'D:/denozi/Documents/Embarqu�/2020/mcu/tp/disco/bsp/gpio/test/pjct/pic_essay.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' Failed

BUILD Failed (exit value 2,total time: 654ms)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...