Hello, I’m the programmer from team 964. Last year none of us knew how to do anything at our school because our entire team was freshman (only 5 people on our team total). I was learning how to program the robot but I could not get MPLAB to work at all. Deciding it was my lack of programming knowledge we got easy C I think it was. This year we have more people who have never done it. Our instructor wants us to give a demonstration for the new people and to teach them things before the kickoff. I tried loading MPLAB IDE and C18 and Ifi loader of the original cd from last year. Everything installs however it won’t even compile the unedited default source code that I got off of the ifi website. I also have tried bloodshed C/C++ tutorials. Please someone explain what I did wrong and how to fix it. I loaded all the files into a new project when I tried to compile it. If you don’t know how to fix it can you recommend a free compiler that works well. I might be able to use Linux’s gcc either with cygwin or with knoppix. Thanks in advance.
With the default code is a workspace file. Open that and try and compile it. Do you get any errors?
Chris is correct. We need more detail on exactly what errors you are getting in order to help you.
Rest assured that over 1000 teams use MPLAB to program their robots. It will work for you. We just need to find out what your stumbling block is…
Every team should evaluate their programming abilities. If a team feels lost with MPLAB and has difficulty with getting going, then I strongly suggest they consider Easy-C. This will ensure that the team can program the robot. After, they feel comfortable with Easy-c then start on MPLAB. Is there another team in your area you could meet with to help with the MPLAB installation and get you going? Our team is in a similar situation. We have 2 students that I feel could handle MPLAB. One hasn’t been to too many meeting and the other I feel should step up to a leadership position, leaving us with rookie programmers. After, last year’s experience, I kind of like Easy-C.
I know how to program now. I’ve made other programs that didn’t have to do with first using bloodshed. There was no project file included. I’ll try to download it again. I know how to use compilers and C. Last year I hated easy C because it was all drag and drop and I prefer a text environment over some cute gui when programming. My problem was is that after installing all the files on the cd it would not compile the default source code.
How did you install the files? Where did you obtain the default code? How did you go about trying to compile it? What did MPLab do when you tried? Be as specific as possible. We can’t do a good job of assisting you if we don’t have good information about the problem.
I first installed the software following the instructions that came on the cd it said first install mplab ide. I installed that then I installed the c18 one as per the directions. Next I installed ifi loader. After all that was installed I restarted the computer. Next I downloaded the default source code from ifirobotics.com. There were no project files in the folder so I selected new project. From there I added all the .h and .c files in the directory. i attempted to compile it and it said there were errors in the code. I’m sorry I can’t tell you the errors right now I will have to wait till tuesday to try anything again. When I do I am going to redownload and install everything. If I still get the errors I will post again with the exact errors that it gives me. Thank you for you help and concern.
You shouldn’t have to start a new project in order to use the default code. What I would do is simply edit the default code. Don’t change any folder or file names. The compiler can’t handle long file paths, so for best results, place the folder with your code on the desktop. This will make the source file name as short as possible. As long as you don’t change any file paths the code should compile.
As for the errors in your code, what sort of errors were they? If there are syntax errors, you can double-click on the error given in the compile window, and MPLAB will show you about where the error is. If the error has something to do with a file path, follow the directions above.
Let me know if this helps!
Theres a very strange thing that the C18 compiler does…
How many characters is the path to your project files? There is a limit to the number of characters allowed.
I would suggest trying copying all of your files to a directory near the root, in my case, i use: “C:\firstcode<year><day/revision>”
Did that work? Post back here or PM either way. Hope that helps you, if you need other help i’m not a 1/2 bad programmer. :rolleyes:
That’s odd. There’s definitely a FrcCode.mcp file inside the folder I get when I unzip the http://www.ifirobotics.com/docs/frc-code-2-28-2006.zip file. I suggest that you look again; if it’s still not there, download a fresh copy.
Have you stated in ur active project your Library path of the mcc18 ? Also have you stated a path for ur output directory. This can be found in Project/Buld Options/Project. I remember that that was my main reason why it would not complie properly.
srry my spelling can be way off. :ahh:
Hope that helps:)
I just downloaded this zip file and unpacked it to a new directory. I then opened MPLAB and did a Project>Open and clicked on the FrcCode.mcp file. Then I did a Project>Build All and it compiled just fine.
There is no need to change anything if you have done the MPLAB/C18 installation correctly.
Actually, I believe the only character limit is for the linker. The compiler can handle long path names. If you exceed the limit, you will get a clear error from the linker after all of the files are compiled. In that case, you will have to move the directory containing the project, but exit from MPLab first!
Sorry it took so long for me to post I haven’t been able to log on. I re downloaded the default source code off of ifirobotics.com. I opened the workspace and this time it was there. I talked to the only other person who had used the computer so far. Apparently he had moved it or deleted it or something. Don’t ask me what he was doing with the computer considering hes one of the people who builds the robot. Anyways I opened it up compiled it no problem, made some changes tried again. Everything works. Thanks for the help and support. If I have anymore questions I’ll be sure to post.