Khoa Tran

Fixup overflow in InitDelay, type 1 at offset 0xA

Discussion created by Khoa Tran on Jul 14, 2006
Latest reply on Jul 18, 2006 by Khoa Tran
Dear all
 
Basing on Motorola LINKit driver's sample project, I added some functions for CAN functionality and compiled successfully, but when linking the error below occured:
 
"Fixup overflow in InitDelay, type 1 at offset 0xA".
 
Notice that InitDelay is a function of original project, not added function.
 
I don't know how to handle this error and it's getting me stuck for a long time.
If anybody knows about this, please tell me.
 
Thanks in advance.
 
Below is the project's prm file and the function InitDelay
 
/*PRM file*/
 
LINK master.abs
NAMES
   ansi.lib
  /* other object files to link are passed from the IDF with the linker -Add option */
END
SECTIONS
    LIN_ZRAM    = READ_WRITE 0x0040 TO 0x00FF;          /* zero page */
    LIN_RAM     = READ_WRITE 0x0100 TO 0x03BF;          /* program data */
    LIN_STACK   = READ_WRITE 0x03C0 TO 0x043F;          /* stack */
    LIN_ROM     = READ_ONLY  0x8000 TO 0xFDFF;          /* program code & constants */
    LIN_VECTORS = READ_ONLY  0xFFD0 TO 0xFFFF;          /* interrupt vectors (use your vector.obj) */
END
PLACEMENT
    ZeroSeg, _DATA_ZEROPAGE INTO LIN_ZRAM;
    DEFAULT_ROM, ROM_VAR    INTO LIN_ROM;
    DEFAULT_RAM             INTO LIN_RAM;
    SSTACK                  INTO LIN_STACK;
    VECTORS_DATA            INTO LIN_VECTORS;
END
STACKSIZE 0x001F
ENTRIES
 _vectab
END
INIT  _Startup /* contains line replacing default _PRESTART */
MAPFILE ON
 
/*End Prm file*/
 
/*InitDelay function */
/*****************************************************************************
 * Function:        Delay
 *
 * Description:     Initialise RTI for use in Delay() function
 *
 *
 * Returns:         none
 *
 * Notes:   busfreq indicates the bus operating frequency in KHz
 *
 *
 *****************************************************************************/
void InitDelay(unsigned int busfreq)
{
 switch (busfreq)
 {
  case 8000:  TBCR = 0x16;
     break;
  default: break;
 }
}

Outcomes