|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Programming Vex w/ MPLab
Sorry, I got dragged away before I could finish my answer last night.
The root cause of the problem you see is there are way too many files included as part of the project. The Vex starter code folder actually contains several different projects and variations on the projects lumped together, making it confusing. There are multiple variations of the same file included in your project. When you run Project Wizard don't include every file in your project. Here is a more readable version (well okay, "readable" is probably an overstatement. I just put each part of the command on a separate line) of the last link step of your compile that you posted, so I can point out what I mean about duplicate files. The files sharing common colors you only want one of in your project. There are others you also don't need, including the assembly file that actually gave you the current error. Code:
Executing: "C:\Program Files\Intelitek\easyC\Mcc18\bin\mplink.exe" /l "C:\Program Files\Intelitek\easyC\Mcc18\lib" "C:\Documents and Settings\W4TK3\VexControllerProject\18f8520user.lkr" "C:\Documents and Settings\W4TK3\VexControllerProject\ifi_utilities.o" "C:\Documents and Settings\W4TK3\VexControllerProject\main.o" "C:\Documents and Settings\W4TK3\VexControllerProject\PicSerialDrv.o" "C:\Documents and Settings\W4TK3\VexControllerProject\printf_lib.o" "C:\Documents and Settings\W4TK3\VexControllerProject\user_routines.o" "C:\Documents and Settings\W4TK3\VexControllerProject\user_routines_DDT.o" "C:\Documents and Settings\W4TK3\VexControllerProject\user_routines_fast.o" "C:\Documents and Settings\W4TK3\VexControllerProject\user_routines_fast_DDT.o" "C:\Documents and Settings\W4TK3\VexControllerProject\asm_lib.o" "C:\Documents and Settings\W4TK3\VexControllerProject\ifi_startup.o" "C:\Documents and Settings\W4TK3\VexControllerProject\Vex_alltimers.lib" "C:\Documents and Settings\W4TK3\VexControllerProject\Vex_alltimers_auton_debug.lib" "C:\Documents and Settings\W4TK3\VexControllerProject\Vex_alltimers_competition.lib" "C:\Documents and Settings\W4TK3\VexControllerProject\Vex_library.lib" "C:\Documents and Settings\W4TK3\VexControllerProject\Vex_library_auton_debug.lib" "C:\Documents and Settings\W4TK3\VexControllerProject\Vex_library_competition.lib" /o"Vex Controller.cof" /M"Vex Controller.map" MPLINK 3.90, LinkerCopyright (c) 2004 Microchip Technology Inc. Error - Coff file 'C:\Documents and Settings\W4TK3\VexControllerProject\asm_lib.o' does not appear to be a valid COFF file. Errors : 1 ---------------- The actual error you got was because the assembler used is too new. It's producing the newer type of COFF. You would have seen other errors if you got past this one. Quote:
Last edited by Mark McLeod : 14-05-2006 at 13:40. Reason: Dragged from CD to perform taxi service |
|
#2
|
|||
|
|||
|
Re: Programming Vex w/ MPLab
Mark--
Thanks! The build is successful now, the extra files were the problem. A question, though, if and when we start to write our own code for the Vex bots , what files should be included and left out so that the build is successful? Or is any code we write just going to be modifications of the default files already outlined? Thanks again. |
|
#3
|
|||||
|
|||||
|
Re: Programming Vex w/ MPLab
Quote:
If you plan on making major changes, then I'd suggest you create brand new files to put all your customized code in. Then just add those new files to your existing project. You can add whatever you want to a project, just be careful not to add two versions of the same file or routine. For instance, we put all our autonomous code in it's own file, and we put sensor specific code in a separate file of it's own. It makes it so much easier to reuse our code in new projects when we can just include a file, such as, Line_Follower.c. When you advance to the point where you're comfortable replacing everything with your own code, you basically need to keep or provide your own version of most (not all) of the functionality found in the files that begin with "ifi_". You need a main.c, but you can rewrite it to fit your needs. You'll also need bits and pieces from user_routines.c and user_routines_fast.c, such as, User_Initialization() and the InterruptHandlerLow(). Probably the easiest course to follow would be to first replace specific routines with your own versions. For instance, the most obvious routine to begin modifying is Default_Routine(). That's where you setup all your driving controls and responses. The next obvious routine to replace is User_Autonomous_Code(). One caution about replacing existing files. There are special files included by the code with a C statement such as: Code:
#include "user_routines.h" The compiler is going to go looking for a file by that exact name, in this example that would be "user_routines.h", regardless of what file name you may have used in the project list, so if you decided to replace the existing file by that name with one of your own devising and you call your's "my_user_routines.h" you'd better change all those include statements too, or the program will keep pulling in that old file even though it's not listed as part of your project. Last edited by Mark McLeod : 14-05-2006 at 18:00. |
|
#4
|
|||
|
|||
|
Re: Programming Vex w/ MPLab
Quote:
|
|
#5
|
|||||
|
|||||
|
Re: Programming Vex w/ MPLab
Quote:
Project -> Build Options... -> Project Under the "MPLINK Linker" tab put a check by: Suppress COD-file generation That's the sole reason for the 62 character limit and you don't use the COD file anyway. At least you have something to do now that exams are over and done with. Last edited by Mark McLeod : 07-06-2006 at 21:02. |
|
#6
|
|||
|
|||
|
Re: Programming Vex w/ MPLab
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to build a VEX programming module | bblack7489 | FIRST Tech Challenge | 78 | 09-06-2011 16:03 |
| Programming - Getting Started | Mark McLeod | Programming | 80 | 16-04-2008 23:37 |
| VEX programming | Gene F | Programming | 14 | 08-08-2006 22:21 |
| Vex bot programming Q's | BaldwinNYRookie | Programming | 6 | 09-10-2005 17:45 |
| Vex Programming | foobert | FIRST Tech Challenge | 3 | 24-06-2005 01:09 |