This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: powerpc simulator questions

Vermeulen Jan <> writes:

: [...]
: However, being a complete n00b on the gdb-topic, I compiled/installed
: Insight-5.0 with the "--target=powerpc-eabi" option.
: I made a little test program, called 'destest' which simply encrypts and
: decrypts an 8 byte value. No include files are used, there is only destest.c
: I compiled it with "powerpc-eabi-gcc -g -Wl,-Tmylink.ld -o destest
: destest.c".
: mylink.ld:
: [...]
: {
:   vects (rx): ORIGIN = 0x0,  LENGTH = 1023 
:   rom1 (rx): ORIGIN = 0x400, LENGTH= 511K
:   ramcode (rwx): ORIGIN = 0x800000, LENGTH = 2048K
:   ramdata (rw): ORIGIN = 0x0A00000, LENGTH = 2048K
: }
: [...]

There are probably several problems in the details, but the main one
is that the target memory layout used by your linked powerpc program
does not match that simulated by psim ("target sim" in powerpc gdb).
Why did you use a custom linker script?  Try building your program with

    powerpc-eabi-gcc -msim FOO.c -o FOO.x

and running it with

    powerpc-eabi-run FOO.x  # to run under the stand-alone simulator
#or powerpc-eabi-gdb FOO.x  # then "target sim", etc.

- FChE

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]