Hi Guys, Everything is working great in simulator however when I try to compile to my chip (16F877A) I am getting errors. This may be one for you Ben? The c file is below. I pulled up the C file in Visual Studio and found errors on lines 611,603,718,710,836,883 and there may be more? I think these errors are all related? This is what Flowcode is showing me:
F:\Wire Cutter\work5.c(631): error: missing semicolon
F:\Wire Cutter\work5.c(566): error: failure failure Return code = 1 Flowcode was unable to compile the flowchart's C code due to the following errors:
The line numbers that Flowcode gives me never seem to be correct? Is it because the Flowcode line numbers are without any blank lines? I was wondering about it?
As always any help is greatly appreciated!!
Werner
Problem compiling C code "Errors"
Moderator: Benj
Problem compiling C code "Errors"
- Attachments
-
- work5.c
- This is the flie with errors....
- (48.76 KiB) Downloaded 227 times
Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Problem compiling C code "Errors"
Hi Werner,
Download an editor like notepad++ (my personal favourite) which is free.
load the C code into it, then look at the fist error = line 631
You will see: Notice there is no PORT letter shown after tris, it should say trisc or trisb depending on connections to keypad.
This would suggest that you have not set up the pin connections by right-clicking the Keypad and choosing connections.
The other line (566)
Is just showing the beginning of the function which caused the error: So from that you can see it's the Keypad function.
I have also noticed that the c code was generated with Flowcode V4.3.
The latest update is flowcode 4.5 which has improved simulation and more microcontrollers added.
Tip: When you have installed your new editor, you can go into 'Chip', 'Compiler Options'
and use browse to set the path of the viewer up.
Then when you want to view the C code, just use Chip, View C then C can be seen on notepad++ or what ever you decide to use.
If you still get errors, then if you would like to post your flowchart, we can take a look at it for you
Martin
These numbers are vital for finding out whats causing the issue.Werner wrote: F:\Wire Cutter\work5.c(631): error: missing semicolon
F:\Wire Cutter\work5.c(566): error: failure failure Return code = 1 Flowcode was unable to compile the flowchart's C code due to the following errors:
Download an editor like notepad++ (my personal favourite) which is free.
load the C code into it, then look at the fist error = line 631
You will see: Notice there is no PORT letter shown after tris, it should say trisc or trisb depending on connections to keypad.
This would suggest that you have not set up the pin connections by right-clicking the Keypad and choosing connections.
The other line (566)
Is just showing the beginning of the function which caused the error: So from that you can see it's the Keypad function.
I have also noticed that the c code was generated with Flowcode V4.3.
The latest update is flowcode 4.5 which has improved simulation and more microcontrollers added.
Tip: When you have installed your new editor, you can go into 'Chip', 'Compiler Options'
and use browse to set the path of the viewer up.
Then when you want to view the C code, just use Chip, View C then C can be seen on notepad++ or what ever you decide to use.
If you still get errors, then if you would like to post your flowchart, we can take a look at it for you
Martin
Martin
Re: Problem compiling C code "Errors"
Thanks again Martin! You got it! I did not have my pins setup correctly. I fixed it and I am up and running. I did download Notepad++ great tip very simple and works!
Thanks for everything!
Have a great day!
Werner
Thanks for everything!
Have a great day!
Werner
Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Problem compiling C code "Errors"
Your welcome Werner & thanks.
Glad you have got your flowchart sorted.
There are other free notepad replacements like notepad2 and notepad itself can got a specified line number (see not forgotten Steve
)
But another reason for using notepad++ is it can compare two files side by side and highlight any differences.
You have a great day too!
Martin
Glad you have got your flowchart sorted.
There are other free notepad replacements like notepad2 and notepad itself can got a specified line number (see not forgotten Steve
But another reason for using notepad++ is it can compare two files side by side and highlight any differences.
You have a great day too!
Martin
Martin
Re: Problem compiling C code "Errors"
Thanks for the tip Martin, I can already see that being able to compare two file could come in really handy!! I am going to try it out!
I will, I make every day a great day!
Werner
I will, I make every day a great day!
Werner
Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"