c code to mplabx

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
scollins22
Posts: 30
Joined: Sat Mar 05, 2016 11:15 am
Been thanked: 3 times

c code to mplabx

Post by scollins22 »

Hello I have a file that I have copied and pasted the c code into mplab x. When I compile there are so many problems that I am a bit confused to which way to correct and why. I am very new to c. Can any one help please.
Attachments
LCD example.fcfx
(5.94 KiB) Downloaded 300 times

EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times

Re: c code to mplabx

Post by EtsDriver »

Why would you want to copy Flowcode program to mplab? Why not program from flowcode, or use the generated .hex file?
Generally flowcode uses its own libraries, and that might cause problems.
Ill just keep the good work up!

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: c code to mplabx

Post by Benj »

Hello,
When I compile there are so many problems that I am a bit confused to which way to correct and why.
What problems are you getting?

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: c code to mplabx

Post by QMESAR »

scollins22 wrote:Hello I have a file that I have copied and pasted the c code into mplab x. When I compile there are so many problems that I am a bit confused to which way to correct and why. I am very new to c. Can any one help please.
I am also interested to know why would you want to compile FC generated C code in MPLABx as FC use the exact same compiler as MPLABx :shock:

scollins22
Posts: 30
Joined: Sat Mar 05, 2016 11:15 am
Been thanked: 3 times

Re: c code to mplabx

Post by scollins22 »

Hello

I am a technician at college.I have been asked by a lecturer at my college to do this. It is because the college has been asked to do c as a mandatory subject with microcontrollers and the teachers are not sure about c code. They work well with flow code but they are trying to get the students to analyse the c code after making a flowchart and spotting the difference in the code that compiles in mplabx but is created in flowcode. I think it is their way of generating the c code that runs in a circuit without knowing the code well. sorry if it is a problem.

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: c code to mplabx

Post by Benj »

Hello,

It should work ok as long as Flowcode is installed on the computer. The C code refers to the Flowcode CAL libraries but the reference should be ok as long as Flowcode is installed and in the correct position on the drive.

Please can you attach your MPLABX project in a zip file and also attach the errors you are receiving and we will try and help to get this setup so it works correctly.

Post Reply