OK, here is what I had to do....not very obvious to me.
1) Create a project using the "C" Stationary for the M52233DEMO.
2) I modified "main.c" and "Int_handlers.c" as follows:
/*
* File: main.c
* Purpose: sample program
*
*/
#include <stdio.h>
#include "mcf52233.h"
extern long int rti_count;
#define EVER ;;
int main()
{
long int localCnt=0;
long int lastx = 0;
// Lets get the party started
mcf5xxx_irq_enable();
PIT_Timer_Init(0,3000);
printf("Hello World in C\n\r");
fflush(stdout);
for(EVER)
{
if (++localCnt > 10000)
{
long int x = rti_count;
printf("%ld\r", (x-lastx));
fflush(stdout);
localCnt = 0;
lastx = x;
}
};
...
void rti_6th_event()
{
// fec_mii_blk_test();
}
...
3) Set the project build to "M52233DEMO UART Debug" and compiled.
4) I had to "#include "common.h"" in the file "mii.h" - compiler complained about uint8 and uint16 etc.
5) Performed a debug run.
With Hyperterm running I saw the hello world message and the number of interrupts between prints.
This took about 2 hours to finally figure out that without including the mcf52233.h header the function
declaration for PIT_Timer_Init() was not being used for setting up the stack! No error to indicate why the values I was passing in were not being used.
Any who....hope this helps.
Mark