I am trying to setup a CAN bus for simple communication between 2 PIC MCUs. One of them (PIC18F4550) is sending an ASCII character which is read by the other (PIC18F2550) & displayed via UART. I am not able to compile the code in MPLAB-X for the receiving PIC. It shows the following-
CLEAN SUCCESSFUL (total time: 535ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `E:/Microchip/PIC18F2550_C/PIC18F2550_C.X'
make -f nbproject/Makefile-default.mk dist/default/production/PIC18F2550_C.X.production.hex
make[2]: Entering directory `E:/Microchip/PIC18F2550_C/PIC18F2550_C.X'
"E:\Microchip\XC\xc8\v1.21\bin\xc8.exe" --pass1 --chip=18F2550 -Q -G --double=32 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --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 "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -obuild/default/production/CAN_RX.p1 CAN_RX.c
(908) exit status = 1
CAN_RX.c:87: error: (314) ";" expected
CAN_RX.c:87: warning: (374) missing basic type; int assumed
CAN_RX.c:87: error: (314) ";" expected
CAN_RX.c:87: warning: (374) missing basic type; int assumed
CAN_RX.c:95: error: (314) ";" expected
CAN_RX.c:95: warning: (374) missing basic type; int assumed
CAN_RX.c:95: error: (314) ";" expected
CAN_RX.c:95: warning: (374) missing basic type; int assumed
CAN_RX.c:107: warning: (1385) variable "RC6" is deprecated (declared at E:\Microchip\XC\xc8\v1.21\include\pic18f2550.h:9266)
CAN_RX.c:170: warning: (357) illegal conversion of integer to pointer
CAN_RX.c:170: warning: (357) illegal conversion of integer to pointer
CAN_RX.c:170: warning: (357) illegal conversion of integer to pointer
CAN_RX.c:176: warning: (357) illegal conversion of integer to pointer
CAN_RX.c:176: warning: (357) illegal conversion of integer to pointer
CAN_RX.c:176: warning: (357) illegal conversion of integer to pointer
make[2]: *** [build/default/production/CAN_RX.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory `E:/Microchip/PIC18F2550_C/PIC18F2550_C.X'
make[1]: Leaving directory `E:/Microchip/PIC18F2550_C/PIC18F2550_C.X'
BUILD FAILED (exit value 2, total time: 4s)
I am not able to understand the mistake I am making (I suspect that the CAN library functions are not receiving the input arguments in the desired data format but I can't figure out how to go around it)
Code I used-
[See attachment]