C code compiling in mplab

For general Flowcode discussion that does not belong in the other sections.
Post Reply
mehmet64
Posts: 40
http://meble-kuchenne.info.pl
Joined: Mon Apr 05, 2021 1:59 am
Has thanked: 8 times
Been thanked: 4 times

C code compiling in mplab

Post by mehmet64 »

hello
how can i compile the C code generated with flowcode in MPLAB i know is possible but i cant do that?

BenR
Matrix Staff
Posts: 1743
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: C code compiling in mplab

Post by BenR »

Hello,

It should be possible to take the Flowcode C and H files and compile them in MPLAB on a PC that has Flowcode installed. There are various library CAL files that the C and H file will access but as long as on the same PC then it all should work.

What errors are you getting in MPLAB?

mehmet64
Posts: 40
Joined: Mon Apr 05, 2021 1:59 am
Has thanked: 8 times
Been thanked: 4 times

Re: C code compiling in mplab

Post by mehmet64 »

yes i know but mplab dont compile it ........
i attached this
Attachments
MPLAB ERR.txt
(14.72 KiB) Downloaded 45 times

Steve-Matrix
Matrix Staff
Posts: 1262
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 168 times
Been thanked: 279 times

Re: C code compiling in mplab

Post by Steve-Matrix »

Please post your *.fcfx project file, or better still a simple project that also has this issue, and we will investigate.

Steve-Matrix
Matrix Staff
Posts: 1262
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 168 times
Been thanked: 279 times

Re: C code compiling in mplab

Post by Steve-Matrix »

Thinking further on this, you could try replicating the XC8 switches used by Flowcode as much as possible when compiling via MPLAB. For example, Flowcode uses "-std=c90" whereas your MPLAB compilation attempt uses "-std=c99" and that could be the setting that is causing the problem.

mehmet64
Posts: 40
Joined: Mon Apr 05, 2021 1:59 am
Has thanked: 8 times
Been thanked: 4 times

Re: C code compiling in mplab

Post by mehmet64 »

hello Steve
i change it to C90 and it working well thank you
and about STM32 C code how can copile this C code and i shuold use how IDE for it

Steve-Matrix
Matrix Staff
Posts: 1262
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 168 times
Been thanked: 279 times

Re: C code compiling in mplab

Post by Steve-Matrix »

For STM32 projects, the compilation process is more complex. Flowcode uses the GCC compiler toolchain and uses a batch file (stm32comp.bat) to perform the numerous compilation steps. You may be able to replicate this through a different IDE, but that is something we can't help with.

Post Reply