Flowcode V6 -> V8
Moderator: Benj
Flowcode V6 -> V8
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.
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.
- 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
Hello,
Please check the connection properties of the UART / RS232 component are correct.
Hopefully fixing these will solve the compilation error.
Please check the connection properties of the UART / RS232 component are correct.
Hopefully fixing these will solve the compilation error.
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
- 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
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
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
-
- 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
Hi Abhi,
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.
Yes, you are correct.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?
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
- 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
Hello! Martin
Many thanks for the reply and allowing me to PM.
Thank you again.
Regards
Abhi
Many thanks for the reply and allowing me to PM.
Thank you again.
Regards
Abhi
-
- 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
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?
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
Code: Select all
AM_LED_OFF
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
-
- 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
Hi Abhi,
Via PM:
You also can't have the same functions within interrupts as outside interrupts.
E.g MOD, delays, components with delays etc.
The flag is cleared at the end of the function.
Good luck, and I'm happy to look at your flowchart after all the corrections have been made.
Via PM:
Correct.AbhijitR wrote:Kindly correct me if I have not understood you well,
- never call a MACRO from interrupt
You also can't have the same functions within interrupts as outside interrupts.
E.g MOD, delays, components with delays etc.
Correct, although I only set the flag within interrupt.AbhijitR wrote:- set/reset a flag within the interrupt for "that function" and take the effects globally
The flag is cleared at the end of the function.
I don't mind at all.AbhijitR wrote: if by any chance I couldn't achieve I may bother you again, I hope you wont mind,
Good luck, and I'm happy to look at your flowchart after all the corrections have been made.
Martin
- 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
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
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
-
- 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
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.
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
- 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
Can you PM me the project and I will have a quick look for you.
Does the project contain any custom C code?
Does the project contain any custom C code?
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
- 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
Hello! Ben
Thanks for the concern, I have PM you the flowchart.
Thank you, hear you soon.
Regards
Abhi
Thanks for the concern, I have PM you the flowchart.
Thank you, hear you soon.
Regards
Abhi
- 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
Hi Abhi,
I have replied now with what I hope is a solution for your problem.
I have replied now with what I hope is a solution for your problem.
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
- 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
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
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