Compiler problem with I2C CAL component

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

Moderator: Benj

Dirk Bubley
Posts: 89
Joined: Fri Feb 02, 2007 3:54 pm
Location: Germany
Has thanked: 9 times
Been thanked: 8 times
Contact:

Compiler problem with I2C CAL component

Postby Dirk Bubley » Mon Apr 06, 2015 3:11 pm

Hello Martix team,

i belive I found a Compiler Problem in my professional PIC Version 6.1.1.0 with the I2C CAL component.

The Compiler alway Returns the following error message:

Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited


Test I2C 1_1.c
Starting preprocessor: "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\pp.exe" "Test I2C 1_1.c" -i "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include" -d _PIC18F6722 -la -c2 -o "Test I2C 1_1.pp" -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX

.........................................
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(579:8): error: unknown identifier 'ssp2con3'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(579:8): error: failed to generate expression
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(579:8): error: invalid operand 'ssp2con3'
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_I2C.c(579:18): error: failed to generate expression
Test I2C 1_1.c success

failure
Completed BoostC compilation, return = 1

C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18F.exe Hat den Fehlercode 1 gemeldet


BEENDET





Attached the FC6 file too. Any ideas to solve this Problem

BR

Dirk
Attachments
Test I2C 1_1.fcfx
(6.1 KiB) Downloaded 42 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: Compiler problem with I2C CAL component

Postby medelec35 » Mon Apr 06, 2015 3:26 pm

Hi Dirk,
If you change properties of I2C component from Channel2 to Channel1 then you should be able to compile ok?
Looks like there is a bug with channel 2 as its trying use a register which does not exist.

I'm not that familiar with I2C, so not able to sort it without affecting something else.

Are you ok using channel 1?

Martin
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Dirk Bubley
Posts: 89
Joined: Fri Feb 02, 2007 3:54 pm
Location: Germany
Has thanked: 9 times
Been thanked: 8 times
Contact:

Re: Compiler problem with I2C CAL component

Postby Dirk Bubley » Mon Apr 06, 2015 3:48 pm

Hi Martin,

many thanks for the fast reply. Yes compiling with channel 1 will solve the Problem.

In my Hardware I can not change to Ch1 because of a existing PCB were the ports c3 and c4 are already used.

Do you see any Change to fix this issue??

BR

Dirk

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: Compiler problem with I2C CAL component

Postby medelec35 » Mon Apr 06, 2015 6:16 pm

Hi Dirk,
I have modified attached file so channel2 now compiles ok.

can you make a backup of PIC_CAL_I2C.c in C:\Program Files (x86)\Flowcode 6\CAL\PIC\
and replace with attached file.

Since I don't really know what i'm doing with I2C I can't guarantee it will work of course.
If not working then you can always try software mode.

If I have not modified PIC_CAL_I2C.c correctly then I'm sure someone who knows what they are doing like Benj will sort modify file correctly.

Martin
Attachments
PIC_CAL_I2C.c
(21.28 KiB) Downloaded 63 times
These users thanked the author medelec35 for the post (total 2):
LeighM (Tue Apr 07, 2015 8:39 am) • Benj (Tue Apr 07, 2015 10:00 am)
Rating: 10.53%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
LeighM
Matrix Staff
Posts: 1912
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: Compiler problem with I2C CAL component

Postby LeighM » Tue Apr 07, 2015 8:41 am

Thanks Martin,

Just done a little tweak, attached, this will now go into the repo.

Thanks,
Leigh
Attachments
PIC_CAL_I2C.c
(21.28 KiB) Downloaded 64 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: Compiler problem with I2C CAL component

Postby medelec35 » Tue Apr 07, 2015 9:33 am

Thanks Leigh,
I was so Close.
I'm assuming the file I posted would have worked for Dirk,
But would cause an issue with a different target device?
Martin
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
LeighM
Matrix Staff
Posts: 1912
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: Compiler problem with I2C CAL component

Postby LeighM » Tue Apr 07, 2015 10:34 am

I'm sure it would have been fine. If channel 1 does not have control register 3, then channel 2 wouldn't have either :D
These users thanked the author LeighM for the post:
medelec35 (Tue Apr 07, 2015 10:44 am)
Rating: 5.26%
 

Dirk Bubley
Posts: 89
Joined: Fri Feb 02, 2007 3:54 pm
Location: Germany
Has thanked: 9 times
Been thanked: 8 times
Contact:

Re: Compiler problem with I2C CAL component

Postby Dirk Bubley » Tue Apr 07, 2015 6:37 pm

Thanks guys!!

BR

Dirk