V5 ADC - error during compile

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

User avatar
Jay Dee
Posts: 359
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 116 times
Been thanked: 139 times
Contact:

V5 ADC - error during compile

Postby Jay Dee » Sat Jan 21, 2012 3:07 pm

Hi all,

Using an ECIO 40P and just starting to play with V5 ( nice work by the way, like the new variable types and annotation features )
Tried to compile a previously working FC4 program and got an error message relating to the PIC_CAL_ADC.c
Had a look at the relavent line in the C file but did not give me any hints as to the issue ( I'm awful at C, thats why I use FC! ;-) )
It could be something just confused in my install, I guess?

I wrote a new simple FC V5 program using the ADC component in V5 and got the same result when compiling.

Test_V5_ADC_Comp.c
Starting preprocessor: C:\PROGRA~1\Flowcode\v5\Tools\boostc\pp.exe Test_V5_ADC_Comp.c -i C:\PROGRA~1\Flowcode\v5\Tools\boostc\include -d _PIC18F4455 -la -c2 -o Test_V5_ADC_Comp.pp -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
C:\Program Files\Flowcode\v5\CAL\PIC\PIC_CAL_ADC.c(1588): Illegal symbol name: (
1 errors detected
Error: preprocessing error
failure
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:



Any pointers appreciated, i keep thumping keys at this end to see if I can get it working. If it compiles smoothly for anyone else, then it must be my system.
Attachments
Test_V5_ADC_Comp.fcf
(9 KiB) Downloaded 107 times

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

Re: V5 ADC - error during compile

Postby medelec35 » Sat Jan 21, 2012 6:03 pm

Hi Jay,
I have had a look and I think I may have found what's causing the problem.
Can you make a copy of PIC_CAL_ADC.c
in C:\Program Files\Flowcode\v5\CAL
or if 64 bit windows C:\Program Files (x86)\Flowcode\v5\CAL
and replace with attached file.
I'm not an expert like Ben so this is unofficial temporary fix as this may or may not affect something else.
I'm sure Ben can then give an official fix on Monday and tell me I have also made a mistake lol.
If this fix does not work, I will take another look at it. I don't give up easily :)

At least you know its not your system

Note: Untested on hardware.
Martin
Attachments
PIC_CAL_ADC.c
(88.7 KiB) Downloaded 135 times
These users thanked the author medelec35 for the post (total 2):
Jay Dee (Sat Jan 21, 2012 7:01 pm) • Benj (Mon Jan 23, 2012 11:41 am)
Rating: 10.53%
 
Martin

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

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

Re: V5 ADC - error during compile

Postby medelec35 » Sat Jan 21, 2012 6:37 pm

Fix I can now confirm as working on 18F4455 hardware.

Affected devices:
18F2220, 18F2221, 18F2320, 18F2321, 18F24J10, 18F2410, 18F2420, 18F2423, 18F2450,
18F2455, 18F2480, 18F25J10, 18F2510, 18F2515, 18F2520, 18F2523, 18F2525, 18F2550,
18F2580, 18F2585, 18F2610, 18F2620, 18F2680, 18F4220, 18F4221, 18F4320, 18F4321,
18F44J10, 18F4410, 18F4420, 18F4423, 18F4450, 18F4455, 18F4480, 18F45J10, 18F4510,
18F4515, 18F4520, 18F4523, 18F4525, 18F4550, 18F4580, 18F4585, 18F4610, 18F4620,
18F4680, 18F4682 & 18F4685


Martin
Martin

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

User avatar
Jay Dee
Posts: 359
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 116 times
Been thanked: 139 times
Contact:

Re: V5 ADC - error during compile

Postby Jay Dee » Sat Jan 21, 2012 7:00 pm

Nice one Martin!
Compiled and working on my hardware as well. No reason to stop working/play on the weekend now!
Thanks for quick reply and workaround. J.

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

Re: V5 ADC - error during compile

Postby medelec35 » Sat Jan 21, 2012 7:07 pm

Thats great Jay!

That's why I tried to get V5 up and running, Its just too good just to sit there doing nothing :lol:
Need to get use to all the new features :)
Have a good weekend playing.

Martin
Martin

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

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

Re: V5 ADC - error during compile

Postby medelec35 » Sun Jan 22, 2012 12:56 am

Just been searching though posts and this is the same issue that Jonny answered here:
viewtopic.php?f=29&p=31445#p31445
I have removed a bit more than he has suggested.
Wish I could of found that 1st lol.

From what I can see see my modification will have an issue with 12 bit ADC if that exists within the devices I mentioned.
I will go through the device listing and If I do find that to be the case then I will re-post file but as per Jonnys suggestion.
Reason I remove 12bit is because this was not present in type13 ADC for FC4

Martin
Martin

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