I've had Linux running on this platform (MCF5484 on a custom board based on the MCF5485EVB) for several months now but though I can compile and run programs on it I always get the message "Illegal instruction" upon program completion. For example the following program:
===============================================================
#include <stdio.h>
int main ()
{
struct S1D_REGS
{
unsigned char INDEX;
unsigned long VALUE;
} aS1d_reg;
printf ("sizeof(aS1d_reg): %d bits\n", sizeof(aS1d_reg)*8);
printf ("sizeof(unsigned short): %d bits\n", sizeof(unsigned short)*8);
printf ("sizeof(unsigned int): %d bits\n", sizeof(unsigned int)*8);
printf ("sizeof(unsigned long): %d bits\n", sizeof(unsigned long)*8);
printf ("sizeof(unsigned char): %d bits\n", sizeof(unsigned char)*8);
exit (0);
}
================================================================
Output:
sizeof(aS1d_reg): 48 bits
sizeof(unsigned short): 16 bits
sizeof(unsigned int): 32 bits
sizeof(unsigned long): 32 bits
sizeof(unsigned char): 8 bits
Illegal instruction
===============================================================
Real simple program, seems to run to completion without error but before the program exits it gives that message. What gives? Every program I run does this. Any ideas....?