Page 1 of 1

Compile errors.

Posted: Mon Feb 15, 2010 5:02 am
by Mikat
Hi.

I try compile some my little older program,witch is done last summer,but I get compile errors,even I havent modify the program, and in the summer program compiles fine..
The error looks this.
compile test.c
Starting preprocessor: G:\FLOWCO~1\BoostC\pp.exe "Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c" -i G:\FLOWCO~1\BoostC\include -d _PIC18F4620 -la -c2 -o "Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.pp" -v -d _BOOSTC -d _PIC18

G:\flowcode4\FCD\internals.h(80): warning: unknown or invalid pragma (ignored)

.............................

Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1251:44): error: unknown identifier 'FCI_TMP_STR'
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1251:17): error: arguments of 'FCI_CONCATENATE' don't match the parameters of call
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1251:2): error: failed to generate expression
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1252:18): error: unknown identifier 'FCI_TMP_STR'
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1252:17): error: arguments of 'FCI_CONCATENATE' don't match the parameters of call
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1252:2): error: failed to generate expression
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1295:50): error: unknown identifier 'FCI_TMP_STR'
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1295:17): error: arguments of 'FCI_CONCATENATE' don't match the parameters of call
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1295:2): error: failed to generate expression
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1296:18): error: unknown identifier 'FCI_TMP_STR'
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1296:17): error: arguments of 'FCI_CONCATENATE' don't match the parameters of call
Y:\Backup Thinkpad\Memeo\Backup Thinkpad\F_\Flowcode V4\Omat\takilaohjain 64x128\compile test.c(1296:2): error: failed to generate expression
compile test.c success

failure

....
Return code = 1

Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.

FINISHED

Nothing else should not change,but the FC4 is updated version 4.2...
I had similar problem other programs too, if they are done the older version of Flowcode, the program wont compile untill print string function are removed...
And the same problem is my both computers, so i dont think that could be related to computer or corrupted installation..
Any ideas?


Mika

Re: Compile errors.

Posted: Mon Feb 15, 2010 8:53 am
by Jan Lichtenbelt
Dear Mika,

The first step with this kind of errors is to look carfeully at the C-code program and start with the first error on line 1251. Aslo look if the variable TMP_STR has been declared in the Flowcode. If this is solved , start looking at the variable CONCATENATE. After each change start compiling again and you will see that error meassages will disappear unpredictable.

Succes

Jan

PS use a texteditor with line numbers like http://www.contexteditor.org

Re: Compile errors.

Posted: Mon Feb 15, 2010 11:29 am
by JAW
Hi Mikat,

One quick thing to try is to copy the program and try running it off your desktop. I have had similar problems with the compiler not liking network drives.

Regards

James

Re: Compile errors.

Posted: Mon Feb 15, 2010 11:46 am
by Mikat
No luck in the local hard drive, same problem...
Correct me if I am wrong, but doesnt the FCI mean Flowcode internals?
So those error messages point to fc own things, not my created strings or variables...
The code does not have c-code, but have the custom glcd component witch Ben has created...
The thing is that program compiles ok if I remove the strings and manipulation, and then create same strings again, and make same manipulations too... So if I rewrite the strings and manipulations, then the program compiles ok...
But I have 10 to 20 programs and I REALLY DONT HAVE TIME TO REWRITE THOSE...

Re: Compile errors.

Posted: Mon Feb 15, 2010 12:33 pm
by Sean
All the errors seem to be related to the 'internals.h' file. This should be in the FCD folder of the Flowcode installation. I have attached a new copy incase it has become corrupted.
internals.h
(22.96 KiB) Downloaded 358 times
The error list starts at an unidentified pragma warning at line 80 of the file. There is no corresponding instruction in the attached file.

Re: Compile errors.

Posted: Mon Feb 15, 2010 2:13 pm
by Mikat
Ill try that file, but like i said, i have 2 computers, and same problem both, and dont believe that both computers have corrupted file...
And like i said, if i rewrite the strings, then the file compiles fine, that is the strange thing...
That pragma warning comes sometime, but it didnt cause the compiler error...

Re: Compile errors.

Posted: Mon Feb 15, 2010 2:37 pm
by Mikat
Tested the internals file witch you sent, something changes, at least errors....
Result was...

http://www.matrixmultimedia.com


Launching the compiler...
F:\Flowcode V4\BoostC\boostc.pic18.flowcode.exe -v -t PIC18F4620 "fcu 9.81 br96.c"

.................

BoostC Optimizing C Compiler Version 6.95 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2009 Pavel Baranov
Copyright(C) 2004-2009 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


fcu 9.81 br96.c
Starting preprocessor: F:\FLOWCO~1\BoostC\pp.exe "F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c" -i F:\FLOWCO~1\BoostC\include -d _PIC18F4620 -la -c2 -o "F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.pp" -v -d _BOOSTC -d _PIC18


.................................................................................................................................................................................................

F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1308:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1308:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1309:9): error: unknown identifier 'ts_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1309:9): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1309:9): error: invalid operand 'ts_bit(pir1, 0x00000004) '
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1309:34): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1309:2): error: error in 'while' loop statement
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1411:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1411:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1458:13): error: unknown identifier 'ts_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1458:13): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1458:13): error: invalid operand 'ts_bit(pir1, 0x00000005)'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1458:11): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1475:13): error: unknown identifier 'ts_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1475:13): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1475:13): error: invalid operand 'ts_bit(rcsta, 0x00000002)'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1475:11): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1508:13): error: unknown identifier 'ts_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1508:13): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1508:13): error: invalid operand 'ts_bit(rcsta, 0x00000001)'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1508:11): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1519:2): error: unknown identifier 'cr_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1519:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1520:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(1520:2): error: failed to generate expression

.............................................................................

F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4742:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4742:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4743:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4743:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4746:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4746:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4805:2): error: unknown identifier 'cr_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4805:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4806:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4806:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4808:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4808:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4809:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4809:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4814:2): error: unknown identifier 'cr_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4814:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4815:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4815:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4816:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4816:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4959:2): error: unknown identifier 'st_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(4959:2): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5255:6): error: unknown identifier 'ts_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5255:6): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5255:36): error: unknown identifier 'ts_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5255:36): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5255:6): error: invalid operand 'ts_bit(intcon, 0x00000002) '
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5255:36): error: invalid operand 'ts_bit(intcon, 0x00000005)'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5255:33): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5263:6): error: unknown identifier 'ts_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5263:6): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5263:36): error: unknown identifier 'ts_bit'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5263:36): error: failed to generate expression
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5263:6): error: invalid operand 'ts_bit(intcon, 0x00000001) '
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5263:36): error: invalid operand 'ts_bit(intcon, 0x00000004)'
F:\Flowcode V4\Omat\eber ecu\Fcu\fcu 9.81 br96.c(5263:33): error: failed to generate expression

.

fcu 9.81 br96.c success

failure

Return code = 1

Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.

FINISHED

Re: Compile errors.

Posted: Mon Feb 15, 2010 3:34 pm
by Sean
It would appear that the file I previously attached was newer, but the latest version. I have now found the latest includes.h file that includes the _bit definitions required to cure the current errors.
internals.h
(35.55 KiB) Downloaded 367 times

Re: Compile errors.

Posted: Tue Feb 16, 2010 6:17 am
by Mikat
Hello Sean...
I tried that file and no luck...
But when i look at the internals file i found something ....
There is mentioned in the changelog at that FCI_TMP_STR....
"* 221009 | BR | Removed the FCI_TMP_STR and FCI_TMP_INT variables"
So if that is removed, why my Flowcode still want to use that?
My FC version is 4.2.3.58...

Mika

Re: Compile errors.

Posted: Tue Feb 16, 2010 11:02 am
by Sean
I have compared the internals.h file I posted with the one in the V4.2.3.58 release. it is a little newer, but has no significant differences.

The references to FCI_TMP_STR and FCI_TMP_INT are not from the internals.h file.

Are they being used as global variables somewhere in the main program?

If you can post a program that demonstrates this problem, I will try to find a solution (.fcf file and .c file).

Re: Compile errors.

Posted: Tue Feb 16, 2010 11:40 am
by Mikat
Hi Sean.

That unsigned char FCI_TMP_STR[20] is part that older internals.h file..
There is the part for older file,that what you sent first...
#ifndef internals_h
#define internals_h

#if defined MX_ARM7 || defined MX_AVR
#include "C:\Program Files\Matrix Multimedia\Flowcode V3\FCD\internals.c"
#endif

#include <float.h>

unsigned char FCI_TMP_STR[20];
int FCI_TMP_INT;

And there is the never internals.h...

#ifndef internals_h
#define internals_h

//BR 22/10/09 - Are these needed? 10F devices could not allocate enough memory to create array
//unsigned char FCI_TMP_STR[20];
//int FCI_TMP_INT;

When i modified tho never file same way as is the older, the compiling goes without errors....
So somehow it uses the FCI_TMP_STR...
The program doesnt have tmp_str variable, only temp, and its integer...


Mika

Re: Compile errors.

Posted: Tue Feb 16, 2010 11:49 am
by Sean
OK

If you get the opportunity, it might be a good idea to reinstall Flowcode. It is possible that you are currently running with files from different versions.
Your original internals.h was definitely too old for V4.2.3.58.

Re: Compile errors.

Posted: Tue Feb 16, 2010 12:05 pm
by Mikat
That old file is the file that you sent first, not what i have installed..
The file that i had installed has last modification dated 22.10.2009, and that modification is just removing those FCI_TMP_STR and FCI_TMP_INT variables...
And that modification causes me error at compiling files witch has been created older version of flowcode...
I will probably do a fresh install next week when i get my "new hobby computer" x31...
But anyway, for some reason those programs witch is created for older version of flowcode, needs those FCI_TMP_STR and FCI_TMP_INT variables, but if i write a new program at version 4.2 flowcode, it dont need those files, strange...


Mika

Re: Compile errors.

Posted: Tue Feb 16, 2010 12:15 pm
by Sean
If you are able to post a program that demonstrates this problem, we would be interested to see what is causing it.
Importation of V3 programs is a requirement of V4.
There are known problems importing directly from V2, but loading and saving with V3 makes even these programs V4 compatible.

Re: Compile errors.

Posted: Thu Feb 18, 2010 8:27 am
by Mikat
Here is the file witch cause problem at the compiling.
I am not sure is the file created at Flowcode 3, but at least it has been edited, maybe created at Flowcode 4.1 and after that it has been compiling ok..
So the problem appears at update of Flowcode 4...

Mika

Re: Compile errors.

Posted: Fri Feb 19, 2010 10:24 am
by Benj
Hello Mikat

I have had a look at your program and I think I have been able to solve the issue. Please can you give the attached file a go and see if this fixes things for you.