Go to Post The real reason I am coming to IRI is to get that Paul Copioli, he will be bearhugged, if its the last thing I do :p - Mike Schroeder [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 02-08-2010, 16:08
siaohuang siaohuang is offline
Registered User
no team
 
Join Date: Aug 2010
Location: Fort Wayne IN
Posts: 10
siaohuang is an unknown quantity at this point
Error - Invalid 18f8520 header file! Vex Robotics Kit

First of all I'm a newbie at the Vex Robotics Kit here are the things I've already done

I've successfully installed Mplab v8.10 and C18 compiler v3.35 , I went through the user guides and successfully build the first program, the "Hello World!!" program,so I think my C compiler is working

I downloaded the Vex Starter Code and extracted to a file called "VexCode" I placed it under the directory C:\mcc18\VexCode I opened VexUserCode.mcw (work space) and imported VexUserCode.mcp (project)

I set the Project--> Build options ---> Project and set the Include search path to C:\mcc18\h and C:\mcc18\VexCode
and the Library search path to C:\mcc18\lib and C:\mcc18\VexCode
and Linker script search path to C:\mcc18\VexCode the Linker script is in the VexCode folder 18f8520user.lkr

Then Build all in the output window it shows

----------------------------------------------------------------------
Debug build of project `C:\mcc18\VexCode\VexUserCode.mcp' started.
Preprocessor symbol `__DEBUG' is defined.
Tue Aug 03 03:19:32 2010
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\mcc18\VexCode\VexUserCode.mcs".
Clean: Done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 /i"C:\mcc18\VexCode" -I"C:\mcc18\h" "user_routines_fast.c" -fo="user_routines_fast.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\mcc18\VexCode\ifi_picdefs.h:1289:Error [1099] *** Error - Invalid 18f8520 header file!
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\mcc18\VexCode\VexUserCode.mcp' failed.
Preprocessor symbol `__DEBUG' is defined.
Tue Aug 03 03:19:32 2010

Can anyone solve this? Thank you for you time!!
  #2   Spotlight this post!  
Unread 02-08-2010, 16:33
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,835
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: Error - Invalid 18f8520 header file! Vex Robotics Kit

Did you install MPLAB/C18 from the VEX CD or did you also download any updates from online?

That error seems to indicate that the ifi_picdefs.h file is being inserted twice. It has a check at the beginning to prevent that though...
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 02-08-2010, 17:06
siaohuang siaohuang is offline
Registered User
no team
 
Join Date: Aug 2010
Location: Fort Wayne IN
Posts: 10
siaohuang is an unknown quantity at this point
Re: Error - Invalid 18f8520 header file! Vex Robotics Kit

Thanks for your reply I downloaded my Mplab and C18 from

http://www.microchip.com/stellent/id...en023073&part=

I also saw a forum

http://www.chiefdelphi.com/forums/sh...ad.php?t=31255

It seems that we have similar problems in the forum it mentioned something about the macro setting and I also tried adding "_FRC_BOARD" to the macro definitions and it still didn't work

Thanks for reading.
  #4   Spotlight this post!  
Unread 02-08-2010, 17:21
siaohuang siaohuang is offline
Registered User
no team
 
Join Date: Aug 2010
Location: Fort Wayne IN
Posts: 10
siaohuang is an unknown quantity at this point
Re: Error - Invalid 18f8520 header file! Vex Robotics Kit

Thank for your reply I downloaded my Mplab v8.10 and C18 v3.35 from

http://www.microchip.com/stellent/id...en023073&part=

and i saw the thread that mentioned the macro defintions so i ADDED "_FRC_BOARD" to my macro definitions and it didn't work as well

thanks for replying it means a lot to me!!
  #5   Spotlight this post!  
Unread 02-08-2010, 18:38
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,393
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: Error - Invalid 18f8520 header file! Vex Robotics Kit

Quote:
#define _VEX_BOARD
is what you want for the VEX board.

Let me recommend that you visit the: WPI Lib for VEX/FRC site and grab that library. It will make your programming about 1000 times easier. There are full instructions on how to make it work with MPLabs.

The Microchip compiler / linker is very fussy when it comes to path names, etc. in the setup.

Keep us posted on how you make out.
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
  #6   Spotlight this post!  
Unread 02-08-2010, 18:54
siaohuang siaohuang is offline
Registered User
no team
 
Join Date: Aug 2010
Location: Fort Wayne IN
Posts: 10
siaohuang is an unknown quantity at this point
Re: Error - Invalid 18f8520 header file! Vex Robotics Kit

Shouldn't it turn out as pictures?
  #7   Spotlight this post!  
Unread 03-08-2010, 12:09
siaohuang siaohuang is offline
Registered User
no team
 
Join Date: Aug 2010
Location: Fort Wayne IN
Posts: 10
siaohuang is an unknown quantity at this point
Re: Error - Invalid 18f8520 header file! Vex Robotics Kit

Thanks for all you guys' help!! I got it to work I try downloading older versions of Mplab v7.60 and C18 v2.40 and I downloaded Elevation - Appendix D (Programming Guide) from http://www.vexforum.com/wiki/index.php/Elevation

when you extract the file it willgive you the VexCode file and deleting the old library files and adding a new one Vex_2008_library.lib from the MPLAB-Autonomous-Code Rev2 - Vex Code

now when I build the mpw file it gives me

Clean: Done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 /i"C:\mcc18\h" "user_routines_fast.c" -fo="user_routines_fast.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 /i"C:\mcc18\h" "ifi_startup.c" -fo="ifi_startup.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 /i"C:\mcc18\h" "printf_lib.c" -fo="printf_lib.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 /i"C:\mcc18\h" "user_routines.c" -fo="user_routines.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 /i"C:\mcc18\h" "ifi_utilities.c" -fo="ifi_utilities.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 /i"C:\mcc18\h" "main.c" -fo="main.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mplink.exe" /l"C:\mcc18\lib" "C:\VexCode\18f8520user.lkr" "C:\VexCode\user_routines_fast.o" "C:\VexCode\ifi_startup.o" "C:\VexCode\printf_lib.o" "C:\VexCode\user_routines.o" "C:\VexCode\ifi_utilities.o" "C:\VexCode\main.o" "C:\VexCode\Vex_2008_library.lib" /o"VexUserCode.cof"
MPLINK 3.90, Linker
Copyright (c) 2004 Microchip Technology Inc.
Errors : 0

MP2COD 3.90, COFF to COD File Converter
Copyright (c) 2004 Microchip Technology Inc.
Errors : 0

MP2HEX 3.90, COFF to HEX File Converter
Copyright (c) 2004 Microchip Technology Inc.
Errors : 0

Loaded C:\VexCode\VexUserCode.cof.
BUILD SUCCEEDED: Wed Aug 04 00:08:48 2010

once again thanks for all your help!! Happy programming!
  #8   Spotlight this post!  
Unread 03-08-2010, 14:00
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,835
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: Error - Invalid 18f8520 header file! Vex Robotics Kit

Great!

This error usually seems to be a mismatch between the versions of the C18 software, the Vex libraries, and the program.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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
Header File Missing BloodSoakedTear Programming 1 26-02-2006 16:54
Error in header file p18f8520.h !!! RbtGal1351 Programming 3 17-01-2005 16:03
error - Invalid 18f8520 header file! vtrehan Programming 2 16-11-2004 08:31
Header File error message Mike Yan Programming 2 09-02-2004 11:31
Needing A header file jweric Programming 19 23-01-2004 10:25


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

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