小弟初学PIC单片机编程,我自己写的程序用MPLAB C18可以通过,后来改PICC18编译器就不通过,我按提示查了好久错误都没有问题,我不知道问提出在哪里,求大神帮忙看一下。
以下是MPLAB C18编译结果:
MPLINK 4.45, Linker
Device Database Version 1.10
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors : 0
MP2HEX 4.45, COFF to HEX File Converter
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors : 0
Loaded D:\taorong\taorong.cof.
----------------------------------------------------------------------
Debug build of project `D:\taorong\taorong.mcp' succeeded.
Language tool versions: mpasmwin.exe v5.47, mplink.exe v4.45, mcc18.exe v3.44, mplib.exe v4.45
Preprocessor symbol `__DEBUG' is defined.
Sat Aug 22 13:17:35 2015
----------------------------------------------------------------------
BUILD SUCCEEDED
以下是PICC18编译结果:
Make: The target "D:\taorong\ST7920SPI.p1" is out of date.
Executing: "c:\PICC18\bin\picc18.exe" --pass1 D:\taorong\ST7920SPI.c -q --chip=18F4520 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [372] D:\taorong\ST7920SPI.h; 20.47 "," expected
Error [984] D:\taorong\AT24C02.h; 6.13 type redeclared
Error [1098] D:\taorong\AT24C02.h; 6.13 conflicting declarations for variable "SSPIF" (c:\PICC18\include\pic18f4520.h:4129)
Error [984] D:\taorong\AT24C02.h; 7.11 type redeclared
Error [1098] D:\taorong\AT24C02.h; 7.11 conflicting declarations for variable "SEN" (c:\PICC18\include\pic18f4520.h:4093)
Warning [374] D:\taorong\ST7920SPI.c; 9.11 missing basic type; int assumed
Error [314] D:\taorong\ST7920SPI.c; 9.11 ";" expected
Error [192] D:\taorong\ST7920SPI.c; 169.7 undefined identifier "TAB1"
Error [981] D:\taorong\ST7920SPI.c; 169.17 pointer required
Error [981] D:\taorong\ST7920SPI.c; 169.17 pointer required
Error [372] D:\taorong\ST7920SPI.c; 354.46 "," expected
Make: The target "D:\taorong\main.p1" is out of date.
Executing: "c:\PICC18\bin\picc18.exe" --pass1 D:\taorong\main.c -q --chip=18F4520 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [372] D:\taorong\ST7920SPI.h; 20.47 "," expected
Error [984] D:\taorong\AT24C02.h; 6.13 type redeclared
Error [1098] D:\taorong\AT24C02.h; 6.13 conflicting declarations for variable "SSPIF" (c:\PICC18\include\pic18f4520.h:4129)
Error [984] D:\taorong\AT24C02.h; 7.11 type redeclared
Error [1098] D:\taorong\AT24C02.h; 7.11 conflicting declarations for variable "SEN" (c:\PICC18\include\pic18f4520.h:4093)
Warning [228] D:\taorong\main.c; 29.16 illegal character (0xD4)
Warning [358] D:\taorong\main.c; 29.32 illegal conversion of pointer to integer
Error [187] D:\taorong\main.c; 29.32 too few function arguments
Warning [228] D:\taorong\main.c; 31.16 illegal character (0xB1)
Warning [358] D:\taorong\main.c; 31.30 illegal conversion of pointer to integer
Error [187] D:\taorong\main.c; 31.30 too few function arguments
Warning [228] D:\taorong\main.c; 32.16 illegal character (0xD4)
Warning [358] D:\taorong\main.c; 32.26 illegal conversion of pointer to integer
Error [187] D:\taorong\main.c; 32.26 too few function arguments
Warning [358] D:\taorong\main.c; 33.18 illegal conversion of pointer to integer
Error [187] D:\taorong\main.c; 33.18 too few function arguments
Make: The target "D:\taorong\init.p1" is out of date.
Executing: "c:\PICC18\bin\picc18.exe" --pass1 D:\taorong\init.c -q --chip=18F4520 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [372] D:\taorong\ST7920SPI.h; 20.47 "," expected
Error [984] D:\taorong\AT24C02.h; 6.13 type redeclared
Error [1098] D:\taorong\AT24C02.h; 6.13 conflicting declarations for variable "SSPIF" (c:\PICC18\include\pic18f4520.h:4129)
Error [984] D:\taorong\AT24C02.h; 7.11 type redeclared
Error [1098] D:\taorong\AT24C02.h; 7.11 conflicting declarations for variable "SEN" (c:\PICC18\include\pic18f4520.h:4093)
Warning [335] D:\taorong\init.c; 10.1 unknown pragma "code"
Error [195] D:\taorong\init.c; 14.1 expression syntax
Error [312] D:\taorong\init.c; 15.1 ";" expected
Warning [335] D:\taorong\init.c; 16.1 unknown pragma "code"
Warning [335] D:\taorong\init.c; 17.1 unknown pragma "interrupt"
Make: The target "D:\taorong\delay.p1" is out of date.
Executing: "c:\PICC18\bin\picc18.exe" --pass1 D:\taorong\delay.c -q --chip=18F4520 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [372] D:\taorong\ST7920SPI.h; 20.47 "," expected
Error [984] D:\taorong\AT24C02.h; 6.13 type redeclared
Error [1098] D:\taorong\AT24C02.h; 6.13 conflicting declarations for variable "SSPIF" (c:\PICC18\include\pic18f4520.h:4129)
Error [984] D:\taorong\AT24C02.h; 7.11 type redeclared
Error [1098] D:\taorong\AT24C02.h; 7.11 conflicting declarations for variable "SEN" (c:\PICC18\include\pic18f4520.h:4093)
Make: The target "D:\taorong\ZLG7289.p1" is out of date.
Executing: "c:\PICC18\bin\picc18.exe" --pass1 D:\taorong\ZLG7289.c -q --chip=18F4520 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [372] D:\taorong\ST7920SPI.h; 20.47 "," expected
Error [984] D:\taorong\AT24C02.h; 6.13 type redeclared
Error [1098] D:\taorong\AT24C02.h; 6.13 conflicting declarations for variable "SSPIF" (c:\PICC18\include\pic18f4520.h:4129)
Error [984] D:\taorong\AT24C02.h; 7.11 type redeclared
Error [1098] D:\taorong\AT24C02.h; 7.11 conflicting declarations for variable "SEN" (c:\PICC18\include\pic18f4520.h:4093)
********** Build failed! **********
双击第一项错误是
void LCD_wrstr(unsigned char x_add, const rom char *s);/*写入要显示的字符串*/
我不知道哪里错误了,还有picc编译器需要注意那些问题。求大神指导!!!!
|