Assembly CMF错误:没有为线路PIC18 MAPLABX定义psect

Assembly CMF错误:没有为线路PIC18 MAPLABX定义psect,assembly,mplab,xc8,Assembly,Mplab,Xc8,我对汇编/mcu开发非常陌生,当我想要配置我的管脚时,我遇到了这个错误 什么是psect? 我已经做了一些研究,但不是很清楚 使用MaplabxV5.40 工具链:XC8 v1.45 #include <pic18f27k40.inc> banksel TRISA movlw 111111 ;set pins as input movwf TRISA banksel TRISC mov

我对汇编/mcu开发非常陌生,当我想要配置我的管脚时,我遇到了这个错误

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

使用MaplabxV5.40 工具链:XC8 v1.45

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

psect
定义编译器的代码段。请记住:
11111
不是二进制的,您必须将
0b
放在前面。
psect
为编译器定义一个代码段。请记住:
11111
不是二进制的,您必须将
0b
放在前面。
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,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist --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/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)