compile FLocode generated C File with MPLAB X IDE

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

Moderator: Benj

Post Reply
CSM2711
Posts: 47
Joined: Mon Apr 16, 2018 10:28 am
Location: Germany
Has thanked: 1 time
Been thanked: 9 times
Contact:

compile FLocode generated C File with MPLAB X IDE

Post by CSM2711 »

Hello,

I would to compile / debug a flowcode generated C file with the MPLAB X IDE.
But after Importing the C file i get many Errors

Code: Select all

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/XXX/Documents/Flow8.X'
make  -f nbproject/Makefile-default.mk dist/default/production/Flow8.X.production.hex
make[2]: Entering directory 'C:/Users/XXX/Documents/Flow8.X'
"C:\Program Files (x86)\Microchip\xc8\v2.00\bin\xc8-cc.exe"  -mcpu=16F18313 -c  -fno-short-double -fno-short-float -O0 -maddrqual=ignore -xassembler-with-cpp -Wa,-a -DXPRJ_default=default  -msummary=-psect,-class,+mem,-hex,-file  -ginhx032 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall   -std=c99 -gdwarf-3 -mstack=compiled:auto:auto     -o build/default/production/_ext/592432415/53103070v002_work_2.p1 "D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c" 
In file included from D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:39:
In file included from C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:185:
In file included from C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC\PIC_CAL_IO.c:45:
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:133:2: error: '#' is not followed by a macro parameter
#if defined(_LAT##Port##Pin) || defined(_LAT##Port##_LAT##Port##Pin##_POSITION) \
 ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:345:3: error: pasting formed '(A', an invalid preprocessing token
                SET_PORT_PIN(A, 2, 1);
                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:59:32: note: expanded from macro 'SET_PORT_PIN'
#define SET_PORT_PIN(p,b,v)                     FCP_SET(B,p,(1<<b),b,v)
                                                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:67:65: note: expanded from macro 'FCP_SET'
#define FCP_SET(Type, Port, Mask, Shift, Source) FCP_SET_##Type(##Port, Mask, Shift, Source)
                                                                ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:362:3: error: pasting formed '(A', an invalid preprocessing token
                SET_PORT_PIN(A, 2, 1 - 1);
                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:59:32: note: expanded from macro 'SET_PORT_PIN'
#define SET_PORT_PIN(p,b,v)                     FCP_SET(B,p,(1<<b),b,v)
                                                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:67:65: note: expanded from macro 'FCP_SET'
#define FCP_SET(Type, Port, Mask, Shift, Source) FCP_SET_##Type(##Port, Mask, Shift, Source)
                                                                ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:389:3: error: pasting formed '(A', an invalid preprocessing token
                SET_PORT_PIN(A, 5, 1);
                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:59:32: note: expanded from macro 'SET_PORT_PIN'
#define SET_PORT_PIN(p,b,v)                     FCP_SET(B,p,(1<<b),b,v)
                                                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:67:65: note: expanded from macro 'FCP_SET'
#define FCP_SET(Type, Port, Mask, Shift, Source) FCP_SET_##Type(##Port, Mask, Shift, Source)
                                                                ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:406:3: error: pasting formed '(A', an invalid preprocessing token
                SET_PORT_PIN(A, 5, 1 - 1);
                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:59:32: note: expanded from macro 'SET_PORT_PIN'
#define SET_PORT_PIN(p,b,v)                     FCP_SET(B,p,(1<<b),b,v)
                                                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:67:65: note: expanded from macro 'FCP_SET'
#define FCP_SET(Type, Port, Mask, Shift, Source) FCP_SET_##Type(##Port, Mask, Shift, Source)
                                                                ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:442:12: error: pasting formed '(A', an invalid preprocessing token
                if (0 != GET_PORT_PIN(A, 3))
                         ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:53:31: note: expanded from macro 'GET_PORT_PIN'
#define GET_PORT_PIN(p,b)                               FCP_GET(B,p,(1<<b),b)
                                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:66:57: note: expanded from macro 'FCP_GET'
#define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(##Port, Mask, Shift)
                                                        ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:463:14: error: pasting formed '(A', an invalid preprocessing token
                                if (0 != GET_PORT_PIN(A, 3))
                                         ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:53:31: note: expanded from macro 'GET_PORT_PIN'
#define GET_PORT_PIN(p,b)                               FCP_GET(B,p,(1<<b),b)
                                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:66:57: note: expanded from macro 'FCP_GET'
#define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(##Port, Mask, Shift)
                                                        ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:522:20: error: pasting formed '(A', an invalid preprocessing token
                        FCL_SWITCHVAL = GET_PORT_PIN(A, 3);
                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:53:31: note: expanded from macro 'GET_PORT_PIN'
#define GET_PORT_PIN(p,b)                               FCP_GET(B,p,(1<<b),b)
                                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:66:57: note: expanded from macro 'FCP_GET'
#define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(##Port, Mask, Shift)
                                                        ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:541:22: error: pasting formed '(A', an invalid preprocessing token
                                        FCL_SWITCHVAL = GET_PORT_PIN(A, 3);
                                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:53:31: note: expanded from macro 'GET_PORT_PIN'
#define GET_PORT_PIN(p,b)                               FCP_GET(B,p,(1<<b),b)
                                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:66:57: note: expanded from macro 'FCP_GET'
#define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(##Port, Mask, Shift)
                                                        ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:600:20: error: pasting formed '(A', an invalid preprocessing token
                        FCL_SWITCHVAL = GET_PORT_PIN(A, 3);
                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:53:31: note: expanded from macro 'GET_PORT_PIN'
#define GET_PORT_PIN(p,b)                               FCP_GET(B,p,(1<<b),b)
                                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:66:57: note: expanded from macro 'FCP_GET'
#define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(##Port, Mask, Shift)
                                                        ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:619:22: error: pasting formed '(A', an invalid preprocessing token
                                        FCL_SWITCHVAL = GET_PORT_PIN(A, 3);
                                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:53:31: note: expanded from macro 'GET_PORT_PIN'
#define GET_PORT_PIN(p,b)                               FCP_GET(B,p,(1<<b),b)
                                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:66:57: note: expanded from macro 'FCP_GET'
#define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(##Port, Mask, Shift)
                                                        ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:1692:3: error: pasting formed '(A', an invalid preprocessing token
                SET_PORT_PIN(A,5,(FCV_TOGGLE));
                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:59:32: note: expanded from macro 'SET_PORT_PIN'
#define SET_PORT_PIN(p,b,v)                     FCP_SET(B,p,(1<<b),b,v)
                                                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:67:65: note: expanded from macro 'FCP_SET'
#define FCP_SET(Type, Port, Mask, Shift, Source) FCP_SET_##Type(##Port, Mask, Shift, Source)
                                                                ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:1825:12: error: pasting formed '(A', an invalid preprocessing token
make[2]: *** [build/default/production/_ext/592432415/53103070v002_work_2.p1] Error 1
        FCV_S_O = GET_PORT_PIN(A,3);
make[1]: *** [.build-conf] Error 2
                  ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:53:31: note: expanded from macro 'GET_PORT_PIN'
make: *** [.build-impl] Error 2
#define GET_PORT_PIN(p,b)                               FCP_GET(B,p,(1<<b),b)
                                                        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:66:57: note: expanded from macro 'FCP_GET'
#define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(##Port, Mask, Shift)
                                                        ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:2144:2: error: pasting formed '(A', an invalid preprocessing token
        SET_PORT_PIN(A,5,(FCV_S2));
        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:59:32: note: expanded from macro 'SET_PORT_PIN'
#define SET_PORT_PIN(p,b,v)                     FCP_SET(B,p,(1<<b),b,v)
                                                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:67:65: note: expanded from macro 'FCP_SET'
#define FCP_SET(Type, Port, Mask, Shift, Source) FCP_SET_##Type(##Port, Mask, Shift, Source)
                                                                ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:2147:2: error: pasting formed '(A', an invalid preprocessing token
        SET_PORT_PIN(A,2,(FCV_S2));
        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:59:32: note: expanded from macro 'SET_PORT_PIN'
#define SET_PORT_PIN(p,b,v)                     FCP_SET(B,p,(1<<b),b,v)
                                                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:67:65: note: expanded from macro 'FCP_SET'
#define FCP_SET(Type, Port, Mask, Shift, Source) FCP_SET_##Type(##Port, Mask, Shift, Source)
                                                                ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:2164:2: error: pasting formed '(A', an invalid preprocessing token
        SET_PORT_PIN(A,5,(FCV_S1));
        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:59:32: note: expanded from macro 'SET_PORT_PIN'
#define SET_PORT_PIN(p,b,v)                     FCP_SET(B,p,(1<<b),b,v)
                                                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:67:65: note: expanded from macro 'FCP_SET'
#define FCP_SET(Type, Port, Mask, Shift, Source) FCP_SET_##Type(##Port, Mask, Shift, Source)
                                                                ^
D:/temp/flow save/53103070v002 v6/53103070v002_work_2.c:2167:2: error: pasting formed '(A', an invalid preprocessing token
        SET_PORT_PIN(A,2,(FCV_S1));
        ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:59:32: note: expanded from macro 'SET_PORT_PIN'
#define SET_PORT_PIN(p,b,v)                     FCP_SET(B,p,(1<<b),b,v)
                                                ^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL/PIC/PIC_CAL_IO.h:67:65: note: expanded from macro 'FCP_SET'
#define FCP_SET(Type, Port, Mask, Shift, Source) FCP_SET_##Type(##Port, Mask, Shift, Source)
                                                                ^
17 errors generated.
(908) exit status = 1
nbproject/Makefile-default.mk:105: recipe for target 'build/default/production/_ext/592432415/53103070v002_work_2.p1' failed
make[2]: Leaving directory 'C:/Users/XXX/Documents/Flow8.X'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/XXXl/Documents/Flow8.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

BUILD FAILED (exit value 2, total time: 650ms)
So now my question, did any one use Flowcode generated Files in MPLAB IDE ?
Or is there any other way to debug via ICD4 or PICKIT3 using Flowcode ?

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: compile FLocode generated C File with MPLAB X IDE

Post by Benj »

Hello,

Please can you post your Flowcode program so we can see the code and maybe help you get up and running. The C code generated by Flowcode works with the XC compiler range and so should work in MPLAB and MPLABX without any issues.

A zip file of the MPLAB project files as is may also be helpful.

CSM2711
Posts: 47
Joined: Mon Apr 16, 2018 10:28 am
Location: Germany
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: compile FLocode generated C File with MPLAB X IDE

Post by CSM2711 »

I got it.
Just choose the compiler Path from Flowcode (Program Files (x86)\Flowcode\Common\Compilers\pic\bin) and every thing works well.

Post Reply