Page 1 of 1
Flowcode V6 -> V8
Posted: Tue Aug 27, 2019 2:50 pm
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.
Re: Flowcode V6 -> V8
Posted: Tue Aug 27, 2019 3:08 pm
by Benj
Hello,
Please check the connection properties of the UART / RS232 component are correct.
Hopefully fixing these will solve the compilation error.
Re: Flowcode V6 -> V8
Posted: Mon Sep 30, 2019 9:08 am
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
Re: Flowcode V6 -> V8
Posted: Mon Sep 30, 2019 9:55 am
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.
Re: Flowcode V6 -> V8
Posted: Mon Sep 30, 2019 6:57 pm
by AbhijitR
Hello! Martin
Many thanks for the reply and allowing me to PM.
Thank you again.
Regards
Abhi
Re: Flowcode V6 -> V8
Posted: Mon Sep 30, 2019 8:18 pm
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
You are also calling
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?
Re: Flowcode V6 -> V8
Posted: Tue Oct 01, 2019 9:23 am
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.
Re: Flowcode V6 -> V8
Posted: Sun Oct 06, 2019 7:26 am
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
Re: Flowcode V6 -> V8
Posted: Sun Oct 06, 2019 11:44 am
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.
Re: Flowcode V6 -> V8
Posted: Mon Oct 07, 2019 5:15 pm
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?
Re: Flowcode V6 -> V8
Posted: Mon Oct 07, 2019 5:47 pm
by AbhijitR
Hello! Ben
Thanks for the concern, I have PM you the flowchart.
Thank you, hear you soon.
Regards
Abhi
Re: Flowcode V6 -> V8
Posted: Mon Oct 07, 2019 11:04 pm
by Benj
Hi Abhi,
I have replied now with what I hope is a solution for your problem.
Re: Flowcode V6 -> V8
Posted: Tue Oct 08, 2019 7:50 am
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