Page 1 of 1

Problem with CAN and 18F258

Posted: Tue Nov 20, 2007 8:45 am
by stgt
Hello,

I use the internal CAN-Controller of the 18F258 and want to send data by CAN-Bus. If I try to compile, I get the follow error:

----------------------------------------------------------
Flowcode2.c
Starting preprocessor: "C:\Programme\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" C:\CAN_project\Flowcode2.c -i "C:\Programme\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC18F258 -la -c2 -o Flowcode2.pp -v -d _BOOSTC -d _PIC18

C:\CAN_project\Flowcode2.c(285): Illegal redefinition of symbol: CANSTAT
C:\CAN_project\Flowcode2.c(367): Illegal redefinition of symbol: TXREQ
C:\CAN_project\Flowcode2.c(376): Illegal redefinition of symbol: ABAT
C:\CAN_project\Flowcode2.c(391): Illegal redefinition of symbol: ERRIE
C:\CAN_project\Flowcode2.c(392): Illegal redefinition of symbol: WAKIE
C:\CAN_project\Flowcode2.c(401): Illegal redefinition of symbol: ERRIF
C:\CAN_project\Flowcode2.c(402): Illegal redefinition of symbol: WAKIF
C:\CAN_project\Flowcode2.c(419): Illegal redefinition of symbol: SAM
C:\CAN_project\Flowcode2.c(424): Illegal redefinition of symbol: WAKFIL

9 errors detected
Error: preprocessing error failure

Return code = 1
--------------------------------------------------------


Has anybody had the same problem maybe? Could anybody help me?

Thanks in advance

Posted: Tue Nov 20, 2007 10:39 am
by Benj
Hello

At the moment the CAN code is suited only to work with a Microchip MCP2515 CAN controller. We are looking into using the internal CAN controllers at the moment.

The errors you are getting are due to definitions of registers that exist for the internal CAN and also on the external MCP2515 chip.