Additions to Flowcode

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

Moderator: Benj

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Additions to Flowcode

Post by QMESAR »

Hi Team,

I am working on a Motor Control projects and as a standard the chip manufactures STM ,TI and Microchip has all the needed FOC files and Transforms available no need to reinvent the wheel :D
In my case using a dsPIC33EP device the FOC files and Park/Clark transforms are in "S" and "inc" this just made me think is there away to include these manufacturer files in FC project :D these S and inc file is actually intended to speed up the calculation time of the FOC algorithm as it uses the MAC instructions and assembly with Q15 format. the actual user code is in plain C but the functions are then executed with in the S and inc file

Just curious to know as I am trying for some time now to use only FC but projects like this makes it hard to switch to only one tool , to maintain a few tool chains are costly specially where I am living and working :oops:
P1.jpg
P1.jpg (33.77 KiB) Viewed 2397 times
P2.jpg
P2.jpg (49.5 KiB) Viewed 2397 times

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: Additions to Flowcode

Post by Benj »

Hello Peter,

The include files you mentioned should work fine with Flowcode as they are using the same compiler underneath.

The only thing you will need to do differently is to add the files via the compiler batch file.

The file you will likely need to edit is most likely installed here: "C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch"

I don't have the default toolchain installer so the path might be slightly different to this.

Open the file with a text editor and edit this line to include your .S and other included files.

Code: Select all

%~dp0..\bin\xc8.exe --chip=%~1  "%~3.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32
Just add the following to the end of the line and hopefully that should do it.

Code: Select all

-I"PathToFile.S"
Each include file likely has to be -I included separately.

Code: Select all

-I"PathToFile1.S" -I"PathToFile2.S" -I"PathToFile3.S"
Might be worth making an alternate batch file and then it is easier to switch between batch files using the Flowcode compiler options window.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: Additions to Flowcode

Post by QMESAR »

Hi Ben.

Thanks a million for your advise :D
I will try this at some stage when the pressure is bit lower as this will make it for me really the case of 1 tool change to update regularly and not 3
I hope this will work as you can imagine to do all these support files for FOC is no joke in another tool change . :D

Great stuff i will be back some time

Post Reply