Make compiler settings sticky for flowchart

Please add any feature requests for Flowcode version 6 here

Moderator: Benj

Forum rules
Only feature requests will be considered here. General questions should not be posted in this forum.
Post Reply
kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Make compiler settings sticky for flowchart

Post by kersing »

While working on a boot loader for dsPIC devices with auxiliary flash I've created updated compiler settings using the auxiliary flash. Now I need to switch between the compiler settings when switching flow charts as the compiler settings are global and not associated with the flow chart.

It would be convenient to be able to use the 'default' settings for new projects and all projects not specifying a specific compiler and have the ability to use the other available settings for individual flow charts. (Not store the settings of the compiler/linker/etc with the flow chart, but store the name of the selected profile so updates to the profile benefit all flow charts referring to it)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

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: Make compiler settings sticky for flowchart

Post by Benj »

Hi Kersing,

You can potentially do this by creating your own custom FCDX. Take the FCDX for the chip you want to use, make a copy and then using a text editor alter the following.

In Device-> Name edit the name so that it matches the name of the new FCDX file.

Also create a new field named namealt which holds the name of the chip.

Code: Select all

<device name='16F1947' product='PIC' family='16F' bits='8' >
changes to this

Code: Select all

<device name='16F1947Custom' namealt='16F1947' product='PIC' family='16F' bits='8' >
If you want to override the compiler settings then you can add this section between the </test> and the </root> lines. Here is an example from the ECIO FCDX.

Code: Select all

<build>
    <compiler exe="$(appdir)compilers\pic\boostc\boostc_18f.exe" 
	params="-v -t $(chipalt) "$(target).c"" 
	/>

    <linker exe="$(appdir)compilers\pic\boostc\boostlink_picmicro.exe" 
	params="-rb 0x800 -ld "$(appdir)compilers\pic\boostc\Lib" libc_18F.lib rand_18F.lib float_18F.lib "$(target).obj" -t $(chipalt) -d "$(dir)" -p "$(target)"" 
	/>

    <programmer exe="$(appdir)tools\mLoader\mLoader.exe" 
	params="-ecio40 "$(target).hex""
	/>
</build>
The config settings can be altered or overridden by altering this line near the end of the FCDX.

Code: Select all

    <config >
        <body code='#ifdef _BOOSTC\n#pragma DATA $(address), 0x$(value:x)\n#endif\n#ifdef HI_TECH_C\n__CONFIG(0x$(value:x));\n#endif\n' />
    </config>
change "body" to "start" so that it doesn't repeat multiple times.

You can use Flowcode to generate the config settings you need and then copy the C code from Flowcode into the FCDX file. Replacing new lines with \n etc.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Make compiler settings sticky for flowchart

Post by kersing »

Hi Ben,

Thank you for that solution, I'll certainly look into it.

Given the check box 'Default compiler for the platform...' I would still expect to be able to specify the profile to be used for the current flow chart and not have to set it for all flow charts for that particular architecture. (May-be I should file this as a bug?? ;-))

Best regards,

Jac
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

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: Make compiler settings sticky for flowchart

Post by Benj »

Hi Jac,

A simpler graphical way of doing this on a project basis would be very nice. Also graphically locking the config and being able to use it time and time again would be very handy.

Sounds like a v7 feature to me but I will get it on the list so we can mull it over.

Post Reply