Page 1 of 1

FC7 Professional - Compiler XC8

Posted: Wed Jul 13, 2016 4:51 pm
by johnsondav
Hi Everyone
Just upgraded to Ver 7.0.0.4. I have purchased the Professional version. However, I am unsure if we are still in Beta or final release as am getting the message from the compiler that it is the 'Free version'. Therefore not sure if it is worth starting to use this or stick with FC5 until everything is working correctly.

So far, some of the text is unreadable such as Floattostring$ - this is purple on black and my eyes just cannot distinguish the text from the background. Still playing around with it though.

Tried loading a PID controller project developed with FC5 which worked fine. Errors are reported in FC7. Some symbol characters not recognised (the degree symbol for temperature) for the generic 18x4 LCD. Also, recursive macro calls not allowed. I'm reading up on this as I am sure the Microchip compiler is much stricter than the Sourceboost compiler.

Still, looking good so far.

Re: FC7 Professional - Compiler XC8

Posted: Wed Jul 13, 2016 5:04 pm
by Steve
Thanks for the comments.

Regarding the message about the "free version", this is being generated by the XC8 compiler we are using. Unfortunately, the paid-for versions of this compiler are quite expensive and we were unable to bundle these with Flowcode because the price would have increased dramatically. However, we believe the improvements in the compiler from V5/V6 to V7 are worth the upgrade, even if the compiler is not fully optimised.

We have a dark and a light theme (accessible from the "view" menu) and perhaps the light theme will make things easier to read. And for programs that are failing to work when upgrading, please post some examples (of the original file) with a brief description and we'll try to discover the problem.

Re: FC7 Professional - Compiler XC8

Posted: Wed Jul 13, 2016 5:40 pm
by johnsondav
Hi Steve

Thank you for your quick reply. I am now very interested to see how this PID program performs when I get it working using the Microchip XC compiler. If its bloated too much it simply will not work as required.

Apologise in advance if these up-loads seem confusing. The PID program is time critical as it has so much to do and keep in control of a TRIAC which is switching a 1500W heater. The program is set as a simple menu followed by the main routine. When the main routine is started, it has 5 tasks broken down into 10ms steps, each performed in sync with the mains cycle. Each step must be started and completed within each 10ms step to ensure the TRIAC is fully monitored.

FC7 does not like the main routine calling the 'Menu' macro which makes other Macro calls from it (see below). Not very good programing practice I know but this program has been in development for some time. getting one bit working then adding another as we went along.

Controller Ver PID Ver 3 16x4 LCD_v7.c: FCD_0bbd1_v5__one_wire0__Get_Next_ID()
2027: break;
^ (345) unreachable code (warning)
Controller Ver PID Ver 3 16x4 LCD_v7.c: 3287: (1089) recursive function call to "_FCM_Menu4"
Controller Ver PID Ver 3 16x4 LCD_v7.c: 4446: (1089) recursive function call to "_FCM_Menu1"
Controller Ver PID Ver 3 16x4 LCD_v7.c: 3674: (1089) recursive function call to "_FCM_Menu3"
Controller Ver PID Ver 3 16x4 LCD_v7.c: 4310: (1089) recursive function call to "_FCM_Menu2"
Microchip MPLAB XC8 C Compiler (Free Mode) V1.36
Build date: Jan 14 2016
Part Support Version: 1.36
Copyright (C) 2016 Microchip Technology Inc.
License type: Node Configuration



If you suggest I start from scratch with a clear 'Do NOT use Macro's for this' - I will understand.

Re: FC7 Professional - Compiler XC8

Posted: Wed Jul 13, 2016 6:37 pm
by QMESAR
Steve wrote: Unfortunately, the paid-for versions of this compiler are quite expensive and we were unable to bundle these with Flowcode because the price would have increased dramatically.
Steve

Would it be possible for people like myself which has valid licenses for the professional XC compilers to let FC7 use this compilers instead of the Free versions which you bundled with FC ,
I would rather then use my professional XC8, XC16 and XC32 than the free version however in my experience the Free versions are very good :D

No reason not to use the Free versions

Re: FC7 Professional - Compiler XC8

Posted: Wed Jul 13, 2016 7:33 pm
by johnsondav
Hi Steve

OK, got the Macro calls all sorted and everything appears to be working, just need to recall the Prototype to test the altered code produced by FC7.

FC5 HEX file was 52KB
FC7 HEX file 46KB - smaller

Does this mean that the Sourceboost compiler is no better or worse than Microchip XC compiler. I recon only testing with reveal this. It'll take a couple of days to test everything out. Anyway, I have discovered you cannot CALL a Macro that performs data handling that then calls another macro to jump back to the main routine. things get lost somehow. At least I think that is what was happening.

Looking Good Though

Re: FC7 Professional - Compiler XC8

Posted: Wed Jul 13, 2016 8:49 pm
by Steve
QMESAR wrote:Would it be possible for people like myself which has valid licenses for the professional XC compilers to let FC7 use this compilers instead of the Free versions which you bundled with FC.
That should not be a problem. You should be able to point Flowcode to your install of the professional XC compilers in the "Compiler options" window.

Re: FC7 Professional - Compiler XC8

Posted: Wed Jul 13, 2016 11:55 pm
by Rudi
specific question: XC compiler

Does the XC Compiler in a "Standard" Chip Pack Version have a Limit in RAM or optimization ?
does the XC Compiler in a "Professional" Chip Pack Version have a Limit in RAM or optimization ?

or is the same Version in Standard and Professional and have no Limit in Ram or optimization ?

Can we use the XC Compiler outside ( MPLAP ) too or is there a Limit like the BoostC
that we have to buy an extra Version if we want to use outside FC?

if we have already installed a XC version, does this install block the install of XC Compiler Version of FC
or can we use parallel?

thank you.

i read here, that matrixTSL has the standard compiler in the pay versions , ( free version from microchip ) so we have only ( free* ) optimization levels? in the FC7 standard and in the FC7 professional?
optimization-levels.jpg
thanks
best wishes
rudi ;-)

Re: FC7 Professional - Compiler XC8

Posted: Thu Jul 14, 2016 12:07 am
by Steve
The same XC compiler is used in the "standard" and "professional" licences of Flowcode v7. There is no limit to the RAM, but the optimisations in the paid-for versions of the XC8 compiler are not present.

The compiler can be launched outside of Flowcode or MPLAB, and I am not aware of any interference between the compiler used by Flowcode and any other installations of the XC compiler.

Re: FC7 Professional - Compiler XC8

Posted: Sun Jul 24, 2016 12:41 pm
by johnsondav
Hi Steve
I have completed testing FC7 using the PID controller routine. It would not work at first even after making changes to the CALL macro's. The problem was identified as follows:
- configuration bit - Extended Instruction Set . This feature is disabled by the free version of Microchip XC8 compiler

What problem this causes is as follows.
1. No changes are made to the compiled program by the compiler to make use of the 8 new Extended Instruction Set instructions2. The MCU Hex file configuration - Extended Instruction Set bit is set

The PIC18F4550 expects to see the memory organised to use the extended features which are not there - so stops. Nothing is displayed on the display.
Disabling the Extended instruction Bit corrects the fault and the PID controller program works excellently as before.

Now, is it faster or slower using the Microchip XC8 compiler?

To test this, I wanted accurate data to compare both compilers - BOOSTC vs XC8 Here is what I have found using a simple test routine using FC5 and FC7 plus a NE55 timer.

The test routine outputs characters onto the display. When the printing to the display is complete, I wanted to time to see how long in took. To do this I set up a NE555 timer to output a 1ms pulse connected to the B0 interrupt pin. So, during the program execution, the great the number of interrupts equal a slower program execution. Higher number means slower program.

BOOSTC
Time taken to complete test with Extended Instruction Set enabled
664ms
Time taken to complete with Extended Instruction Set disabled
667ms

Microchip XC8 free
Time taken to complete wit the Extended instruction Set - Disabled
472ms

Therefore I can confirm that the Microchip XC8 compiler is 29% faster than the BOOSTC compiler.

Flowcode 5 Test MCU Speed
FC5 Speed Test 2016.fcf
(21.79 KiB) Downloaded 438 times
Flowcode 7 Test MCU Speed
Speed Test 2016_v7.fcfx
(16.93 KiB) Downloaded 398 times

Re: FC7 Professional - Compiler XC8

Posted: Sun Jul 24, 2016 4:11 pm
by johnsondav
Hi Steve

Just tried to install Microchip XC8 compiler Ver 1.38

Once downloaded it is possible to point FC7 to the directory where it has been installed. You are then given the option to save as an additional Compiler above the default version shipped by default.

I have tried this Ver 1.38 compiler and it works okay.

Here are the install settings that I have used:
Compiler Settings.pdf
(213.34 KiB) Downloaded 522 times
Hope other may find this helpful.

Re: FC7 Professional - Compiler XC8

Posted: Sun Jul 24, 2016 6:46 pm
by kersing
johnsondav wrote:The problem was identified as follows: - configuration bit - Extended Instruction Set . This feature is disabled by the free version of Microchip XC8 compiler
According to the Microchip WIKI XC8 does not support extended instruction set, so the Pro version should not have it either. (And for BoostC is has always been a double edged sword as often the generated code did not run correctly)

Re: FC7 Professional - Compiler XC8

Posted: Sun Jul 24, 2016 7:34 pm
by johnsondav
Hi Kersing
5.3.2 Instruction Set Support
The compiler support all instruction sets for PIC10/12/16 devices as well as the standard
(legacy) PIC18 instruction set. The extended instruction mode available on some
PIC18 devices is not currently supported. Ensure you set the Configuration bits to use
the PIC18 legacy instruction mode when appropriate.
Yes, I should have checked the User guide for the XC8 compiler first. Apologies. You are correct it is currently not supported.

Re: FC7 Professional - Compiler XC8

Posted: Sun Jul 24, 2016 7:58 pm
by kersing
No problem. As stated, for FC6 and below it never was a good idea to enable the instructions anyway.

Re: FC7 Professional - Compiler XC8

Posted: Thu Jul 28, 2016 3:06 pm
by johnsondav
Hi Everyone

I have sorted how to get your 60 day PRO evaluation of the Microchip XC8 License.

First - download and install the XC8 installer and set it up with FC7 as shown above. Once installed you need to make sure you make a note of your Host ID. If you have already install your compiler, you can find your Host Id as follows:

Run the CMD prompt and type: ipconfig /all

Your host ID is your computers MAC address as shown here:
ipconfig.jpg
ipconfig.jpg (61.99 KiB) Viewed 20519 times
Its the last 6 pairs of number without the colon punctuation.

Then go to this Microchip page: http://www.microchip.com/xcdemo/GetDemoLicense.aspx
xc8 PRO Eva License application.jpg
xc8 PRO Eva License application.jpg (152.16 KiB) Viewed 20519 times

To download your Windows batch file to activate the xc8-Demo as shown above. Why now develop your project and then take advantage of the fantastic offer.

Re: FC7 Professional - Compiler XC8

Posted: Mon Aug 15, 2016 9:01 pm
by johnsondav
Hi Everyone

I have been doing a follow up on the above speed test. This time to determine if there is any discernible difference between the two compilers (FC5 - BostC; FC7 Microchip XC8) with regards to math routines.
Well, if my simple test is anything to go by, there is. Here are copies of the tests for FC5 and FC7.

FC5
FC5 Speed Test 2016 Ver2.fcf
(35.16 KiB) Downloaded 266 times
FC7
Speed Test 2016 Ver2_v7.fcfx
(32.45 KiB) Downloaded 260 times
The results of the test, as before, using a NE555 timer connected to pin B0 interrupt (1ms pulse). The routine is split into two parts.

The first part of the test outputs characters onto a display and timed.

The second part of the test performs 7 different mixed math routines ranging for Byte to ULong INT and floating point math. The calculations are repeated 500 times.

The times taken for each routine is displayed at the end of the test for comparison.

Here is what I have found.

FC5
Part 1 - 707ms
Part2 - 95ms

FC7
Part1 - 755ms
Part2 - 6ms

I did not believe the results so I have checked the routine was being performed by using a scope to monitor port D outputs. Everything was working correctly.

Therefore, in terms of speed overall

FC5 (combined times) 802ms
FC7 (combined times) 761ms ......... 6% faster

However, the surprise is the maths routine

FC5 95ms
FC7 6ms ............. 94% faster WOW

There is no doubt that FC7 Microchip XC8 compiler is faster that BoostC and many times faster when performing math routines. How this is achieved, any ideas?
Am I missing something?
The Flowchart produced by FC5 is copied into FC7, so it is identical and checked to make sure.

Re: FC7 Professional - Compiler XC8

Posted: Mon Aug 15, 2016 9:15 pm
by Benj
Hello,

Many thanks for the feedback, it's much appreciated. Didn't realise you would get quite that much of a boost in the maths!

In BoostC the floating point maths library was added after the compiler was created. The library to support floating point was written by a third party and not the main compiler team.

In XC8 floating point support is native and so I guess the compiler knows how best to optimise the code combined with no extra add-on function calls, parameter storing / fetching, stack hits etc.

V6 vs V7 may be a fairer test for the part1 test as v5 had a slightly more efficient I/O layer at the cost of having fixed components written using C code.

Re: FC7 Professional - Compiler XC8

Posted: Mon Aug 15, 2016 9:25 pm
by QMESAR
Hi

Thank you for sharing this info it is very interesting I always liked the XC8 better that any other compiler I worked with
and looking at the way Microchip is improving the compilers and even the 16F chips is amazing these little 16F1 chips with core independent peripherals take a huge load easily :D
the future looks bright for FC and all the new PIC chips :D

Re: FC7 Professional - Compiler XC8

Posted: Wed Jun 28, 2017 5:05 pm
by mcontreras
I have a doubt I recently purchase a Professional versión of FC7


Before the purchase I used it the 30 days free, i was excited creating smalls projects, once i bougth it i been working on pic programs, but recently when i tried to compile
to .hex the software sent to me this meesagge

Target folder: C:\Users\Manolo\DOWNLO~1
Source name: C:\Users\Manolo\Downloads\Flowcode LCD Voltage Display 16x2.fcfx
Title:
Description:
Device: PIC.16F.16F877A
Generated by: Flowcode v7.2.1.4
Date: Wednesday, June 28, 2017 10:05:20
Users: 1
Registered to: mcontreras
Licence key: xxxx
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe --chip=16F877A "Flowcode LCD Voltage Display 16x2.c" --MSGDISABLE=359,1273,1388
Microchip MPLAB XC8 C Compiler (Free Mode) V1.41
Build date: Jan 24 2017
Part Support Version: 1.41
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration


Memory Summary:
Program space used F03h ( 3843) of 2000h words ( 46.9%)
Data space used ACh ( 172) of 170h bytes ( 46.7%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Data stack space used 0h ( 0) of 60h bytes ( 0.0%)
Configuration bits used 1h ( 1) of 1h word (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)


You have compiled in FREE mode.
Using Omniscient Code Generation that is available in PRO mode,
you could have produced up to 60% smaller and 400% faster code.
See http://www.microchip.com/MPLABXCcompilers for more information.

.

Launching the linker/assembler...
C:\Program Files (x86)\Flowcode 7\tools\DoNothing\DoNothing.exe


FINISHED

thath for me as new user means the software is not able to créate the .hex, i sent a request by email and the guy just mention this fórum but is not solving the primary problem,

I bougth something that is not working ,

could you guy´s help to understand if i pay for something that is not working?

, here the solution from Matrix:

Hello Manuel,

We discuss this issue in this forum topic here:

viewtopic.php?f=63&t=17843&p=75466

Summary:

"Regarding the message about the "free version", this is being generated by the XC8 compiler we are using. Unfortunately, the paid-for versions of this compiler are quite expensive and we were unable to bundle these with Flowcode because the price would have increased dramatically. However, we believe the improvements in the compiler from V5/V6 to V7 are worth the upgrade, even if the compiler is not fully optimised."

Regards,

David





    David Aldersley | Software Engineer/Head of IT Systems

Re: FC7 Professional - Compiler XC8

Posted: Thu Jun 29, 2017 8:20 pm
by medelec35
Hi Manuel,
mcontreras wrote:Memory Summary:
Program space used F03h ( 3843) of 2000h words ( 46.9%)
Data space used ACh ( 172) of 170h bytes ( 46.7%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Data stack space used 0h ( 0) of 60h bytes ( 0.0%)
Configuration bits used 1h ( 1) of 1h word (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)


You have compiled in FREE mode.
Using Omniscient Code Generation that is available in PRO mode,
you could have produced up to 60% smaller and 400% faster code.
See http://www.microchip.com/MPLABXCcompilers for more information.
That all states that hex file was indeed successfully generated.
So you need to look in the same folder of the flowchart for the hex file.

All that message is stating if you had professional compiler, then code will be smaller and faster.
In practice the claims of how much smaller and faster are never achieved.

Martin