Page 1 of 1

Compiler problem with I2C CAL component

Posted: Mon Apr 06, 2015 3:11 pm
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

Re: Compiler problem with I2C CAL component

Posted: Mon Apr 06, 2015 3:26 pm
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

Re: Compiler problem with I2C CAL component

Posted: Mon Apr 06, 2015 3:48 pm
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

Re: Compiler problem with I2C CAL component

Posted: Mon Apr 06, 2015 6:16 pm
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

Re: Compiler problem with I2C CAL component

Posted: Tue Apr 07, 2015 8:41 am
by LeighM
Thanks Martin,

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

Thanks,
Leigh

Re: Compiler problem with I2C CAL component

Posted: Tue Apr 07, 2015 9:33 am
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

Re: Compiler problem with I2C CAL component

Posted: Tue Apr 07, 2015 10:34 am
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

Re: Compiler problem with I2C CAL component

Posted: Tue Apr 07, 2015 6:37 pm
by Dirk Bubley
Thanks guys!!

BR

Dirk