Error when compiling to Hex
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
- Contact:
Error when compiling to Hex
Hi,
I receive an error when compiling to hex:
/quote
C:\.....\G2\quad G2-2.c(1174): error: missing semicolon
C:\.....\G2\quad G2-2.c(1174): error: 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.
/unquote
It compiles to C without errors.
Edit: This is the offending line (the 'void... is line 1175)
//Supplementary implementations
void main()
{
I can mail the source to tech support, but would prefer not to post here.
Thanks in advance,
Jan Didden
I receive an error when compiling to hex:
/quote
C:\.....\G2\quad G2-2.c(1174): error: missing semicolon
C:\.....\G2\quad G2-2.c(1174): error: 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.
/unquote
It compiles to C without errors.
Edit: This is the offending line (the 'void... is line 1175)
//Supplementary implementations
void main()
{
I can mail the source to tech support, but would prefer not to post here.
Thanks in advance,
Jan Didden
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
- Contact:
Re: Error when compiling to Hex
Hi,
I have isolated the problem to a single C statement. If it is in, I get the error described above. If it is out, it compiles to HEX without errors. The statement is:
#pragma DATA 0x2100, 0x12, 0x34, 0x56, 0x78 ;
to preset some eeprom memory locations.
What am I doing wrong here??
Jan Didden
I have isolated the problem to a single C statement. If it is in, I get the error described above. If it is out, it compiles to HEX without errors. The statement is:
#pragma DATA 0x2100, 0x12, 0x34, 0x56, 0x78 ;
to preset some eeprom memory locations.
What am I doing wrong here??
Jan Didden
- 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: Error when compiling to Hex
Hello Jan
The ; at the end of the line of C code is not required. Hopefully this should fix your problem.
The ; at the end of the line of C code is not required. Hopefully this should fix your problem.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
- Contact:
Re: Error when compiling to Hex
Unfortunately, it doesn't. Same error.
If I enclose the statement in curly braces before/after, the error is: 'missing right parenthes'
Jan Didden
If I enclose the statement in curly braces before/after, the error is: 'missing right parenthes'
Jan Didden
- 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: Error when compiling to Hex
Hello Jan
Which chip are you trying to compile to?
Which chip are you trying to compile to?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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: Error when compiling to Hex
Hello Jan
The 16F865 is not supported by Flowcode. Is this chip name correct?
The 16F865 is not supported by Flowcode. Is this chip name correct?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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: Error when compiling to Hex
Hello Jan
Place the code into the defines section of the supplementary code window rather then inside a C code block.
Place the code into the defines section of the supplementary code window rather then inside a C code block.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
- Contact:
Re: Error when compiling to Hex
Hello Ben,
Sorry for the delay in replying; I have been on a vacation.
Indeed, placing the #pragma for the EEPROM preset in an AddDefines component gets rid of the error message.
Thanks,
Jan Didden
Sorry for the delay in replying; I have been on a vacation.
Indeed, placing the #pragma for the EEPROM preset in an AddDefines component gets rid of the error message.
Thanks,
Jan Didden
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
- Contact:
Re: Error when compiling to Hex
Hello again Ben,
So now I have an AddDefines macro at the start of my program, to enable the AddDefines 'component'.
There are two defines, for the purpose of presetting the EEPROM contents at the moment of downloading the hex code into the 16F685:
#pragma DATA 0x2100, 0x55
#pragma DATA 0x2110, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96
The values do, however, not show up in the EPROM component window when I simulate the flowchart.
I'm not sure whether it is implemented that way though; it only would seem logical to me that it would appear.
Subsequently in the program I read these preset locations and take actions accordingly.
It works when I manually preset these EEPROM locations before the sim.
Can you enlighten me?
Thanks,
Jan Didden
So now I have an AddDefines macro at the start of my program, to enable the AddDefines 'component'.
There are two defines, for the purpose of presetting the EEPROM contents at the moment of downloading the hex code into the 16F685:
#pragma DATA 0x2100, 0x55
#pragma DATA 0x2110, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96
The values do, however, not show up in the EPROM component window when I simulate the flowchart.
I'm not sure whether it is implemented that way though; it only would seem logical to me that it would appear.
Subsequently in the program I read these preset locations and take actions accordingly.
It works when I manually preset these EEPROM locations before the sim.
Can you enlighten me?
Thanks,
Jan Didden
- Steve
- Matrix Staff
- Posts: 3424
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: Error when compiling to Hex
Flowcode does not simulate code in the C icons, "AddDefines" component or the "Supplementary Code" window.
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
- Contact:
Re: Error when compiling to Hex
Steve, thanks. Are you guys considering to implement it in a future version?
Jan Didden
Jan Didden
- Steve
- Matrix Staff
- Posts: 3424
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: Error when compiling to Hex
Accurately simulating all C code would be quite tricky, but I can see that implementing certain bits could be beneficial and fairly easy (e.g. the "#pragma data" statements).
So yes - I'll look at allowing you to preset the EEPROM values within the simulation for v4.
So yes - I'll look at allowing you to preset the EEPROM values within the simulation for v4.