Go to Post Unconventional isn't necessarily innovation. - AdamHeard [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-11-2008, 10:55
domoarigato's Avatar
domoarigato domoarigato is offline
Team #1208 CCO
AKA: Coony
FRC #1208 (Metool Brigade)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: O'Fallon, Il
Posts: 32
domoarigato is an unknown quantity at this point
Unhappy Generic error in MPLAB

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   Spotlight this post!  
Unread 25-11-2008, 11:02
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 25-11-2008, 11:45
rfrank's Avatar
rfrank rfrank is offline
Programmer
AKA: Russell Frank
FRC #0041 (RoboWarriors)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2007
Location: Somerset, New Jersey
Posts: 19
rfrank will become famous soon enough
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   Spotlight this post!  
Unread 25-11-2008, 22:06
domoarigato's Avatar
domoarigato domoarigato is offline
Team #1208 CCO
AKA: Coony
FRC #1208 (Metool Brigade)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: O'Fallon, Il
Posts: 32
domoarigato is an unknown quantity at this point
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   Spotlight this post!  
Unread 26-11-2008, 09:53
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 688
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Post Re: Generic error in MPLAB

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   Spotlight this post!  
Unread 26-11-2008, 13:10
rwood359 rwood359 is offline
Registered User
AKA: Randy
FRC #0359 (Hawaiian Kids)
Team Role: Mentor
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Waialua, HI
Posts: 216
rwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to all
Re: Generic error in MPLAB

Quote:
Originally Posted by Roger View Post
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.)
It was Mariner 1 launched Aug, 1962. I was taking my first programming course when the news of the cause of the failure started coming out. I remember it well (or as well as you can remember 40+ years ago).

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   Spotlight this post!  
Unread 26-11-2008, 13:48
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 688
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Re: Generic error in MPLAB

Quote:
Originally Posted by rwood359
Clakre's mention of it is in "The Promise of Space" 1968, page 225
That's the book! And I should correct myself: It's not exactly one of his "early" books. It did hook me on space after reading 2001.
  #8   Spotlight this post!  
Unread 27-11-2008, 15:09
MarkO's Avatar
MarkO MarkO is offline
Registered User
AKA: Mark D. Overholser
FRC #0957 (WATSON Robotics team)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Albany, Oregon, USA
Posts: 17
MarkO is an unknown quantity at this point
Re: Generic error in MPLAB

Quote:
Originally Posted by domoarigato View Post
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.

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  */
The MCC18 Compiler, might support the Single Quote (e.g. ' ) for bounding Include File Names, but that would be non ANSI Standard.

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   Spotlight this post!  
Unread 01-12-2008, 10:47
domoarigato's Avatar
domoarigato domoarigato is offline
Team #1208 CCO
AKA: Coony
FRC #1208 (Metool Brigade)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: O'Fallon, Il
Posts: 32
domoarigato is an unknown quantity at this point
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   Spotlight this post!  
Unread 01-12-2008, 11:05
MarkO's Avatar
MarkO MarkO is offline
Registered User
AKA: Mark D. Overholser
FRC #0957 (WATSON Robotics team)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Albany, Oregon, USA
Posts: 17
MarkO is an unknown quantity at this point
Re: Generic error in MPLAB

Quote:
Originally Posted by domoarigato View Post
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:

Code:
/*******************************************************************************
* 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! */


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   Spotlight this post!  
Unread 01-12-2008, 11:41
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Generic error in MPLAB

Quote:
Originally Posted by domoarigato View Post
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:


[code]C:\Documents and Settings\Administrator.LENOVOGHOST\Desktop\Code\wo rking\main.c:15:Error [1027] unable to locate 'ifi_aliases.h;
#include '
I didn't pay enough attention to this when I first saw it. The initial diagnoses of the extraneous semicolon were correct, so far as they went. However, there's a more fundamental problem here that I just noticed:

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   Spotlight this post!  
Unread 01-12-2008, 14:21
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 688
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
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-
The two -D's that are bolded I've never seen before. Looking at page 95 of Kevin's link C18_3.0_users_guide.pdf (page 104 of the PDF) show them to be for macros in one of your C listings. Do a global search thru your code to find them. I'm guessing that TMR0 is one of the PIC timers; you'll have to dig deep into PIC18_reference.pdf to read about that. They are not "standard" macros in Kevin's code. The ones I have are
Code:
-Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -mL -nw=2066 -D_FRC_BOARD
Come to think of it, I think Alan told me those last two, many moons ago. Thanks again, Alan.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 01:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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