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():
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:
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. :’(