|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Hey, all. Thanks in advance for the help!
So, I have been trying to install MPLAB on our team's new programming laptop. UNFORTUNATELY, (Having only the documentation that comes with the CD) I have hit problem after problem. Most of the problems were easy to fix, but It seems that I have hit an error that I cannot repair. Well, Everything is installed. So, I decided that I would try and build some code that is known to be working. However, upon my attempt to build the code, I was prompted with the error message: Clean: Deleting intermediary and output files. Clean: Done. Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "main.c" -fo="main.o" -D_FRC_BOARD -D_LARGE_CODE -D_DONT_USE_TMR0 -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- C:\Documents and Settings\Administrator.LENOVOGHOST\Desktop\Code\wo rking\main.c:15:Error [1027] unable to locate 'ifi_aliases.h; #include ' Halting build on first failure as requested. BUILD FAILED: Tue Nov 25 09:07:58 2008 The file 'ifi_aliases.h' exists but it refuses to recognize it. Any help would be greatly appreciated. |
|
#2
|
|||||
|
|||||
|
Re: Generic error in MPLAB
First suspect would be your MPLAB project's Include path where it's told to find all the .h files.
Project -> Build Options... -> Project Based on your messages Include Path should be C:\mcc18\h |
|
#3
|
||||
|
||||
|
Re: Generic error in MPLAB
main.c:15:Error [1027] unable to locate 'ifi_aliases.h;
#include ' Do you have something that looks like #include 'ifi_aliases.h; #include 'something else' In your code? That's what it looks like, you forgot a ' . Also, you don't put semicolons at the end of include directives. Probably just a typo, though. |
|
#4
|
||||
|
||||
|
Re: Generic error in MPLAB
nope, I copied and pasted that directly from the code...
unfortunately, I do not have access to the laptop until Monday... so It looks like I will be getting back to you guys then! Thanks for your help. |
|
#5
|
|||
|
|||
|
My first thought was having the files on your desktop. MPLAB, or at least parts of it, doesn't like command lines longer than 64 characters. But looking over the error, I'm going with rfrank's answer:
Error [1027] unable to locate 'ifi_aliases.h; #include ' #include 'ifi_aliases.h; should be #include 'ifi_aliases.h' //note the ' at the end Also, is it a single quote or should it be a double quote? Looking at our old programs I'm thinking how out of shape I am -- I haven't done any robot programming since last spring! Time to start programming again! Y'know, a single missing character once brought down an unmanned rocket. (Haven't found an online source for this, but I think I originally saw it in an early Arthur C. Clarke book.) |
|
#6
|
|||
|
|||
|
Re: Generic error in MPLAB
Quote:
NASA said a hyphen was missing. http://nssdc.gsfc.nasa.gov/nmc/maste...g.do?sc=MARIN1 Wikipedia says Clakre's mention of it is in "The Promise of Space" 1968, page 225. http://en.wikipedia.org/wiki/Mariner_1 The comment in this article says a semicolon error (C vs shell) brought down Ariane 501. http://praxis101.com/blog/2006/01/ar...torys-wor.html |
|
#7
|
|||
|
|||
|
Re: Generic error in MPLAB
Quote:
|
|
#8
|
||||
|
||||
|
Re: Generic error in MPLAB
Quote:
First off, you path is too long and will cause issues with the Linker (IIRC). Second, the PIC MCC18 compiler follows the ANSI C Standard fairly well. ANSI C, supports the Double Quote (e.g. " ) for bounding Include File Names that are in your Source Code directory, and the Less Than and Greater Than (e.g. < and > ) for bounding Include File Names that are in Compiler's Include Path. That is why Include File Names like stdio.h and stdlib.h are Bounded with < and > and Include File Names like ifi_aliases.h and are Bounded with ". Code:
/******************************************************************************* * FILE NAME: ifi_utilities.c * * DESCRIPTION: * This file contains some useful functions that you can call in your program. * * USAGE: * The user should NOT modify this file, so that if a new version is released * by Innovation First then it can be easily replaced. * The user should add their own functions to either user_routines.c or another * custom file. * *******************************************************************************/ #include <usart.h> #include <spi.h> #include <adc.h> #include <capture.h> #include <timers.h> #include <string.h> #include <pwm.h> #include "delays.h" /*defined locally*/ #include "ifi_aliases.h" #include "ifi_default.h" #include "ifi_utilities.h" #include "user_routines.h" /* Rest of file ifi_utilities.c, goes here */ Also, move the Source Directory, "C:\Code\working\main.c" sounds like a good place to me. When something is not compiling, look at other files that do compile and see how they are different than you code. And also feel free to ask questions here.... ![]() |
|
#9
|
||||
|
||||
|
Re: Generic error in MPLAB
OKAY Update.
Oddly, one of my programmers (a rookie like most of us here) went in and randomly deleted one of the quotation marks in the code as you all suspected. Old error is gone! Only to let another surface... now, I get: Clean: Deleting intermediary and output files. Clean: Done. Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "main.c" -fo="main.o" -D_FRC_BOARD -D_LARGE_CODE -D_DONT_USE_TMR0 -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- C:\working\main.c:14:Error: syntax error Halting build on first failure as requested. BUILD FAILED: Mon Dec 01 09:45:22 2008 I am guessing that the build settings are off, due to the fact that I am getting a message that says "DONT_USE". haha Any Ideas how to fix this? ...Oh, and the first 21 lines of my code read: /************************************************** ***************************** * FILE NAME: main.c <FRC VERSION> * * DESCRIPTION: * This file contains the main program loop. * * USAGE: * You should not need to modify this file. * Note the different loop speed for the two routines: * Process_Data_From_Master_uP * Process_Data_From_Local_IO ************************************************** *****************************/ #include "ifi_aliases.h"; #include "ifi_default.h"; #include "ifi_utilities.h"; #include "user_routines.h"; tx_data_record txdata; /* DO NOT CHANGE! */ rx_data_record rxdata; /* DO NOT CHANGE! */ packed_struct statusflag; /* DO NOT CHANGE! */ Last edited by domoarigato : 01-12-2008 at 10:51. Reason: Aditional Info. |
|
#10
|
||||
|
||||
|
Re: Generic error in MPLAB
Quote:
The error is on line # 14, there are no Semicolons at the end of the #include lines. Look at the #include lines from my previous post, of the code from the ifi_utilities.c file. If you fix Line #14, the error will move to Line #15 and so on. Code:
DO THIS #include "ifi_aliases.h" #include "ifi_default.h" #include "ifi_utilities.h" #include "user_routines.h" VERSES THIS #include "ifi_aliases.h"; // #14 #include "ifi_default.h"; // #15 #include "ifi_utilities.h"; // #16 #include "user_routines.h"; // #17 |
|
#11
|
|||||
|
|||||
|
Re: Generic error in MPLAB
Quote:
Why did someone edit the main.c file in the first place? User code typically doesn't go there; it goes in other files. If you can't understand the error messages immediately, you really shouldn't be messing with the code in that file. It contains a clear warning right at the top: You should not need to modify this file. I'm also a little worried by your description of a rookie programmer "randomly deleting" a character. C programming should not be done by trial and error. rfrank gave you exactly the answer you needed in order to correct the problem, and Roger confirmed it. Rather than following their advice, however, you instead tried something "randomly" and got a new error -- but one that is also addressed by the original answer. Next time you ask for help, it would probably be more productive for you to pay closer attention to the responses. |
|
#12
|
|||
|
|||
|
Re: Generic error in MPLAB
I'm still too mellow from turkey to give you the same lecture Alan just gave you, so I'll just tell you to look at kevin.org/frc/ -- the pre-2009 code is all there. Look at what Kevin has as a starting point, "compare and contrast", "exercise is left for the student" and all.
I'm going to take a guess and say look at 2007 FRC code -- Kevin greatly changed and simplified the 2008 code and probably wrote something in the header saying as much.Code:
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "main.c" -fo="main.o" -D_FRC_BOARD -D_LARGE_CODE -D_DONT_USE_TMR0 -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- Code:
-Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -mL -nw=2066 -D_FRC_BOARD |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MPLab build error | Derek t | Programming | 7 | 17-01-2005 09:33 |
| MPLAB build error | cabbagekid2 | Programming | 7 | 12-01-2005 13:36 |
| MPLAB IDE 6.60 Error | mchan1111 | Programming | 8 | 08-11-2004 20:17 |
| MPlab error | ryan_f | Programming | 9 | 24-05-2004 07:30 |
| Mplab startup error | Team 869 | Programming | 6 | 25-01-2004 10:41 |