Page 1 of 1

GOTO problem in macro?

Posted: Wed Feb 19, 2014 12:03 pm
by Chris_MIRA
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

Re: GOTO problem in macro?

Posted: Wed Feb 19, 2014 1:07 pm
by Benj
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.

Re: GOTO problem in macro?

Posted: Thu Feb 20, 2014 8:53 am
by Chris_MIRA
Thanks,
Please let me know when fixed!
Regards,
Chris

Re: GOTO problem in macro?

Posted: Mon Mar 03, 2014 11:40 am
by Chris_MIRA
Hi,
Any news on when this bug fix will be available?
Regards,
Chris

Re: GOTO problem in macro?

Posted: Mon Mar 17, 2014 3:47 pm
by Benj
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.

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

Re: GOTO problem in macro?

Posted: Mon Mar 17, 2014 4:01 pm
by Chris_MIRA
Thanks!
That's great, supplementary code copied , pasted and all compiling fine :D :D :D
Thanks for all your trouble!
Regards,
Chris

Re: GOTO problem in macro?

Posted: Mon Mar 17, 2014 7:32 pm
by JonnyW
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

Re: GOTO problem in macro?

Posted: Wed Apr 30, 2014 8:04 am
by Chris_MIRA
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

Re: GOTO problem in macro?

Posted: Wed Apr 30, 2014 8:08 am
by Chris_MIRA
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

Re: GOTO problem in macro?

Posted: Wed Apr 30, 2014 10:08 am
by Benj
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.
PureOpenLoopThrot.fcfx
(51.03 KiB) Downloaded 275 times

Re: GOTO problem in macro?

Posted: Wed Apr 30, 2014 2:39 pm
by Chris_MIRA
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

Re: GOTO problem in macro?

Posted: Wed Apr 30, 2014 2:47 pm
by Chris_MIRA
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

Re: GOTO problem in macro?

Posted: Wed Apr 30, 2014 4:07 pm
by Benj
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.
#undef FCC__A

#define FCC__A FCC_ManPosition_A
We undefine the previous workaround for the last macro and redefine a new workaround jump address to use in this macro.

Re: GOTO problem in macro?

Posted: Thu May 01, 2014 7:42 am
by Chris_MIRA
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