Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Errors compiling Kevin's new code (pragmas) (http://www.chiefdelphi.com/forums/showthread.php?t=62284)

Bryan Herbst 22-01-2008 15:57

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:

258: warning [2002] Unknown pragma 'tmpdata'
249: Error [1020] Unexpected input folowing 'interrupt'
364: warning [2002] Unknown pragma 'tmpdata'
Can anyone help?

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:

442: Error [1111] undefined label '_FPFLAGS' in '_startup'

Joe Ross 22-01-2008 16:04

Re: Errors compiling Kevin's new code (pragmas)
 
Are you compiling his code for the 3.x compiler with the 2.4 compiler?

Bryan Herbst 22-01-2008 16:15

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.

Bryan Herbst 22-01-2008 16:57

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"

Foster 22-01-2008 17:07

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.

Bryan Herbst 22-01-2008 17:15

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.

Kevin Watson 22-01-2008 17:22

Re: Errors compiling Kevin's new code (pragmas)
 
Quote:

Originally Posted by Tanis (Post 683761)
Update- After done building, the output screen occasionally returns "Error: bad magic number in Coff file xx/xx/autonomous.o"

If the "magic number" is different across the project it means somewhere you've got a piece of code compiled with the wrong compiler version and the linker gets unhappy. My guess is that you're trying to link everything together with the 3.1 tools, but have the wrong version (i.e., 2.4) of the ifi_frc.lib file.

-Kevin

Bryan Herbst 23-01-2008 15:58

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.

Bryan Herbst 25-01-2008 15:15

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!

Spider-Man 25-01-2008 17:36

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.

Bryan Herbst 25-01-2008 22:14

Re: Errors compiling Kevin's new code (pragmas)
 
Yes, we are using the 8722 lib and lkr files.

FireJet 31-01-2008 12:50

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.


All times are GMT -5. The time now is 23:10.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi