简体   繁体   English

Microchip MPLAB IDE 和 XC8 编译器构建选项

[英]Microchip MPLAB IDE and XC8 compiler build options

I try to build a C project with the XC8 compiler (V 2.32).我尝试使用 XC8 编译器(V 2.32)构建一个 C 项目。 I get some errors from the compiler.我从编译器中得到一些错误。 I already added "--chip=$(MP_PROCESSOR_OPTION)" to the "Makefile-default.mk" file.我已经在“Makefile-default.mk”文件中添加了“--chip=$(MP_PROCESSOR_OPTION)”。

Here is the build log:这是构建日志:

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)

How can I build the program?如何构建程序? I can't find the "-S" in the log.我在日志中找不到“-S”。

I solved the problem.I did reinstall the XC8 compiler toolchain.我解决了这个问题。我确实重新安装了 XC8 编译器工具链。 After that I did select the toolchain in the MPLAB IDE: "Tools->Options->Embedded".之后我做了 select MPLAB IDE 中的工具链:“Tools->Options->Embedded”。 Select "Add" and Select the XC8 toolchain "bin" directory. Select“添加”和 Select XC8 工具链“bin”目录。 Select "Apply". Select“申请”。 Now the XC8 toolchain should be ready!现在 XC8 工具链应该准备好了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM