我尝试用XC8编译器(V 2.32(构建一个C项目。我从编译器那里得到一些错误。我已经添加了"--chip=$(MP_PROCESSOR_OPTION(";到";Makefile default.mk";文件
这是构建日志:
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory '/media/diskhome2/files/MPLABXProjects-backup-2021-03-26/led-pov-8/led-pov-8.X'
make -f nbproject/Makefile-default.mk dist/default/production/led-pov-8.X.production.hex
make[2]: Entering directory '/media/diskhome2/files/MPLABXProjects-backup-2021-03-26/led-pov-8/led-pov-8.X'
"/media/diskhome2/files/microchip/xc8/v2.32/pic/bin/xc8" -mcpu=16F628A --chip=16F628A -c -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:auto -o build/default/production/my-pov.p1 my-pov.c
/media/diskhome2/files/microchip/xc8/v2.32/pic/bin/picc -mcpu=16F628A --chip=16F628A -c -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:auto -o build/default/production/my-pov.p1 my-pov.c
(925) extraneous argument to "-S" option
make[2]: *** [nbproject/Makefile-default.mk:110: build/default/production/my-pov.p1] Error 1
make[1]: *** [nbproject/Makefile-default.mk:91: .build-conf] Error 2
make: *** [nbproject/Makefile-impl.mk:39: .build-impl] Error 2
(908) exit status = 1
make[2]: Leaving directory '/media/diskhome2/files/MPLABXProjects-backup-2021-03-26/led-pov-8/led-pov-8.X'
make[1]: Leaving directory '/media/diskhome2/files/MPLABXProjects-backup-2021-03-26/led-pov-8/led-pov-8.X'
BUILD FAILED (exit value 2, total time: 256ms)
如何构建程序?我找不到"-S〃;日志中。
我解决了这个问题。我确实重新安装了XC8编译器工具链。之后,我确实在MPLAB IDE中选择了工具链:";工具->选项->嵌入式";。选择";添加";并选择XC8工具链";bin";目录选择";应用";。现在XC8工具链应该准备好了!