Go to Post The solution to that "problem" is obvious: practice driving. - Alan Anderson [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 01-02-2007, 15:39
LieAfterLie's Avatar
LieAfterLie LieAfterLie is offline
Registered User
FRC #2028
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Hampton, VA
Posts: 35
LieAfterLie is an unknown quantity at this point
Generate_Pwms argument error in MPLAB

I get the following error when I try to compile even the raw default code:

Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\mcc18\bin\mcc18.exe" -p=18F8722 "ifi_startup.c" -fo="ifi_startup.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\Program Files\Microchip\mcc18\bin\mcc18.exe" -p=18F8722 "ifi_utilities.c" -fo="ifi_utilities.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\Program Files\Microchip\mcc18\bin\mcc18.exe" -p=18F8722 "main.c" -fo="main.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\Program Files\Microchip\mcc18\bin\mcc18.exe" -p=18F8722 "user_routines.c" -fo="user_routines.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
G:\FRC\mplab project\user_routines.c:168:Warning [2066] type qualifier mismatch in assignment
G:\FRC\mplab project\user_routines.c:192:Warning [2066] type qualifier mismatch in assignment
G:\FRC\mplab project\user_routines.c:194:Error [1203] too few arguments in function call
G:\FRC\mplab project\user_routines.c:219:Warning [2066] type qualifier mismatch in assignment
G:\FRC\mplab project\user_routines.c:236:Warning [2066] type qualifier mismatch in assignment
Halting build on first failure as requested.
BUILD FAILED: Thu Feb 01 15:30:09 2007

It occurs here in User Routines.c, the first call to Generate_Pwms():
Code:
void Process_Data_From_Master_uP(void)
{
  static unsigned char i;

  Getdata(&rxdata);   /* Get fresh data from the master microprocessor. */

  //Default_Routine();  /* Optional.  See below. */
  My_Routine();

  /* Add your own code here. (a printf will not be displayed when connected to the breaker panel unless a Y cable is used) */

  printf("Port1 Y %3d, X %3d, Fire %d, Top %d\r",pwm01,pwm05,p1_sw_trig,p1_sw_top);  /* printf EXAMPLE */

  Generate_Pwms(pwm13,pwm14,pwm15,pwm16);

  /* Example code to check if a breaker was ever tripped. */

  if (aBreakerWasTripped)
  {
    for (i=1;i<29;i++)
    {
      if (Breaker_Tripped(i))
        User_Byte1 = i;  /* Update the last breaker tripped on User_Byte1 (to demonstrate the use of a user byte) 
                            Normally, you do something else if a breaker got tripped (ex: limit a PWM output)     */
    }
  }

  Putdata(&txdata);             /* DO NOT CHANGE! */
}
The declaration is here, in ifi_utilities.h:
Code:
void Hex_output(unsigned char temp);  /* located in ifi_library.lib */

#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
I'm assuming that _FRC_BOARD wasn't defined, and the 8-argument version of Generate_Pwms() was declared instead of the 4-argument version. The first call the Generate_Pwms() is above, and it's clearly meant for the first declaration. The only other call is in user_routines_fast.c and it's the same line. I haven't found any ifi_library.lib anywhere.

I remember this same error from before and I got it compiled, but now I can't remember what I did or what was wrong. :'(
__________________
SEMPER UBI SUB UBI

Last edited by LieAfterLie : 01-02-2007 at 17:11.
 


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
Odd MPLab error? Andrew Blair Programming 2 21-01-2006 20:45
MPLab build error Derek t Programming 7 17-01-2005 09:33
MPLAB build error cabbagekid2 Programming 7 12-01-2005 13:36
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 03:55.

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