Go to Post Having someone with as much mainstream appeal as will.i.am is a great strategy to draw large amounts of attention to a program that has been relatively hidden to the masses. - Karthik [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 14-01-2006, 16:16
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Creating new MPLab Project

So today I tried opening up the '06 code on my MPLAB 6.3. It wouldn't open, so I figured "OK, I can just make a new project." I did that, got the correct chip to program for, etc. Now it gave me an error on
Code:
Generate_Pwms(pwm13,pwm14,pwm15,pwm16);
The error was
Quote:
C:\FIRST\code\user_routines_fast.c:143:Error [1203] too few arguments in function call
So, I did a search for Generate_Pwms. It returned
Code:
#ifdef _FRC_BOARD
  /* located in ifi_library.lib */
void Generate_Pwms(unsigned char pwm_13,unsigned char pwm_14,
				   unsigned char pwm_15,unsigned char pwm_16);
#else
  /* located in ifi_library.lib */
void Generate_Pwms(unsigned char pwm_1,unsigned char pwm_2,
				   unsigned char pwm_3,unsigned char pwm_4,
				   unsigned char pwm_5,unsigned char pwm_6,
				   unsigned char pwm_7,unsigned char pwm_8);
#endif
So I assume it is using the second function prototype. This is probably because I neglected to set the pre-processor _FRC_BOARD. I looked in all the menus and such, but couldn't find a listing of pre-processor directives and their values. How do I change that value?

Thanks
__________________
http://www.mikesorrenti.com/
  #2   Spotlight this post!  
Unread 14-01-2006, 18:13
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,112
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: Creating new MPLab Project

I don't have a copy of MPLAB handy to check, but I'm pretty sure you'll find a "Compiler Options" choice under the Project menu.
  #3   Spotlight this post!  
Unread 14-01-2006, 18:22
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
Re: Creating new MPLab Project

With your project open in MPLAB:

Project > Build Options > Project

There, select the MPLAB C18 tab and, under Macro Definitions, add _FRC_BOARD.

You can also enable code optimizations by editing the "-Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-" strings.

These two posts discuss it in more detail.
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383
  #4   Spotlight this post!  
Unread 14-01-2006, 19:09
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Creating new MPLab Project

Ok, so I did that. I also had to have a custom error suppressantt added to my build options, so I now use the "User alternate settings" function. So to add a macro, I found out that I needed to append -D_MACRO_NAME to my build options. My total build options are now
Code:
-D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
But now I get the error
Quote:
Executing: "C:\Program Files\MPLAB IDE\MCHIP_Tools\mplink.exe" /l"c:\mcc18\lib" "18f8520.lkr" "C:\FIRST\code\camera.o" "C:\FIRST\code\ifi_startup.o" "C:\FIRST\code\ifi_utilities.o" "C:\FIRST\code\main.o" "C:\FIRST\code\serial_ports.o" "C:\FIRST\code\terminal.o" "C:\FIRST\code\tracking.o" "C:\FIRST\code\user_routines.o" "C:\FIRST\code\user_routines_fast.o" "C:\FIRST\code\FRC_alltimers.lib" "C:\FIRST\code\FRC_alltimers_8520.lib" "C:\FIRST\code\FRC_library.lib" "C:\FIRST\code\FRC_library_8520.lib" /o"FRC.cof"
MPLINK 3.50, Linker
Copyright (c) 2003 Microchip Technology Inc.
Assertion failed: 0, file ..\..\mplink\LanguageToolShared/mgproc.c, line 873

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Any idea of what's wrong now?
__________________
http://www.mikesorrenti.com/
  #5   Spotlight this post!  
Unread 15-01-2006, 14:26
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Creating new MPLab Project

Quote:
Originally Posted by Mike
Ok, so I did that. I also had to have a custom error suppressantt added to my build options, so I now use the "User alternate settings" function. So to add a macro, I found out that I needed to append -D_MACRO_NAME to my build options. My total build options are now
Code:
-D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
But now I get the error


Any idea of what's wrong now?
I believe this is akin to the infamous syntax error. It decided it didn't like you, or something.

First try cleaning the project and rebuilding (in case of file corruption). Then try changing some compilation options. (eg, optimization)
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
Programming Vex w/ MPLab dababyjebus FIRST Tech Challenge 27 25-04-2008 09:11
openFIRST Project Announces Pending Deadline for End of Support for Old Versions Timothy D. Ginn FIRST-related Organizations 0 11-07-2005 22:40
Printing of a project in MPLAB DanDon Programming 0 10-01-2005 21:10


All times are GMT -5. The time now is 08:05.

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