Compiler problem with I2C CAL component

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

Moderator: Benj

Post Reply
Dirk Bubley
Posts: 99
Joined: Fri Feb 02, 2007 3:54 pm
Location: Germany
Has thanked: 14 times
Been thanked: 12 times
Contact:

Compiler problem with I2C CAL component

Post by Dirk Bubley »

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 159 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Compiler problem with I2C CAL component

Post by medelec35 »

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

Dirk Bubley
Posts: 99
Joined: Fri Feb 02, 2007 3:54 pm
Location: Germany
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Compiler problem with I2C CAL component

Post by Dirk Bubley »

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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Compiler problem with I2C CAL component

Post by medelec35 »

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
(20.69 KiB) Downloaded 181 times
Martin

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Compiler problem with I2C CAL component

Post by LeighM »

Thanks Martin,

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

Thanks,
Leigh
Attachments
PIC_CAL_I2C.c
(20.69 KiB) Downloaded 174 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Compiler problem with I2C CAL component

Post by medelec35 »

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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Compiler problem with I2C CAL component

Post by LeighM »

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

Dirk Bubley
Posts: 99
Joined: Fri Feb 02, 2007 3:54 pm
Location: Germany
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Compiler problem with I2C CAL component

Post by Dirk Bubley »

Thanks guys!!

BR

Dirk

Post Reply