|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Errors compiling Kevin's new code (pragmas)
hey guys, trying to compile kevin's code (made changes to default_routines only), getting some errors in MPLAB.
Quote:
Also, what exactly is a pragma? I've never dealt with them before, so help is greatly appreciated. PS- If I comment off the three lines that cause errors, it gives me Quote:
Last edited by Bryan Herbst : 22-01-2008 at 16:08. |
|
#2
|
||||||
|
||||||
|
Re: Errors compiling Kevin's new code (pragmas)
Are you compiling his code for the 3.x compiler with the 2.4 compiler?
|
|
#3
|
||||
|
||||
|
Re: Errors compiling Kevin's new code (pragmas)
That's probably it. I thought we had updated it, but apparently not. I'll post back here if that doesn't fix it.
|
|
#4
|
||||
|
||||
|
Re: Errors compiling Kevin's new code (pragmas)
Okay, that fixed the original issues.
Now however, when it gets to the last linking step (COFF to HEX), it pops up "failed to load file xxxxx.cof." The COFF file is right there in the folder, and it can find it when it is cleaning up the files when I try to build it again. Any ideas? Update- After done building, the output screen occasionally returns "Error: bad magic number in Coff file xx/xx/autonomous.o" Last edited by Bryan Herbst : 22-01-2008 at 17:05. |
|
#5
|
|||
|
|||
|
Re: Errors compiling Kevin's new code (pragmas)
On the project check the build options to make sure they are the right paths.
Clean sometimes will get something via a different path that the linker won't see. |
|
#6
|
||||
|
||||
|
Re: Errors compiling Kevin's new code (pragmas)
Which paths?
The linker and lib paths are the defaults (C:\mcc18\[lib or lkr]). I tried to manually set the output directory to the correct directory, but it changed nothing. |
|
#7
|
||||
|
||||
|
Re: Errors compiling Kevin's new code (pragmas)
Quote:
-Kevin |
|
#8
|
||||
|
||||
|
Re: Errors compiling Kevin's new code (pragmas)
I downloaded the simple C18 3.0 code from your site, so I assume the ifi_frc file is up to date.
If it helps at all, if I download the hex file that appears (but is definitely not complete) to the bot, all the OI's pwm, realy, and switch lights turn on. Finally, printf almost always returns one of a few errors, no matter what I'm printing. Any suggestions as to why? Not entirely sure of specific errors, I'll edit if I come across one again. |
|
#9
|
||||
|
||||
|
Re: Errors compiling Kevin's new code (pragmas)
Sorry, missed the editing window.
Anyways, where can I find the update ifi_frc.lib file? I have ifi_frc_8722.lib and ifi_frc_8520.lib, but no ifi_frc.lib, ifi_frc.lib. I checked kevin's page, and the ifi robotics page, but couldn't find it. Thanks! Last edited by Bryan Herbst : 25-01-2008 at 15:26. |
|
#10
|
|||||
|
|||||
|
Re: Errors compiling Kevin's new code (pragmas)
The numbers in the file correspond to a specific version of the robot controller. The current controller version as of 2006 is 8722, which is the one you want.
In the Library Files area of your project you want the downloaded ifi_frc_8722.lib compiled with C18 3.0+. Also, make sure that your linker script is the 18f8722.lkr. Hope that helps. |
|
#11
|
||||
|
||||
|
Re: Errors compiling Kevin's new code (pragmas)
Yes, we are using the 8722 lib and lkr files.
|
|
#12
|
|||
|
|||
|
Re: Errors compiling Kevin's new code (pragmas)
I'm having the same problem with the new default 2008 code. Everything compiles fine, but I keep getting the error that it "Failed to load project.cof". I've made sure that the library and linker include paths were right, and using the correct linker/library versions.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with Kevin's code | Tottanka | Programming | 5 | 04-11-2007 13:32 |
| Disabling Vex compiling errors | jcsymmes | Programming | 2 | 03-06-2006 01:54 |
| Kevin's Code? | winners | Programming | 5 | 27-01-2006 16:32 |
| Question about kevin's code | ImmortalAres | Programming | 3 | 23-06-2005 11:13 |
| Team THRUST - Kevin's Code and Camera Code Combine | Chris_Elston | Programming | 3 | 31-01-2005 22:28 |