GOTO problem in macro?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

GOTO problem in macro?

Post 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
Attachments
PureOpenLoopThrot.fcfx
(43.14 KiB) Downloaded 276 times

User avatar
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?

Post 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.

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: GOTO problem in macro?

Post by Chris_MIRA »

Thanks,
Please let me know when fixed!
Regards,
Chris

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: GOTO problem in macro?

Post by Chris_MIRA »

Hi,
Any news on when this bug fix will be available?
Regards,
Chris

User avatar
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?

Post 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

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: GOTO problem in macro?

Post 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

User avatar
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?

Post 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

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: GOTO problem in macro?

Post 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
Attachments
PureOpenLoopThrot.fcfx
(51.19 KiB) Downloaded 219 times

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: GOTO problem in macro?

Post 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

User avatar
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?

Post 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 249 times

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: GOTO problem in macro?

Post 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

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: GOTO problem in macro?

Post 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

User avatar
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?

Post 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.

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: GOTO problem in macro?

Post 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

Post Reply