Problem with CAN and 18F258

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
stgt
Posts: 2
Joined: Tue Nov 20, 2007 8:12 am

Problem with CAN and 18F258

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post 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.

Post Reply