Page 1 of 1

General Error when compiling to Hex

Posted: Tue Apr 27, 2010 2:24 pm
by medelec35
Hello wizards.
When compiling to hex I get a general error with line numbers.

By compiling flowchart, would someone mind letting me know where I have gone wrong please.
I am not that familiar with C, if indeed that is the cause.
Thank you.

Code: Select all

http://www.matrixmultimedia.com


Launching the compiler...
C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F737 "pwm flowcode test.c"
BoostC Optimizing C Compiler Version 6.95 (for PIC16 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: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited


pwm flowcode test.c
Starting preprocessor: C:\PROGRA~1\MATRIX~1\FLOWCO~2\BoostC\pp.exe "E:\pwm flowcode test.c" -i C:\PROGRA~1\MATRIX~1\FLOWCO~2\BoostC\include -d _PIC16F737 -la -c2 -o "E:\pwm flowcode test.pp" -v -d _BOOSTC -d _PIC16 


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

E:\pwm flowcode test.c(160): error: general error
E:\pwm flowcode test.c(169): error: general error
pwm flowcode test.c failure

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: General Error when compiling to Hex

Posted: Tue Apr 27, 2010 4:21 pm
by Benj
Hi Medelec,

Not sure if you've already bottomed this one butthe compilation error was due to missing semicolons after your closing brackets in the supplementary code window.

rom char* ccprxl = { 0,1,3,4,6,7,9,10,12,13,15,16,18,19,21,23,24,26,27,29,30,32,33,35,36,38,39,41,43,44,46,47,49,50,52,53,55,56,58,59,61,62,64,66,67,69,70,72,73,75,76,78,79,81,82,
84,86,87,89,90,92,93,95,96,98,99,101,102,104,105,107,109,110,112,113,115,116,118,119,121,122,124,125,127,129,130,132,133,135,136,138,139,141,142,144,145,147,148,150,152,153 };

rom char* ccpxcon = { 12,44,12,44,12,44,12,60,28,60,28,60,28,60,44,12,44,12,44,12,44,28,60,28,60,28,60,28,12,44,12,
44,12,44,12,60,28,60,28,60,28,60,44,12,44,12,44,12,44,28,60,28,60,28,60,28,12,44,12,44,12,44,12,60,28,60,28,60,28,60,44,12,44,12,44,12,44,28,60,28,60,28,60,28,12,44,12,44,12,44,12,60,28,60,28,60,28,60,44,12,44 };

Compiling threw out a load more errors unfortunatley but I think these should be fairly simple to fix.

C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1205:2): error: unknown identifier 'FCV_CCPRL'
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1205:2): error: invalid operand 'FCV_CCPRL'
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1205:12): error: failed to generate expression
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1206:2): error: unknown identifier 'FCV_CCPCON'
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1206:2): error: invalid operand 'FCV_CCPCON'
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1206:13): error: failed to generate expression
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1212:11): error: unknown identifier 'FCV_CCPRL'
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1212:11): error: invalid operand 'FCV_CCPRL'
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1212:9): error: failed to generate expression
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1213:12): error: unknown identifier 'FCV_CCPCON'
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1213:12): error: invalid operand 'FCV_CCPCON'
C:\Documents and Settings\Administrator\Desktop\pwm flowcode test.c(1213:10): error: failed to generate expression
pwm flowcode test.c success

Re: General Error when compiling to Hex

Posted: Tue Apr 27, 2010 4:54 pm
by medelec35
Ah of course. Thanks Ben. I used excel to generate code and forgot to include the semicolons :oops:
Bit odd how on two pc's, I only had two errors appear

Code: Select all

E:\pwm flowcode test.c(160): error: general error
E:\pwm flowcode test.c(169): error: general error
pwm flowcode test.c failure
And

Code: Select all

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.
What errors? lol

So not a clue why. When compiling, errors like missing semicolons, unknown identifier missing braces etc. are flagged up. would you know why they weren't flagged up in this case?
Thanks for posting the errors, now I can see what the problems are, I can sort it.

Update: After putting in missing semicolons, I now get the errors displayed.