GOTO problem in macro?
Moderator: Benj
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
GOTO problem in macro?
Hi,
The attached programme simulates OK but will not compile, the errors are:
PureOpenLoopThrot.c(2522): error: undefined label 'FCC__A'
PureOpenLoopThrot.c(2539): error: undefined label 'FCC__A'
PureOpenLoopThrot.c(2782): error: undefined label 'FCC_IniSet_D'
PureOpenLoopThrot.c(2793): error: undefined label 'FCC_IniSet_C'
PureOpenLoopThrot.c(2804): error: undefined label 'FCC_IniSet_B'
It doesn't seem to like me declaring a break point then using GOTO. Am I doing something wrong, or is this a bug? Im using FC6.05 (as down loaded in your training session).
Regards,
Chris
The attached programme simulates OK but will not compile, the errors are:
PureOpenLoopThrot.c(2522): error: undefined label 'FCC__A'
PureOpenLoopThrot.c(2539): error: undefined label 'FCC__A'
PureOpenLoopThrot.c(2782): error: undefined label 'FCC_IniSet_D'
PureOpenLoopThrot.c(2793): error: undefined label 'FCC_IniSet_C'
PureOpenLoopThrot.c(2804): error: undefined label 'FCC_IniSet_B'
It doesn't seem to like me declaring a break point then using GOTO. Am I doing something wrong, or is this a bug? Im using FC6.05 (as down loaded in your training session).
Regards,
Chris
- Attachments
-
- PureOpenLoopThrot.fcfx
- (43.14 KiB) Downloaded 289 times
- 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: GOTO problem in macro?
Hi Chris,
We've replicated the problem here and have added it to the list as a bug. Hopefully we can get this resolved for you quickly.
We've replicated the problem here and have added it to the list as a bug. Hopefully we can get this resolved for you quickly.
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
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
- 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: GOTO problem in macro?
Hi Chris,
Right when we load up your program there is a problem with the Goto icons.
However trying to replicate your problem again, we cannot seem to do it, even when using macros with switch statements like in your program it all works fine???
Anyway while we are looking into this issue we have worked out a temporary solution for you. If you add the following to the supplementary code available via the Project Options then the program will compile correctly.
Right when we load up your program there is a problem with the Goto icons.
However trying to replicate your problem again, we cannot seem to do it, even when using macros with switch statements like in your program it all works fine???
Anyway while we are looking into this issue we have worked out a temporary solution for you. If you add the following to the supplementary code available via the Project Options then the program will compile correctly.
Code: Select all
#define FCC__A FCC_IniSet_A
#define FCC_IniSet_B FCC__B
#define FCC_IniSet_C FCC__C
#define FCC_IniSet_D FCC__D
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
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Re: GOTO problem in macro?
Thanks!
That's great, supplementary code copied , pasted and all compiling fine
Thanks for all your trouble!
Regards,
Chris
That's great, supplementary code copied , pasted and all compiling fine
Thanks for all your trouble!
Regards,
Chris
- 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: GOTO problem in macro?
Hi Chris.
just a note to say you have picked a very obscure bug here! I think this is the first issue I have had with the code generation that I can not easily replicate. I see where things are going wrong, but can't replicate your bug at all, even for my own peace of mind!
Jonny
just a note to say you have picked a very obscure bug here! I think this is the first issue I have had with the code generation that I can not easily replicate. I see where things are going wrong, but can't replicate your bug at all, even for my own peace of mind!
Jonny
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Re: GOTO problem in macro?
Hello again...
The Bug is back! Ive been using FC6 happily since applying the fix suggested in your earlier messages, but today the same problem seems to have started again (code attached) when compiling to C, there is no problem but when compiling to hex I get a failure report indicating the GOTO. The problem seems to be the GOTO A in MACR called ManPosition. Any ideas would be VERY gratefully received! The code for the fix you posted is still in place in the project options supplementary code box.
Regards,
Chris
The Bug is back! Ive been using FC6 happily since applying the fix suggested in your earlier messages, but today the same problem seems to have started again (code attached) when compiling to C, there is no problem but when compiling to hex I get a failure report indicating the GOTO. The problem seems to be the GOTO A in MACR called ManPosition. Any ideas would be VERY gratefully received! The code for the fix you posted is still in place in the project options supplementary code box.
Regards,
Chris
- Attachments
-
- PureOpenLoopThrot.fcfx
- (51.19 KiB) Downloaded 229 times
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Re: GOTO problem in macro?
Just to add, actually the error message has changed slightly from the original. Error message copied below!
Regards (again)
Chris
PureOpenLoopThrot.c
Starting preprocessor: "C:\Program Files\Flowcode 6\compilers\pic\boostc\pp.exe" PureOpenLoopThrot.c -i "C:\Program Files\Flowcode 6\compilers\pic\boostc\include" -d _PIC18F4455 -la -c2 -o PureOpenLoopThrot.pp -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
.................
PureOpenLoopThrot.c(2790): error: undefined label 'FCC_IniSet_A'
PureOpenLoopThrot.c(2857): error: undefined label 'FCC_IniSet_A'
PureOpenLoopThrot.c success
failure
Completed BoostC compilation, return = 1
C:\Program Files\Flowcode 6\compilers\pic\boostc\boostc_18f.exe reported error code 1
FINISHED
Regards (again)
Chris
PureOpenLoopThrot.c
Starting preprocessor: "C:\Program Files\Flowcode 6\compilers\pic\boostc\pp.exe" PureOpenLoopThrot.c -i "C:\Program Files\Flowcode 6\compilers\pic\boostc\include" -d _PIC18F4455 -la -c2 -o PureOpenLoopThrot.pp -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
.................
PureOpenLoopThrot.c(2790): error: undefined label 'FCC_IniSet_A'
PureOpenLoopThrot.c(2857): error: undefined label 'FCC_IniSet_A'
PureOpenLoopThrot.c success
failure
Completed BoostC compilation, return = 1
C:\Program Files\Flowcode 6\compilers\pic\boostc\boostc_18f.exe reported error code 1
FINISHED
- 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: GOTO problem in macro?
Hi Chris,
I've added in another workaround to get around the problem while we are fixing the underlying problem.
The new errors now relate to the connection points in the ManPosition macro so I undefined the previous workaround fix and add in the new one for this macro.
I've added in another workaround to get around the problem while we are fixing the underlying problem.
The new errors now relate to the connection points in the ManPosition macro so I undefined the previous workaround fix and add in the new one for this macro.
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
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Re: GOTO problem in macro?
Hi Benj,
Thanks for you help, sorry to be thick but how do I find / use your new work around? The previous workaround code listed above doesn't seem to have changed and I can see another attachment or anything...
Again "Sorry" if Im being thick...
Regards,
Chris
Thanks for you help, sorry to be thick but how do I find / use your new work around? The previous workaround code listed above doesn't seem to have changed and I can see another attachment or anything...
Again "Sorry" if Im being thick...
Regards,
Chris
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Re: GOTO problem in macro?
To clarify, thanks for doing another work around Ive altered my code in other areas since posting the problem, what do I need to include or do to my version of the code or FC6 to include your workaround in my newer version of the programme?
regards,
Chris
regards,
Chris
- 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: GOTO problem in macro?
Hi Chris,
The new workaround Flowcode source file is posted in my last message and basically consists of this.
In the ManPosition macro I added a C icon with the following code.
The new workaround Flowcode source file is posted in my last message and basically consists of this.
In the ManPosition macro I added a C icon with the following code.
We undefine the previous workaround for the last macro and redefine a new workaround jump address to use in this macro.#undef FCC__A
#define FCC__A FCC_ManPosition_A
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
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Re: GOTO problem in macro?
Great! Got it now (Sorry) I haven't used a C Icon before and had missed your insertion at the top of the MACRO!
Thanks for all your help!
Regards,
Chris
Thanks for all your help!
Regards,
Chris