Page 1 of 1
C code compiling in mplab
Posted: Tue Apr 11, 2023 5:09 pm
by mehmet64
hello
how can i compile the C code generated with flowcode in MPLAB i know is possible but i cant do that?
Re: C code compiling in mplab
Posted: Wed Apr 12, 2023 11:34 am
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?
Re: C code compiling in mplab
Posted: Wed Apr 12, 2023 1:06 pm
by mehmet64
yes i know but mplab dont compile it ........
i attached this
Re: C code compiling in mplab
Posted: Mon Apr 17, 2023 10:52 am
by Steve-Matrix
Please post your *.fcfx project file, or better still a simple project that also has this issue, and we will investigate.
Re: C code compiling in mplab
Posted: Mon Apr 17, 2023 10:59 am
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.
Re: C code compiling in mplab
Posted: Mon Apr 17, 2023 1:46 pm
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
Re: C code compiling in mplab
Posted: Mon Apr 17, 2023 2:53 pm
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.