View Full Version : eclipse & Kevin's camera code
dasRatsel
20-01-2006, 19:23
howdy --
i'm using eclipse f'r my IDE and am trying to integrate some of Kevin's camera code into our code, but i get a link error reading:
"Error - processor types do not agree across all input files."
when i try to use this year's .lkr and library files.
i'm not quite sure what this error means let alone how to fix it, so any help would be greatly appreciated
~Xavier
The processor upgrade (/new code because of that) broke the old build tools on the Linux side. I've got everything compiling using the configure.py script pointed to by this post (http://www.chiefdelphi.com/forums/showpost.php?p=432876&postcount=12). That creates a Makefile which will correctly build the code.
I'm using OpenLDev as my IDE now... nice that I don't have to load the huge Java VM. :)
dasRatsel
20-01-2006, 19:47
intresting -- i'm hoping to keep w. eclipse (i wanna keep everything in windows) but i'll look into alternatives, i just dont wanna be forced back to mplab
thanks f'r the info
(i wanna keep everything in windows)Oops... didn't realize you were on Windows. :) You'll probably have to get in touch with the person who made the plugin. *shrug*
The full thread (http://www.chiefdelphi.com/forums/showthread.php?threadid=36377) may help you to figure out what needs to be updated.
Astronouth7303
20-01-2006, 20:59
The new camera code compiles fine under eclipse/windows. Try cleaning first. (BTW, I've come up with a "generic" makefile that uses $(wildcard) and % to compile everything. I'll post it if there's interest.)
BradAMiller
20-01-2006, 21:08
howdy --
i'm using eclipse f'r my IDE and am trying to integrate some of Kevin's camera code into our code, but i get a link error reading:
"Error - processor types do not agree across all input files."
when i try to use this year's .lkr and library files.
i'm not quite sure what this error means let alone how to fix it, so any help would be greatly appreciated
~Xavier
The eclipse plug-in will work with 2004/5 and 2006 controllers.
You have to make sure that all the files are for the same processor type. In the case of the 2006 controller, if is 18F8722. Check these things:
1. right-click on the project in the left-side project window. Select properties. Then select C/C++ Build. From there, select "Compilation Information". In this window, the processor type should read: "-p=18F8722" to set the 2006 controller.
2. Make sure that you are linking with this years libraries from IFI
3. Make sure that you are linking with the 18F8722 linker file (18F8722.lkr).
The last two items are on the "Linker Information" page of the project properties window.
If any of these don't agree, then you'll get that message.
dasRatsel
20-01-2006, 21:21
yea -- i found the problem, its compiling all the files with "-p=18F8520"
i can't find how to change that for the 2006 controler, might i have an old version of the plugin where i can't change that value?
prograid
21-01-2006, 01:36
You'll probably have to get in touch with the person who made the plugin.
That's me. :)
yea -- i found the problem, its compiling all the files with "-p=18F8520"
i can't find how to change that for the 2006 controler, might i have an old version of the plugin where i can't change that value?
This may be possible, however; I have an even better solution.
I've posted a new plug-in on our team website (it may be finicky as we recently had a power outage at school).
First delete the old plug in, which should be either a folder or jar file with the name org.eclipse.cdt.mcc18.toolchain_version number
Then restart eclipse, and go to help, software updates, find and install....
Choose find a new feature to install, and click next.
Then select new remote site and give the site a name, and enter
http://team254.bcp.org/update_site for the URL and click OK.
Then click next. Click the checkbox, and click next or finish (whichever is active) When it prompts you as to whether you really want to install the plug-in click install.
It will then ask you to restart eclipse. Click yes.
Any projects you create now using the CDT and Managed Make will now have two configurations, one for pre-2006 controllers (i.e. PIC18f8520) and one for the 2006 controller (default.) You will have to recreate any old projects.
This should allow you to compile 2006 code very easily. If you have any urgent questions PM me or send me an email, or else post them in this thread, or a new one if they warrant a new thread.
Glad to see my work is of use!
dasRatsel
21-01-2006, 15:10
wow
thanks a million. you are my hero for writing this plugin
*bows graciously*
thanks again
~Xavier
WizardOfAz
23-01-2006, 01:34
Hmmm
Following your instructions above, I deleted and reinstalled the plugin from the team254 site. Restarted eclipse. Created a new project and copied all the source files from the old one. I have some problems:
in properties, if I click on C/C++ Build, I get "an error has occured, see log for details".
If I do a project/clean and try to look at the console output, it says "no console is available"
Any suggestions?
Bill
Astronouth7303
23-01-2006, 20:37
Hmmm
Following your instructions above, I deleted and reinstalled the plugin from the team254 site. Restarted eclipse. Created a new project and copied all the source files from the old one. I have some problems:
in properties, if I click on C/C++ Build, I get "an error has occured, see log for details".
If I do a project/clean and try to look at the console output, it says "no console is available"
Any suggestions?
Bill
Occasionally, when I install a plugin, it throws an error the first time but not after.
Also, what was the error? (Help > About Eclipse SDK; Configuration Details; View Error Log. Scroll all the way down.)
WizardOfAz
24-01-2006, 08:30
Occasionally, when I install a plugin, it throws an error the first time but not after.
Also, what was the error? (Help > About Eclipse SDK; Configuration Details; View Error Log. Scroll all the way down.)
Thanks. It's not a first time error, it's every time. I can't use the mcc18 plugin at all. More specifically, I get the error whenever I try to touch the C18 properties or the MPLinker properites. I.e.
right-click project>Properties>C/C++ Build>Tool Settings>C18 Compiler --> kaboom
The error from the log is not very helpful. It's getting an array out of bounds. I assume something in the plugin is messed up and it's trying to show a property that does not exist or something. The beginning of the error is:
!ENTRY org.eclipse.jface 4 2 2006-01-24 06:22:36.264
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.eclipse.cdt.managedbuilder.ui.properties.Build ToolSettingsPage.getToolFlags(BuildToolSettingsPag e.java:259)
at org.eclipse.cdt.managedbuilder.ui.properties.Build ToolSettingsPage.updateAllOptionField (long stack trace follows)
BTW - thanks for telling me how to find that log, I had always wondered.
I have tried uninstalling and reinstalling the plugin, no difference on that. My Eclipse version is 3.1.1 and it worked fine with an older MCC18 plugin that didn't offer the 8722 support.
Bill
Astronouth7303
24-01-2006, 16:19
Using the online version, this is verifiable. (I get the same/similar issue on mine.)
I would recomend using the old version (1.2) from the whitepaper thread. MAKE SURE YOU UNINSTALL THIS ONE FIRST!
That's me. :)
This may be possible, however; I have an even better solution.
I've posted a new plug-in on our team website (it may be finicky as we recently had a power outage at school).
First delete the old plug in, which should be either a folder or jar file with the name org.eclipse.cdt.mcc18.toolchain_version number
Then restart eclipse, and go to help, software updates, find and install....
Choose find a new feature to install, and click next.
Then select new remote site and give the site a name, and enter
http://team254.bcp.org/update_site for the URL and click OK.
Then click next. Click the checkbox, and click next or finish (whichever is active) When it prompts you as to whether you really want to install the plug-in click install.
It will then ask you to restart eclipse. Click yes.
Any projects you create now using the CDT and Managed Make will now have two configurations, one for pre-2006 controllers (i.e. PIC18f8520) and one for the 2006 controller (default.) You will have to recreate any old projects.
This should allow you to compile 2006 code very easily. If you have any urgent questions PM me or send me an email, or else post them in this thread, or a new one if they warrant a new thread.
Glad to see my work is of use!
Ben;
I tried the above process but continue to be blocked at the server as unauthorized access. I have read all of the threads mentioned but did not see any sort of registrations instructions. P.S. I am using Eclipse to also write code for the Palm PDA even have worked on some code published elsewhere using the Palm as a robotics controller. Thanks for your help!
prograid
24-01-2006, 19:41
Sorry for the problems.
However, just to make some things clear. You can't download the plug-in by clicking on the link. You need to copy the URL into Eclipse's update manager.
(I have a feeling that the problem might have something to do with a slight change I made to the plug-in soon after publishing it.)
I'm working on it now. I'll post when I am sure that (at least as sure as I can be) it works.
Thanks for your help,
Ben
WizardOfAz
25-01-2006, 02:07
Sorry for the problems.
However, just to make some things clear. You can't download the plug-in by clicking on the link. You need to copy the URL into Eclipse's update manager.
(I have a feeling that the problem might have something to do with a slight change I made to the plug-in soon after publishing it.)
I'm working on it now. I'll post when I am sure that (at least as sure as I can be) it works.
Thanks for your help,
Ben
Thanks for this work Ben.
We did install the way you suggested, using the update manager. So that's not the problem.
Recreating all existing projects (we have a bunch of them) every time the plugin is updated is a big pain. Then getting the new projects sync'd up with the CVS server is yet more pain. Do you see any way to beat that?
Thanks again, eclipse is so much nicer to work in than the alternative.
Bill
prograid
25-01-2006, 18:57
Thanks for this work Ben.
We did install the way you suggested, using the update manager.
Bill
Sorry, that was directed to lupjohn, who said that he got an unauthorized access error from the server. (There is no index.html file for that folder so if you click on the link you get a 403 Forbidden error.) For example, if you go to team254.bcp.org/update_site/site.xml you will not get a forbidden error. This is the file Eclipse looks at when searching for plug-ins.
Recreating all existing projects (we have a bunch of them) every time the plugin is updated is a big pain. Then getting the new projects sync'd up with the CVS server is yet more pain. Do you see any way to beat that?
I am actually not sure if this can be fixed. Eclipse stores a lot of information specific to compiler settings, etc. in each project (Check your .settings directory.) Sorry.
Would you mind trying this again? (I have deleted an old version of the plug-in from the update site. I am not sure if it makes a difference.)
1. Delete any current plug-ins or features (in the eclipse/features folder)
that are begin with org.eclipse.cdt.mcc18
2. Install the plug-in from the update site.
3. When prompted as to whether to restart, first say no.
4. Then close eclipse.
5. then restart eclipse with the option -clean.
For those interested, the reasons I'm making you do the hard work of restarting eclipse by yourself is that the plug-in and feature might be so small that eclipse interrupts the downloading process when it asks you to restart, because it thinks that it is already done downloading. When it restarts it interrupts the downloading process, and corrupts the plug-in.
WizardOfAz
26-01-2006, 11:55
1. Delete any current plug-ins or features (in the eclipse/features folder)
that are begin with org.eclipse.cdt.mcc18
2. Install the plug-in from the update site.
3. When prompted as to whether to restart, first say no.
4. Then close eclipse.
5. then restart eclipse with the option -clean.
Hi Ben
Thanks again for the help. I followed the above steps to the tee but the result is the same - I still get the index out of bounds exception when I look at project properties, and can't use the project to build for the FRC.
Bill
prograid
28-01-2006, 23:00
Alright, since I can't seem to get the actual update site to work. I'll post the plug-in and feature I'm using in my own installation of eclipse. It's in the attachment.
Copy the jar file to your plugins directory of your eclipse installation.
Copy the folder to your features direcotyr of your eclipse installation.
start eclipse with the option -clean
Important you need CDT 3.0 (and therefore Eclipse 3.1) or later for this plug-in to work.
WizardOfAz
29-01-2006, 12:34
Important you need CDT 3.0 (and therefore Eclipse 3.1) or later for this plug-in to work.
I had managed to miss this in the past, and it was the whole problem. I was running an earlier (2.x) version of cdt, which worked fine with the previous mcc18 plugin, so never suspected. Anyway, I've installed the new CDT then was able to install from your team254 eclipse update link.
Thanks for all the work and help.
Bill
Alright, since I can't seem to get the actual update site to work. I'll post the plug-in and feature I'm using in my own installation of eclipse. It's in the attachment.
Copy the jar file to your plugins directory of your eclipse installation.
Copy the folder to your features direcotyr of your eclipse installation.
start eclipse with the option -clean
Important you need CDT 3.0 (and therefore Eclipse 3.1) or later for this plug-in to work.
Ben;
I have been very busy so am just getting around to completing the install of the latest corrections from the thread. I have loaded Kevin Watsons latest CMU2CAM "bells and whistle code" (builds completely in MPLAB IDE) but I get an error 1203 on line 233 of ifi_utilities.c. HELP. I am drawing a blank on fixing this error. Thanks for your time on this and hopefully your robot build is going well. Your team will be missed at the Sacramento\Davis regional. LRU.
P.S. Later edit. I have checked the header file for the call and I need to clarify the call parameters. Thanks for your help but just needed to think about this for a while. LRU.
prograid
17-02-2006, 01:16
Ben;
I have been very busy so am just getting around to completing the install of the latest corrections from the thread. I have loaded Kevin Watsons latest CMU2CAM "bells and whistle code" (builds completely in MPLAB IDE) but I get an error 1203 on line 233 of ifi_utilities.c. HELP. I am drawing a blank on fixing this error. Thanks for your time on this and hopefully your robot build is going well. Your team will be missed at the Sacramento\Davis regional. LRU.
P.S. Later edit. I have checked the header file for the call and I need to clarify the call parameters. Thanks for your help but just needed to think about this for a while. LRU.
Can you post the code you're using? The default version of ifi_utilities.c doesn't seem to have a line 233.
Can you post the code you're using? The default version of ifi_utilities.c doesn't seem to have a line 233.
The code is found on Kevin Watson's site here http://kevin.org/frc/ . I discovered the error was related to which processor was called out and I had it set on the old 2005 processor. ADC.h calls for 3 parameters for the function openadc() for the old processor and 2 parameters for the new processor as called for in the latest code from Kevin. Kevin also provides an example program called ADC.c and reading through that code I discovered that the openadc() call had 3 parameters. Simply adding the 3rd parameter in the call to openadc() in camera.c code allows a full build without errors. The interesting part about this problem is that the same original code as supplied from Kevin compiles in the MPLAB IDE without error or warnings. This tells me that the Eclipse environment may be use a more concise preprocessor to parse the code and thus catch this level of error. Thanks for your response. I just needed some time to work through this and I am a little fuzzy from the late nights on the build. LRU.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.