Cross dev. tool chain Linux -> Motorola MVME162
Takao ISHIDA
ishida@gol.com
Tue Feb 16 02:39:00 GMT 1999
At 18:16 1999-02-15 +0100, Francois wrote:
> Got a Linux PC based and i'd like to setup a cross tools chain for Motorola
> MVME162 (debugger '162DBug'). I've already downloaded EGCS-1.1.1,
> binutils-2.9.1, gdb-4.7 and newlib-1.8.1...so the question is :
> Which way should i setup newlib to make it understand 162Dbug primitives
> ?
I have MVME162LX-200 board(cpu 68LC040, mem 1MB).
I think this debugger(162Bug) is similar to the CPU32bug.
(I don't have CPU32 board, but BUG commands are...)
I haven't egcs, I builded m68k-coff from the sources:
binutils-2.9.1.0.15
gcc-2.7.2.3, crossgcc-gcc-2.7.2.3.patch
newlib-1.8.1
gdb-4.17
with host=i586-linux, target=m68k-coff, prefix=/x68k
all done with no problems.
FAQ-0.8.2 is very useful. Thanks.
To use remote debugging by the GDB(m68k-coff-gdb),
change some code of gdb-4.17/gdb/cpu32bug-rom.c.
download command "lo\r" -> "lo 0\r"
monitor command prompt "CPU32Bug>" -> "162-Bug>"
then, re-build the m68k-coff-gdb.
(befor re-build, backup the original m68k-coff-gdb
is a good idea.)
The target program of exception vectors should be
set properly(162Bug catch the exceptions),
and dosen't need any stubs of libgloss.
Compile target program by m68k-coff-gcc with
-m68020 -msoft-float and -g option for debug,
then link by m68k-coff-ld.
68LC040 has no co-processor, linking libraries are:
/x68k/m68k-coff/lib/m68020/mosft-float/libc.a
/x68k/m68k-coff/lib/m68020/mosft-float/libmvme162.a
/x68k/lib/gcc-lib/m68k-coff/2.7.2.3/m68020/msoft-float/libgcc.a
(libm and libg are not need for my test program)
And generate s-record code by m68k-coff-objcopy
with -O serec option.(-R .bss is reject the .bss)
Connect the serial-cable MVME162LX(console-1) to
the host(/dev/cua0). (default speed is 9600bps)
Run m68k-coff-gdb.
(gdb) file test.bin (load binary to host)
(gdb) target cpu32bug /dev/cua0 (connect to target)
(gdb) load test.srec (load s-record to target)
(gdb) (ready for debug comand break,run,next,...)
If target program dosen't reach the any break-points,
push ABORT-switch of the target(MVME162), then you get
the control of GDB.
Thanks.
-- ishi <ishida@gol.com>
ISHIDA Engineering Inc. Osaka, Japan
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.
More information about the crossgcc
mailing list