How to build application to run under the ppc simulator?

Peter Barada
2003-04-09T04:40:33Z

I'm trying to get a handle on how the ppc simulator runs.

I've built a --target=ppc-eabi toolchain, and I've built a tiny little
test program:

int a,b;
int foo(void)
{
a = 0x1234
b = 0x5678;
}

I built it with 'ppc-eabi-gcc -o test -g test.c' and fire up
ppc-eabi-gcc on test, and execute:

tar sim
load
run

and it bombs with:

>Program terminated with signal SIGSEGV, Segmentation fault.
>The program no longer exists.
>[Switching to process 0]
>(gdb)

I'm confused as to how I build/link a program to run under the
simulator. My real goal is to extract from the ppc simulator what I
need to build a coldfire simulator.

Any comments/ideas are *most* appreciated

--
Peter Barada
peter@baradas.org