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

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8886
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
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

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

Dirk Bubley
Posts: 99
Joined: Fri Feb 02, 2007 3:54 pm
Location: Germany
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

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8886
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
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 83 times
Martin

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

User avatar
LeighM
Matrix Staff
Posts: 2043
Joined: Tue Jan 17, 2012 10:07 am
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 85 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8886
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
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

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

User avatar
LeighM
Matrix Staff
Posts: 2043
Joined: Tue Jan 17, 2012 10:07 am
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
Contact:

Re: Compiler problem with I2C CAL component

Post by Dirk Bubley »

Thanks guys!!

BR

Dirk

Post Reply