AnsweredAssumed Answered

MM912H634 -> MM912G634 Interrupt Vector Table

Question asked by Ralph Oberle on Nov 23, 2016
Latest reply on Nov 24, 2016 by Radek Sestak

Hello all,

 

I started coding for the MM912H634 Eval Kit and got my software working including the provided Interrupt Vector Table from NXP support (Thank you again for your work!) Now I wanted to port it all to the final hardware which uses a MM912G634 chip. If i try to link the files i get the following error for all my interrupt vectors (from which I only use one):

Link Error   : L1907: Fixup overflow in _InterruptVectorTable, to Default_Interrupt type 1, at offset 0x0

This is just the first linbe of the error list, because it is the same error for all the interrupt vectors in the interrupt vector table. Here is my vectors.c file:

#include "derivative.h"      /* derivative-specific definitions */
#include "globals.h"

#define TIM0_Interrupt  2

#pragma CODE_SEG __NEAR_SEG NON_BANKED
__interrupt void ISRTIMER(void){
   
   if(1u == B_ISR_CH0){
      B_TC0 = B_TCNT + 1000;
      //PORTA_PA0 = ~PORTA_PA0;
      TIMER_1_MS_TICK++;
      B_TFLG1_C0F = 1; 
   }
}
#pragma CODE_SEG DEFAULT


__interrupt void Default_Interrupt(void)
{
  asm(BGND);
}


/* ISR prototype @0xFF80U */
typedef void (*near tIsrFunc)(void);
/*lint -save  -e950 Disable MISRA rule (1.1) checking. */
const tIsrFunc _InterruptVectorTable[] @0xFF80 = { /* Interrupt vector table */
/*lint -restore Enable MISRA rule (1.1) checking. */
  /* ISR name                                   No.  Address  Name         */
  &Default_Interrupt,                       /* 0x40  0xFF80   Vsi          */
  &Default_Interrupt,                       /* 0x41  0xFF82   VReserved62  */
  &Default_Interrupt,                       /* 0x42  0xFF84   VReserved61  */
  &Default_Interrupt,                       /* 0x43  0xFF86   VReserved60  */
  &Default_Interrupt,                       /* 0x44  0xFF88   VReserved59  */
  &Default_Interrupt,                       /* 0x45  0xFF8A   Vlvi         */
  &Default_Interrupt,                       /* 0x46  0xFF8C   VReserved57  */
  &Default_Interrupt,                       /* 0x47  0xFF8E   VReserved56  */
  &Default_Interrupt,                       /* 0x48  0xFF90   VReserved55  */
  &Default_Interrupt,                       /* 0x49  0xFF92   VReserved54  */
  &Default_Interrupt,                       /* 0x4A  0xFF94   VReserved53  */
  &Default_Interrupt,                       /* 0x4B  0xFF96   VReserved52  */
  &Default_Interrupt,                       /* 0x4C  0xFF98   VReserved51  */
  &Default_Interrupt,                       /* 0x4D  0xFF9A   VReserved50  */
  &Default_Interrupt,                       /* 0x4E  0xFF9C   VReserved49  */
  &Default_Interrupt,                       /* 0x4F  0xFF9E   VReserved48  */
  &Default_Interrupt,                       /* 0x50  0xFFA0   VReserved47  */
  &Default_Interrupt,                       /* 0x51  0xFFA2   VReserved46  */
  &Default_Interrupt,                       /* 0x52  0xFFA4   VReserved45  */
  &Default_Interrupt,                       /* 0x53  0xFFA6   VReserved44  */
  &Default_Interrupt,                       /* 0x54  0xFFA8   VReserved43  */
  &Default_Interrupt,                       /* 0x55  0xFFAA   VReserved42  */
  &Default_Interrupt,                       /* 0x56  0xFFAC   VReserved41  */
  &Default_Interrupt,                       /* 0x57  0xFFAE   VReserved40  */
  &Default_Interrupt,                       /* 0x58  0xFFB0   VReserved39  */
  &Default_Interrupt,                       /* 0x59  0xFFB2   VReserved38  */
  &Default_Interrupt,                       /* 0x5A  0xFFB4   VReserved37  */
  &Default_Interrupt,                       /* 0x5B  0xFFB6   VReserved36  */
  &Default_Interrupt,                       /* 0x5C  0xFFB8   Vflash       */
  &Default_Interrupt,                       /* 0x5D  0xFFBA   Vflashfd     */
  &Default_Interrupt,                       /* 0x5E  0xFFBC   VReserved33  */
  &Default_Interrupt,                       /* 0x5F  0xFFBE   VReserved32  */
  &Default_Interrupt,                       /* 0x60  0xFFC0   VReserved31  */
  &Default_Interrupt,                       /* 0x61  0xFFC2   VReserved30  */
  &Default_Interrupt,                       /* 0x62  0xFFC4   VReserved29  */
  &Default_Interrupt,                       /* 0x63  0xFFC6   Vcpmuplllck  */
  &Default_Interrupt,                       /* 0x64  0xFFC8   Vcpmuocsns   */
  &Default_Interrupt,                       /* 0x65  0xFFCA   VReserved26  */
  &Default_Interrupt,                       /* 0x66  0xFFCC   VReserved25  */
  &Default_Interrupt,                       /* 0x67  0xFFCE   VReserved24  */
  &Default_Interrupt,                       /* 0x68  0xFFD0   VReserved23  */
  &Default_Interrupt,                       /* 0x69  0xFFD2   VReserved22  */
  &Default_Interrupt,                       /* 0x6A  0xFFD4   VReserved21  */
  &Default_Interrupt,                       /* 0x6B  0xFFD6   VReserved20  */
  &Default_Interrupt,                       /* 0x6C  0xFFD8   Vspi         */
  &Default_Interrupt,                       /* 0x6D  0xFFDA   VReserved18  */
  &Default_Interrupt,                       /* 0x6E  0xFFDC   VReserved17  */
  &Default_Interrupt,                       /* 0x6F  0xFFDE   VReserved16  */
  &Default_Interrupt,                       /* 0x70  0xFFE0   VReserved15  */
  &Default_Interrupt,                       /* 0x71  0xFFE2   VReserved14  */
  &Default_Interrupt,                       /* 0x72  0xFFE4   VReserved13  */
  &Default_Interrupt,                       /* 0x73  0xFFE6   VReserved12  */
  &Default_Interrupt,                       /* 0x74  0xFFE8   VReserved11  */
  &Default_Interrupt,                       /* 0x75  0xFFEA   VReserved10  */
  &Default_Interrupt,                       /* 0x76  0xFFEC   VReserved9   */
  &Default_Interrupt,                       /* 0x77  0xFFEE   VReserved8   */
  &Default_Interrupt,                       /* 0x78  0xFFF0   Vrti         */
  &ISRTIMER,                                /* 0x79  0xFFF2   Vd2di_ext    */
  &Default_Interrupt,                       /* 0x7A  0xFFF4   Vd2di_err    */
  &Default_Interrupt,                       /* 0x7B  0xFFF6   Vswi         */
  &Default_Interrupt,                        /* 0x7C  0xFFF8   Vtrap        */
};     

And my .prm file looks like this:

/* This is a linker parameter file for the MM912G634xx1xx */
NAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */

SEGMENTS  /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */

/* Register space  */
/*    IO_SEG        = PAGED         0x0000 TO   0x03FF; intentionally not defined */

/* RAM */
      RAM           = READ_WRITE    0x3800 TO   0x3FFF;

/* D-Flash */
      DFLASH        = READ_ONLY     0x0400 TO   0x0BFF;

/* non-paged FLASHs */
      ROM_4000      = READ_ONLY     0x4000 TO   0x7FFF;
      ROM_C000      = READ_ONLY     0xC000 TO   0xFEFF;
    //VECTORS       = READ_ONLY     0xFF00 TO   0xFFFF;   /* intentionally not defined: used for VECTOR commands below */
   //OSVECTORS      = READ_ONLY     0xFF80 TO   0xFFFF;   /* OSEK interrupt vectors (use your vector.o) */

/* paged FLASH:                     0x8000 TO   0xBFFF; addressed through PPAGE */
      PAGE_0E       = READ_ONLY   0x0E8000 TO 0x0EBFFF;
/*    PAGE_0D       = READ_ONLY   0x0D8000 TO 0x0DBFFF; not used: equivalent to ROM_4000 */
/*    PAGE_0F       = READ_ONLY   0x0F8000 TO 0x0FBEFF; not used: equivalent to ROM_C000 */
END

PLACEMENT /* here all predefined and user segments are placed into the SEGMENTS defined above. */
      _PRESTART,              /* Used in HIWARE format: jump to _Startup at the code start */
      STARTUP,                /* startup data structures */
      ROM_VAR,                /* constant variables */
      STRINGS,                /* string literals */
      VIRTUAL_TABLE_SEGMENT,  /* C++ virtual table segment */
    //.ostext,                /* OSEK */
      NON_BANKED,             /* runtime routines which must not be banked */
      COPY                    /* copy down information: how to initialize variables */
                              /* in case you want to use ROM_4000 here as well, make sure
                                 that all files (incl. library files) are compiled with the
                                 option: -OnB=b */

                        INTO  ROM_C000/*, ROM_4000*/;

      DEFAULT_ROM       INTO  PAGE_0E;
      //VECTORS           INTO  ROM_4000;

    //.stackstart,            /* eventually used for OSEK kernel awareness: Main-Stack Start */
      SSTACK,                 /* allocate stack first to avoid overwriting variables on overflow */
    //.stackend,              /* eventually used for OSEK kernel awareness: Main-Stack End */
    DEFAULT_RAM         INTO  RAM;


  //.vectors            INTO  OSVECTORS; /* OSEK */
END

ENTRIES /* keep the following unreferenced variables */

  _InterruptVectorTable;
  //VECTORS_vect;

    /* OSEK: always allocate the vector table and all dependent objects */
  //_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart
END

STACKSIZE 0x100

VECTOR 0 _Startup /* reset vector: this is the default entry point for a C/C++ application. */
//VECTOR 0 Entry  /* reset vector: this is the default entry point for an Assembly application. */
//INIT Entry      /* for assembly applications: that this is as well the initialization entry point */

Can somebody please help me to figure out, why it won't work on the MM912G634? I compiled the same code and programmed it onto the MM912H634 Eval board and everything works perfect.

 

I work with CW v5.1 and PE micro USB Multilink Interface with the CW debugger.

 

Greetings and thanks in advance.

Ralph

Outcomes