Page 1 of 1

Failed to Compile working FC, after recent PIC i2C updates.

Posted: Fri Aug 08, 2025 11:37 am
by jay_dee
Hi,
PIC 18F2585 project, compiled and worked fine a couple of weeks ago. It will now not compile and throws the error shown below.
I ran a recent update of all files, not sure if this is part of the issue.
There is no hardware channel 2 for i2C on the PIC18F2585 so maybe this is a bug of some sort?

I tried to follow the wiki on how to roll-back the PIC_CAL_I2C file to version 2. But 'download' button is always greyed out.
Every file is updated to latest version.

Any thoughts, J.
Employing 18F2585 errata work-arounds:
* Corrupted fast interrupt shadow registers
C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\PIC\PIC_CAL_I2C.c:
227: #error "I2C Channel 2 does not have the SSP2IF defined on this chip - does your chip support this feature?"
^ (103) #error: "I2C Channel 2 does not have the SSP2IF defined on this chip - does your chip support this feature?"
227: #error "I2C Channel 2 does not have the SSP2IF defined on this chip - does your chip support this feature?"
^ (103) #error: "I2C Channel 2 does not have the SSP2IF defined on this chip - does your chip support this feature?"
(908) exit status = 1

Re: Failed to Compile working FC, after recent PIC i2C updates.

Posted: Fri Aug 08, 2025 11:59 am
by chipfryer27
Hi

Sounds similar to another post earlier in the week regarding SSP. That chip didn't have a Ch2 either.

Just tried to backtrack PIC I2C CAL to v2 and see it is grey too.

Regards

Re: Failed to Compile working FC, after recent PIC i2C updates.

Posted: Fri Aug 08, 2025 3:19 pm
by medelec35
Did you select ch2 by accident (which I did not believe was possible) or does the error occur when ch1 is selected.
Just in case I have added a bt of belt an braces to the I2C cal to prevent the

Code: Select all

I2C Channel 2 does not have the SSP2IF defined on this chip - does your chip support this feature?
To test for this update:
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

%ProgramData%\MatrixTSL\FlowcodeV10\CAL\PIC
Place the attached C file.
You will need to reload your project file for the fix to take place.
If you run any library updates, then the PIC_CAL_I2C.c you added will be overwritten, so it will stop working again (unless the PIC_CAL_I2C.c update has been pushed).

If you would like to post your .fcfx project, I can do some further testing.

Re: Failed to Compile working FC, after recent PIC i2C updates.

Posted: Wed Aug 13, 2025 8:19 am
by jay_dee
Hi Martin,
The channel options were only for Software or Channel 1.
If i replace with the file you provided, the issue is resolved.
All of the effected FC now compile OK.
Thanks, J.

Re: Failed to Compile working FC, after recent PIC i2C updates.

Posted: Wed Aug 13, 2025 8:28 am
by medelec35
Thanks, J.
Yes I thought so, but best to confirm.
I appreciate the update.