Flowcode V6 -> V8

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

Moderator: Benj

Post Reply
apurna
Posts: 1
Joined: Tue Aug 27, 2019 2:44 pm
Contact:

Flowcode V6 -> V8

Post by apurna »

Hello,
flowcode V6 user with
the compiler and assembler boostc
the PPPv3 programmer.

Today with V8 flowcode with
the xc8 compiler
the assembler DoNothing
me programmer PPPv3

My program compiles and loads into my product but does not work.

During the compilation, I have more like default:

using updated 32-bit floating-point libraries; improved accuracy might increase code size
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_IO.c: 216: non-reentrant function "_FC_CAL_Port_In_DDR__x" appears in multiple call graphs and has been duplicated by the compiler
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_Delay.c: 105: non-reentrant function "_delay_ms" appears in multiple call graphs and has been duplicated by the compiler
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_UART.c: 883: (764) mismatched comparison (warning)
MDC_10003_STEREO_ref_3b.c: 913: (1257) local variable "_FCR_RETVAL" is used but never given a value (warning)

Thank's.

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: Flowcode V6 -> V8

Post by Benj »

Hello,

Please check the connection properties of the UART / RS232 component are correct.

Hopefully fixing these will solve the compilation error.

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Flowcode V6 -> V8

Post by AbhijitR »

Hello!

Following the above post even I am facing the same problem while compiling the flow code in FC8, on contrary the same flow code compiled perfect (and works in the hardware too) without any errors in FC6,

the complier highlights below error for those MACROs which are called more then one time by different MACROs

Pro.c: "xxx": non-reentrant function "xxxxxxxxxxxxx" appears in multiple call graphs and has been duplicated by the compiler

As per my understanding it is about calling a MACRO multiple times, is there any different method to do so in FC8?

Thank you in advance.

Regards
Abhi

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode V6 -> V8

Post by medelec35 »

Hi Abhi,
AbhijitR wrote:Pro.c: "xxx": non-reentrant function "xxxxxxxxxxxxx" appears in multiple call graphs and has been duplicated by the compiler

As per my understanding it is about calling a MACRO multiple times, is there any different method to do so in FC8?
Yes, you are correct.
Different compilers give different levels of warning.
V6 uses BoostC and V8 uses XC8
If you was to compile the same flowchart using XC8 pre 1.41 then you probably won't even see the warning.
The warning is there because the compiler has to produce a duplicate function.

It should not be anything to worry about, so long as not calling the same function from an interrupt and somewhere else within main code or other functions?

Hardware should work the same as it did with V6.
If not, then there could ban an addition issue with migration?

Would you like me to take a look at your flowchart?
If you don't want to make it public, you could PM flowchart.
Martin

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Flowcode V6 -> V8

Post by AbhijitR »

Hello! Martin

Many thanks for the reply and allowing me to PM.

Thank you again.

Regards
Abhi

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode V6 -> V8

Post by medelec35 »

Hi Abhi,
You are welcome.
I'm afraid there are serious issues with your flowchart that is correctly flagging up warnings.
You are calling the same functions (Call macros) from the interrupt macro and from within other functions.
For example.
You are calling from within interrupt

Code: Select all

AM_LED_OFF
You are also calling

Code: Select all

AM_LED_OFF
from 3 other functions (Timer_Pro_Mode, Dry_Run_Int_Timer & Factory_Reset)
My advice is never call any functions from within an interrupt.
You should keep interrupts as short as possible.
Always allow interrupts to exit naturally at the end and never before then.
Use the interrupt to set flags, eg. a Flag_AM_LED_OFF.
Then within Main:
If Flag_AM_LED_OFF
then call AM_LED_OFF macro.

Can call AM_LED_OFF from multiple macros, just not within interrupts as well.
Hope this makes sense?
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode V6 -> V8

Post by medelec35 »

Hi Abhi,
Via PM:
AbhijitR wrote:Kindly correct me if I have not understood you well,
- never call a MACRO from interrupt
Correct.
You also can't have the same functions within interrupts as outside interrupts.
E.g MOD, delays, components with delays etc.
AbhijitR wrote:- set/reset a flag within the interrupt for "that function" and take the effects globally
Correct, although I only set the flag within interrupt.
The flag is cleared at the end of the function.
AbhijitR wrote: if by any chance I couldn't achieve I may bother you again, I hope you wont mind,
I don't mind at all.
Good luck, and I'm happy to look at your flowchart after all the corrections have been made.
Martin

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Flowcode V6 -> V8

Post by AbhijitR »

Hello! Martin
good morning

Following your post, I tried to clear the errors generated by the compiler one by one, but unfortunately after clearing those (first 7) errors again some new errors were generated on compilation and it went on, very sadly :( I stopped working on that flow chart and decided to write the same application in FC8.

If there is any trick to work on the FC6 flowchart in FC8, do let me know, as it will be very time consuming to write the entire thing again.

Thank you, have a wonderful weekend.

Regards
Abhi

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode V6 -> V8

Post by medelec35 »

Hi Abhi
After loading Flowchart in V8, you could go to the Macros menu and Export every call function macro.
Delete every call function macro.
with all call macros deleted, debug Main macro then import(Macro, Import) one macro at a time and make sure its bug free before importing the the next macro.
Its that or as you state, starting from scratch.
Martin

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: Flowcode V6 -> V8

Post by Benj »

Can you PM me the project and I will have a quick look for you.

Does the project contain any custom C code?

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Flowcode V6 -> V8

Post by AbhijitR »

Hello! Ben

Thanks for the concern, I have PM you the flowchart.

Thank you, hear you soon.

Regards
Abhi

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: Flowcode V6 -> V8

Post by Benj »

Hi Abhi,

I have replied now with what I hope is a solution for your problem.

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Flowcode V6 -> V8

Post by AbhijitR »

Hi! Ben
good morning

Thank you (my morning was good too) for that note regarding the EEPROM, I deleted the unused one and all worked well.

Thank you again.

Regards
Abhi

Post Reply