Dan Ginzel

PE 2.96 to 3.07 migration

Discussion created by Dan Ginzel on Jul 6, 2010
Latest reply on Jul 7, 2010 by Dan Ginzel

Greetings. 

 

Quick background. The last time I wrote any firmware was about 25 years ago and back then I didn't have any tools like the Processor Expert to generate infrastructure code. Today, my primary job is as a software developer.

 

I have been given a board and corresponding source that was originally compiled with an older version of CodeWarrior and has parts generated by Processor Expert version 2.96. The first step was to compile the existing source and burn it. No problem here -- it worked as expected.  Next, I made the first mod is in the user code. No problem here either as I was able to compile and burn the change successfully. 

 

Here's the kicker: Modification two is turns out to be in the Processor Expert section to change the period of TPM10 from 500us to 750us. However when I make this change, it regenerates what seems to be its own code and now the project will not compile. All errors are in the generated code and there are too many differences to make reasonable sense of. 

 

The main difference that I cannot reconcile is in vectors.c, in particular Cpu_VicgInterrupt being reports as undefined. (See below for the complete difference.)

 

I'm using the current version of CodeWarrior "special" as this project is well within the limits and generated code reports:

**     Processor Expert 3.07 [04.34]

 

The purpose of this posting is to seek advice on the issues, pitfalls and techniques for migrating this code. In addition, is there a reference on the constants that might assist me in this migration?

 

Thank you very much for any input or information that might be offered here. I will be happy to provide any additional information as I am able. 

 

Dan 

 

 

Addendum from vectors.c to illustrate the differences in the fundamental structure of the generated source:

 

As generated by PE 2.96:

 

 

void (* const _vect[])() @0xFFCC = {   // Interrupt table

           ISR_RTI,

           IIC_Interrupt,

           ADC_Interrupt,

           KBD_Interrupt,

           SCI2TX_Interrupt,

           SCI2RX_Interrupt,

           SCI2ERR_Interrupt,

           SCI1TX_Interrupt,

           SCI1RX_Interrupt,

           SCI1ERR_Interrupt,

           SPI_Interrupt,

           TPM2OVR_Interrupt,

           TPM2CH4_Interrupt,

           TPM2CH3_Interrupt,

           TPM2CH2_Interrupt,

           TPM2CH1_Interrupt,

           TPM2CH0_Interrupt,

           TPM1OVR_Interrupt,

           TPM1CH2_Interrupt,

           TPM1CH1_Interrupt,

           IRBaseTimer_Interrupt,

           Cpu_OnClockMonitorInt,

           LVD_Interrupt,

           IRQPIN_Interrupt,

           Cpu_SWIInterrupt,

           _EntryPoint

   };

 

 

 

 

As generated by PE 3.07:

 

void (* near const _vect[])(void) @0xFFCC = { /* Interrupt vector table */
         Cpu_Interrupt,                /* Int.no. 25 Vrti (at FFCC)                  Unassigned */
         Cpu_Interrupt,                /* Int.no. 24 Viic1 (at FFCE)                 Unassigned */
         Cpu_Interrupt,                /* Int.no. 23 Vatd1 (at FFD0)                 Unassigned */
         Cpu_Interrupt,                /* Int.no. 22 Vkeyboard1 (at FFD2)            Unassigned */
         Cpu_Interrupt,                /* Int.no. 21 Vsci2tx (at FFD4)               Unassigned */
         Cpu_Interrupt,                /* Int.no. 20 Vsci2rx (at FFD6)               Unassigned */
         Cpu_Interrupt,                /* Int.no. 19 Vsci2err (at FFD8)              Unassigned */
         Cpu_Interrupt,                /* Int.no. 18 Vsci1tx (at FFDA)               Unassigned */
         Cpu_Interrupt,                /* Int.no. 17 Vsci1rx (at FFDC)               Unassigned */
         Cpu_Interrupt,                /* Int.no. 16 Vsci1err (at FFDE)              Unassigned */
         Cpu_Interrupt,                /* Int.no. 15 Vspi1 (at FFE0)                 Unassigned */
         Cpu_Interrupt,                /* Int.no. 14 Vtpm2ovf (at FFE2)              Unassigned */
         Cpu_Interrupt,                /* Int.no. 13 Reserved12 (at FFE4)            Unassigned */
         Cpu_Interrupt,                /* Int.no. 12 Reserved13 (at FFE6)            Unassigned */
         Cpu_Interrupt,                /* Int.no. 11 Reserved14 (at FFE8)            Unassigned */
         Cpu_Interrupt,                /* Int.no. 10 Vtpm2ch1 (at FFEA)              Unassigned */
         Cpu_Interrupt,                /* Int.no.  9 Vtpm2ch0 (at FFEC)              Unassigned */
         Cpu_Interrupt,                /* Int.no.  8 Vtpm1ovf (at FFEE)              Unassigned */
         Cpu_Interrupt,                /* Int.no.  7 Reserved18 (at FFF0)            Unassigned */
         Cpu_Interrupt,                /* Int.no.  6 Vtpm1ch1 (at FFF2)              Unassigned */
         IRBaseTimer_Interrupt,        /* Int.no.  5 Vtpm1ch0 (at FFF4)              Used */
         Cpu_VicgInterrupt,            /* Int.no.  4 Vicg (at FFF6)                  Used */
         Cpu_Interrupt,                /* Int.no.  3 Vlvd (at FFF8)                  Unassigned */
         Cpu_Interrupt,                /* Int.no.  2 Virq (at FFFA)                  Unassigned */
         Cpu_SWIInterrupt,             /* Int.no.  1 Vswi (at FFFC)                  Used */
         _EntryPoint                   /* Int.no.  0 Vreset (at FFFE)                Reset vector */
};

 

void (* near const _vect[])(void) @0xFFCC = { /* Interrupt vector table */

         Cpu_Interrupt,                /* Int.no. 25 Vrti (at FFCC)                  Unassigned */

         Cpu_Interrupt,                /* Int.no. 24 Viic1 (at FFCE)                 Unassigned */

         Cpu_Interrupt,                /* Int.no. 23 Vatd1 (at FFD0)                 Unassigned */

         Cpu_Interrupt,                /* Int.no. 22 Vkeyboard1 (at FFD2)            Unassigned */

         Cpu_Interrupt,                /* Int.no. 21 Vsci2tx (at FFD4)               Unassigned */

         Cpu_Interrupt,                /* Int.no. 20 Vsci2rx (at FFD6)               Unassigned */

         Cpu_Interrupt,                /* Int.no. 19 Vsci2err (at FFD8)              Unassigned */ 

        Cpu_Interrupt,                /* Int.no. 18 Vsci1tx (at FFDA)               Unassigned */

         Cpu_Interrupt,                /* Int.no. 17 Vsci1rx (at FFDC)               Unassigned */

         Cpu_Interrupt,                /* Int.no. 16 Vsci1err (at FFDE)              Unassigned */

         Cpu_Interrupt,                /* Int.no. 15 Vspi1 (at FFE0)                 Unassigned */

         Cpu_Interrupt,                /* Int.no. 14 Vtpm2ovf (at FFE2)              Unassigned */

         Cpu_Interrupt,                /* Int.no. 13 Reserved12 (at FFE4)            Unassigned */

         Cpu_Interrupt,                /* Int.no. 12 Reserved13 (at FFE6)            Unassigned */

         Cpu_Interrupt,                /* Int.no. 11 Reserved14 (at FFE8)            Unassigned */

         Cpu_Interrupt,                /* Int.no. 10 Vtpm2ch1 (at FFEA)              Unassigned */

         Cpu_Interrupt,                /* Int.no.  9 Vtpm2ch0 (at FFEC)              Unassigned */

         Cpu_Interrupt,                /* Int.no.  8 Vtpm1ovf (at FFEE)              Unassigned */

         Cpu_Interrupt,                /* Int.no.  7 Reserved18 (at FFF0)            Unassigned */

         Cpu_Interrupt,                /* Int.no.  6 Vtpm1ch1 (at FFF2)              Unassigned */

         IRBaseTimer_Interrupt,        /* Int.no.  5 Vtpm1ch0 (at FFF4)              Used */

         Cpu_VicgInterrupt,            /* Int.no.  4 Vicg (at FFF6)                  Used */

         Cpu_Interrupt,                /* Int.no.  3 Vlvd (at FFF8)                  Unassigned */

         Cpu_Interrupt,                /* Int.no.  2 Virq (at FFFA)                  Unassigned */

         Cpu_SWIInterrupt,             /* Int.no.  1 Vswi (at FFFC)                  Used */

         _EntryPoint                   /* Int.no.  0 Vreset (at FFFE)                Reset vector */

};

Outcomes