Cross-compiling for target MC68360. Is this possible?

Christopher Bahns
Mon Jun 26 12:44:00 GMT 2000


I don't know any details about the MC68360, but I am currently building for the MC68306 (and will soon
be doing so for 331/332) under Windows98/NT using Cygwin 1.0, binutils, gcc, and newlib. I had some
trouble getting started but things are going good now. I assume that you'd want the same compiler that
I'm using (TARGET=m68k-coff or m68k-elf and PREFIX=/gcc-m68k) for the 68360.

I've attached a bash script that I developed to make cross-compiler builds easier, in case that helps.
I was having trouble with invalid instructions that was caused by the fact that I was not linking to
the right libgcc.a. I just sent a message to crossgcc explaining how I solved my problem. You might
have a similar problem if you don't do this too.

The solution to the problem is as follows:
I had to delete /gcc-m68k/lib/gcc-lib/m68k-coff/2.95.2/libgcc.a and instead use the libgcc.a in
/gcc-m68k/lib/gcc-lib/m68k-coff/2.95.2/m68000 (by either copying the file from the child to the parent
directory, or creating a symbolic link in the parent directory to the library in the child). I used
the 'm68000' subdirectory because the 68306 has an MC68EC000 core. There are also 'mcpu32', 'm5200',
and 'msoft-float' subdirectories which contain different builds of libgcc.a and libstdc++.a. The 68331
and 68332 have a CPU32 core, so for them I'll use the libraries in the 'mcpu32' subdirectory. If the
68360 has the CPU32 core (it should say so in the Introduction of the User's Manual, which I assume
you have), then you'll want to use the libraries in this directory as well.

Note that I was having problems with incompatible instructions until I changed which libraries I was
using. Now all seems to be going fine.

There are complete instructions for how to use the compiler-build script at the beginning of the
script itself. You should probably check the script file for carriage returns, and strip them out if
there are any. If you want I can ZIP it up and send the ZIP file, but if you extract it with WinZip
(or the like) you have to choose an option not to translate LF to CRLF. I don't think the script will
work properly with carriage returns.

Please let me know if any of this is useful or if you need anymore help. It's easy to help since I'm
just getting started and am in the middle of figuring all of this stuff out myself.


Francisco Rodriguez wrote:

> Hello all
> We've purchased a development board based around the Motorola's MC68360.
> Before dowloading and configuring the whole GNU packages (binutils and so on) to
> generate a cross-compiler for this target,
> I would like to know if this is even possible, or at least where to find the details.
> And i've read the CrossGCC-FAQ. It's section "Target Specific Info" is simply not enough (for me).
> Best regards
>         Francisco Rodriguez
> ====================================================================================
> Francisco Rodriguez Ballester                   e-mail:
> Dept. DISCA,                                    tlf:            +(34) 96 387 75 77
> Univ. Politecnica de Valencia                   fax:            +(34) 96 387 75 79
> c/Camino de Vera s/n, E-46022, VALENCIA (SPAIN)
> ====================================================================================
> ------
> Want more information?  See the CrossGCC FAQ,
> Want to unsubscribe? Send a note to
-------------- next part --------------
A non-text attachment was scrubbed...
Type: text/x-shellscript
Size: 10405 bytes
Desc: not available
URL: <>

More information about the crossgcc mailing list