Compiler Problem PIC18F2x8-CAN macro

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

Moderators: Benj, Mods

Post Reply
tbaggi
Posts: 7
Joined: Fri Mar 07, 2008 9:11 am

Compiler Problem PIC18F2x8-CAN macro

Post by tbaggi »

Hello,

i have Flowcode v3.2.0.36, i have realised this flowchart:

Image
*french version screen.

When i use compiler, i have errors:

Image

Update v3.2.2 repair errors or not?
If no, How to repair the problem?

Thx.

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:

Re: Compiler Problem PIC18F2x8-CAN macro

Post by Benj »

Hello

Updating to V3.2.2 should fix the problem. If it does not then it will at least bring your version up to date.

If the problem persists after the update then please can you email me with your fcf file and c file from your project.

My email is ben@matrixmultimedia.co.uk

tbaggi
Posts: 7
Joined: Fri Mar 07, 2008 9:11 am

Re: Compiler Problem PIC18F2x8-CAN macro

Post by tbaggi »

.fcf and .c sent because after the update it doesn't work.

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:

Re: Compiler Problem PIC18F2x8-CAN macro

Post by Benj »

Hello

Thanks for those files. The problem is being caused by the registers onboard the 18F PICmicro having the same names as the registers onboard the remote CAN controller chip.

I have modified the CAN code file so that your program should now compile correctly.

Simple copy the attached file into your Flowcode V3/Components folder.

Let me know if you have any further problems.
Attachments
CAN_Code.c
(37.01 KiB) Downloaded 310 times

tbaggi
Posts: 7
Joined: Fri Mar 07, 2008 9:11 am

Re: Compiler Problem PIC18F2x8-CAN macro

Post by tbaggi »

Benj wrote: Simple copy the attached file into your Flowcode V3/Components folder.
CAN_Code.c wasn't in "C:/.../FlowcodeV3/component" before I stick it.
After copy/paste it, errors are again here.

These errors are specific to the 18F series?

Ps: I can't test other things before Monday 9am (GMT+1: Paris Madrid Londres)because I use Flowcode v3 only in my College.

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:

Re: Compiler Problem PIC18F2x8-CAN macro

Post by Benj »

Hello

Ok then your probably using a previous version of Flowcode. Please can you find out which version you are using.

This can be found by clicking on Help and About.

The problem is not with all 18F PICmicro devices but rather only the 18F PICmicro devices with an internal CAN controller. The register names interfere with the register names of the CAN controller chip that we use.

tbaggi
Posts: 7
Joined: Fri Mar 07, 2008 9:11 am

Re: Compiler Problem PIC18F2x8-CAN macro

Post by tbaggi »

We use Flowcode exe version = v3.2.0.36 on 35 differents computers.

tbaggi
Posts: 7
Joined: Fri Mar 07, 2008 9:11 am

Re: Compiler Problem PIC18F2x8-CAN macro

Post by tbaggi »

Hello, to solve the problem we put into cometary the present errors under flowcode in file PIC18FXXX. It would seem that compilation goes. What do you think about it?
Thomas.

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Compiler Problem PIC18F2x8-CAN macro

Post by Steve »

Another way to solve this is to put the following into the Defines ("DΓ©finitions et dΓ©clarations de fonction :") section of the Supplementary Code ("Code supplementaire") window:

Code: Select all

#undef CANSTAT
#undef TXREQ
#undef ABAT
#undef ERRIE
#undef WAKIE
#undef ERRIF
#undef WAKIF
#undef SAM
#undef WAKFIL

Post Reply