Compiler Config

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

Moderator: Benj

Post Reply
balles
Posts: 31
Joined: Fri Sep 06, 2013 1:37 pm
Has thanked: 16 times
Been thanked: 12 times
Contact:

Compiler Config

Post by balles »

Hello!

Can please someone help me on how to change the compiler config parameters, to try out xc8 pro mode over the trial time?
I want to learn the real diference of 60% smaller and 400% faster code.

I've changed the compiler location to the installed xc8.exe file but it doesn't compile. Got error 901 and 908.
I didn't mess with the compiler parameters, is something to be changed there?

After that failed, i pointed back to the default batch file but it now asks for a .exe file.
Little tricky thing that!

Thanks in advance!
Attachments
001.jpg
001.jpg (54.45 KiB) Viewed 4280 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Compiler Config

Post by LeighM »

Hi,
Do you still have the PIC compiler executables, xc8.exe in particular, in the following directory
C:\Program Files (x86)\Flowcode\Common\Compilers\pic\bin

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: Compiler Config

Post by Benj »

Hello,

This wiki page should help.
https://www.matrixtsl.com/wiki/index.ph ... (PICmicro)

It shows the exe path and parameters for the exe rather than the batch file.

The batch file is mainly for adding network file support so if your not using network files then it should all work fine pointing directly to the .exe as shown on the wiki.

Let us know how you get on with the pro version.

balles
Posts: 31
Joined: Fri Sep 06, 2013 1:37 pm
Has thanked: 16 times
Been thanked: 12 times
Contact:

Re: Compiler Config

Post by balles »

Hello!!

@LeighM: yes, i didn't mess with the original installed files.

@Benj: even pointing to the the original xc8.exe (v1.45 free) file, it didn't worked out.

After some time just managed to get it back working with the original xc8 1.45 free, using the batch file setup info. "$(compilerpic)batch\pic_xc8_comp.bat"

What I did:

- Downloaded the xc8-v2.00-full-install-windows-installer.exe from the Microchip download page.
- Pointed the compiler location in the installed path as the xc8.exe file. C:\Program Files\Microchip\xc8\v2.00\pic\bin
But it gave me the related erros 901 and 908

@Benj: this is similiar as you wiki page
Attachments
001.jpg
001.jpg (52.04 KiB) Viewed 4238 times

balles
Posts: 31
Joined: Fri Sep 06, 2013 1:37 pm
Has thanked: 16 times
Been thanked: 12 times
Contact:

Re: Compiler Config

Post by balles »

Getting it back to working made me I little more curious and I've got deeper...
After I made some backups, tried something more agressive. Got it working and the results are little bit disapointing.

Using Pic 18f4550 this result came out:

- 1.45 free (original version that came with FC) : 58.6% mem usage
- 2.00 free (just without the 60 days of pro mode trial) : 52% mem usage (6.6% for free is something :!: )
- 2.00 pro mode for 60 days : 34% mem usage :shock: this is astonishing

Pro mode is not about optimization, or special functions for high end developer (reminds me @Benj). It's not about mem price too.
It's about deoptimization in the free mode.

Please check this, very instructive, even not quite updated: https://www.t4f.org/articles/optimizati ... -pro-mode/

Pro mode is too expensive for me, so i'll hang with the 6.6% benefit from the free v2.00 :(

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: Compiler Config

Post by Benj »

Speaking with Microchip staff they are amazing at hardware development but software development is not so much in their realm.

The C compilers for PICs were very tricky to do due to the alternative internal architecture but third parties managed to create some good ones that evolved over time to be better and better. BoostC, HiTech and IAR to name a few.

Microchip eventually bought some of the best compilers from the third party developers and brought them in house to maintain and update as new devices were released.

They priced the compilers highly so that the other third parties that had supported them so well in the past did not suddenly loose revenue. The high price is the main reason why we cannot bundle the pro compiler with Flowcode.

We were promised that the free version would go from strength to strength as the demand for the third parties eventually dropped. Unfortunately I am yet to see this in action (specifically for 8-bit the others 16-bit and 32-bit seem much better).

Amazingly so I hear Arduino wanted to use PIC when starting out but because of the lack of free efficient toolchain they opted for AVR instead. I don't think this worries Microchip too much as they now own AVR anyway. Plus the fact that they sell by far the most chips out of any manufacturer even before they bought out Atmel.

So a bit of an explanation for you there. The free version is ok and does function well and as you say flash cost is now very cheap anyway so it mainly boils down to execution time.

As a final note the new monthly rolling version of the pro compiler is actually fairly reasonable if you only need to compile super efficiently every now and then.

Post Reply