Yet another compiler error

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

Moderator: Benj

Post Reply
hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Yet another compiler error

Post by hyperion007 »

I keep getting these errors every time I try to compile to HEX in FC v6. It is version 6.0.3 and I have just installed it today so I don't know if it would have worked without the patch or not.

Oled_16x2_test.c
Starting preprocessor: "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\pp.exe" Oled_16x2_test.c -i "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include" -d _PIC18F4550 -la -c2 -o Oled_16x2_test.pp -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX

.......................
Oled_16x2_test.c(608:39): error: failed to generate expression
Oled_16x2_test.c(608:39): internal error: failed to generate conditional expression
Oled_16x2_test.c(608:44): error: failed to generate expression
Oled_16x2_test.c(609:39): error: failed to generate expression
Oled_16x2_test.c(609:39): internal error: failed to generate conditional expression
Oled_16x2_test.c(609:44): error: failed to generate expression
Oled_16x2_test.c(610:39): error: failed to generate expression
Oled_16x2_test.c(610:39): internal error: failed to generate conditional expression
Oled_16x2_test.c(610:44): error: failed to generate expression
Oled_16x2_test.c success

failure
Launched program C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18F.exe
Completed BoostC compilation, return = 1

C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18F.exe reported error code 1


Any ideas?

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Yet another compiler error

Post by kersing »

Providing more information would help. Attaching the flowcode file would be ideal. Generated C code might help as well...
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Yet another compiler error

Post by hyperion007 »

Ok, no problem.

Running Windows 7 pro x64
FC v5 works fine as usual.
Attachments
Oled_16x2_test.fcfx
(5.22 KiB) Downloaded 264 times
Oled_16x2_test.c
(15.3 KiB) Downloaded 260 times

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: Yet another compiler error

Post by JonnyW »

Hi. The C code looks valid to me at these lines. However, there was, I recall, a bug in BoostC to do with a certain combination of 'shift' and 'and' operations causing a syntax error.

When I tried to replicate that with the latest BoostC I could not replicated it - it is possible this is some related bug.

We can have a look into this tomorrow and see what is going on.

\jonny

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Yet another compiler error

Post by hyperion007 »

Great, thanks!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Yet another compiler error

Post by Benj »

Hello,

Fine for me too, are you using the latest patch 6.0.3?

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Yet another compiler error

Post by hyperion007 »

Hi,

Yes, latest patch 6.0.3 downloaded from your site yesterday.

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

Re: Yet another compiler error

Post by medelec35 »

I am also getting errors with oled:

Code: Select all

Device:        PIC.18F.18F4550
Generated by:  Flowcode v6.0.3.0
Date:          Monday, October 21, 2013 18:45:55
Users:         1
Registered to: Martin xxxxxxxx
Licence key:   GCYPWG
   NOT FOR COMMERCIAL USE
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18F.exe  -v -t PIC18F4550 "Oled test1.c"
......
Launched program C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18F.exe
Launching BoostC...
...
BoostC Optimizing C Compiler Version 7.11 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2013 Pavel Baranov
Copyright(C) 2004-2013 David Hobday

Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited


Oled test1.c
Starting preprocessor: "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\pp.exe" "Oled test1.c" -i "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include" -d _PIC18F4550 -la -c2 -o "Oled test1.pp" -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX 

.........................................
Oled test1.c(609:39): error: failed to generate expression
Oled test1.c(609:39): internal error: failed to generate conditional expression
Oled test1.c(609:44): error: failed to generate expression
Oled test1.c(610:39): error: failed to generate expression
Oled test1.c(610:39): internal error: failed to generate conditional expression
Oled test1.c(610:44): error: failed to generate expression
Oled test1.c(611:39): error: failed to generate expression
Oled test1.c(611:39): internal error: failed to generate conditional expression
Oled test1.c(611:44): error: failed to generate expression
Oled test1.c success

failure
Also the oled component is far too big, even zooming dashboard fully out, this is what component looks like:
Fully zoomed out dashboard.png
(25.93 KiB) Downloaded 5305 times
Expanding the dashboard make component even larger so you don't even see the pcb contacts.
Martin
Attachments
Oled test1.fcfx
(4.71 KiB) Downloaded 250 times
Oled test1.c
(14.94 KiB) Downloaded 264 times
Martin

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Yet another compiler error

Post by hyperion007 »

Good catch! I actually overlooked the fact that all my attempts to compile a FC v6 project to HEX had the Adafruit OLED component.
So I now tried it with a regular 4x20 LCD component and it works fine. I am also having the same issue regarding the wrong size of the Adafruit OLED on the system panel.

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Yet another compiler error

Post by hyperion007 »

Please let us know when the Adafruit OLED component is fixed :)

Thanks.

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: Yet another compiler error

Post by JonnyW »

Hi.

We were looking at getting a 6.0.4 out asap, but I have had a lot of presentations and training to do in the last week. Now back on coding we will be able to get something out, hopefully by the end of next week.

We want this patch to address stability and compile issues, so this should go in.

Cheers,

Jonny

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Yet another compiler error

Post by Benj »

Hello,

I've found a couple of issues and think they have all been resolved now. Seems to simulate and download correctly now anyway.

Component
LCDAdafruitOLED.fcpx
(25.35 KiB) Downloaded 215 times
Test File
Flowcode1.fcfx
(4.54 KiB) Downloaded 206 times

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Yet another compiler error

Post by hyperion007 »

Hi Ben,

So I tried the new component, but my test program AND yours still have the same problem:

Flowcode1.c
Starting preprocessor: "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\pp.exe" Flowcode1.c -i "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include" -d _PIC16F877A -la -c2 -o Flowcode1.pp -v -d _BOOSTC -d _PIC16 -d _CHAR_INDEX

....................
Flowcode1.c(522:39): error: failed to generate expression
Flowcode1.c(522:39): internal error: failed to generate conditional expression
Flowcode1.c(522:44): error: failed to generate expression
Flowcode1.c(523:39): error: failed to generate expression
Flowcode1.c(523:39): internal error: failed to generate conditional expression
Flowcode1.c(523:44): error: failed to generate expression
Flowcode1.c(524:39): error: failed to generate expression
Flowcode1.c(524:39): internal error: failed to generate conditional expression
Flowcode1.c(524:44): error: failed to generate expression
Flowcode1.c success

failure
Launched program C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_16F.exe
Completed BoostC compilation, return = 1

C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_16F.exe reported error code 1

_________________________________________________________

Oled_16x2_test.c
Starting preprocessor: "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\pp.exe" Oled_16x2_test.c -i "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include" -d _PIC18F4550 -la -c2 -o Oled_16x2_test.pp -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX

.......................
Oled_16x2_test.c(601:39): error: failed to generate expression
Oled_16x2_test.c(601:39): internal error: failed to generate conditional expression
Oled_16x2_test.c(601:44): error: failed to generate expression
Oled_16x2_test.c(602:39): error: failed to generate expression
Oled_16x2_test.c(602:39): internal error: failed to generate conditional expression
Oled_16x2_test.c(602:44): error: failed to generate expression
Oled_16x2_test.c(603:39): error: failed to generate expression
Oled_16x2_test.c(603:39): internal error: failed to generate conditional expression
Oled_16x2_test.c(603:44): error: failed to generate expression
Oled_16x2_test.c success

failure
Launched program C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18F.exe
Completed BoostC compilation, return = 1

C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18F.exe reported error code 1

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Yet another compiler error

Post by JohnCrow »

Hi
Just tried Bens files and they compile to hex OK

I've attached a full set of generated files for you to try
Flowcode1.zip
(136.84 KiB) Downloaded 219 times
1 in 10 people understand binary, the other one doesn't !

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Yet another compiler error

Post by hyperion007 »

Thanks, but even after I unpacked all your files into a new folder, opened the fcfx file in FC V6 it still didn't compile.

I don't really want to test just the the hello world message on the OLED. I do however want to replace the LCD component in some of my programs with this new OLED component but to do so I need to be able to compile my programs with this OLED component.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Yet another compiler error

Post by Benj »

Hello,

Are you still having problems compiling? Have you updated to patch release 6.0.4?

If your still having problems then can you attach a simple test file and the compile errors that are generated and I will take a look for you.

Post Reply