This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: Building for custom 68k or ColdFire board without OS?




On 2003/09/10 at 01:50 Toralf Lund wrote:

>I'm looking for a new way to build the software running on a custom I/O
>board we are producing, which is based on the MC68010. The board has no
>separate OS; our software calls some very simple routines built into the
>"Bug ROM" on the unit, but is otherwise fully self-contained. The
>software is traditionally compiled and linked on another 68k-based board
>running the OS-9 operating system. Some more details:
>
[Lots of stuff snipped]

I ported code written for OS-9 K&R compiler first to CrossCode (Added ANSI prototypes etc.)
and then recently to gcc. I would strongly recommend that you get the patched version that
supports the __interrupt__ attribute.
There are gcc 2.95.3 with these patches floating around as well as gcc 3.0.something. I think the
person who added these patches are trying to have them incorporated into the main branch with
version 3.4.

Below are the instructions for getting the patched 3.0 version from CVS. AFAICR the I below stands
for Peter Baradas.

Regards
   Anton Erasmus

**** Instructions to get m68k patched gcc sources ****

I've finally gotten the time to pull together what I've done to
gcc-3.0.4 to generate better code for ColdFire and put it up on my
home CVS server.

I've added support for -m5206e, -m5307, -m5407, -mcfv4e.  This version
of the compiler does indeed produce decent FPU code for ColdFire v4e,
as well as better support for btst/bset/bclr, support for the new ISA-B
instructions, as well as better prologue/epilogue code, and also
support for the interrupt attribute on functions.

I hope that those interested will try it out and email me with
compliments/complaints or suggestions on how to make it better.  I'm
trying(slowly in my spare time) to pull these changes forward into
gcc-3.2+ and I expect to add that tree to my CVS server.

Set CVSROOT in your environment to :pserver:anoncvs at baradas dot org:/home/cvs

Alternately add -d :pserver:anoncvs at baradas dot org:/home/cvs in the CVS
commands below (place it immediately after cvs, before any other arguments).

Issue the command:

cvs login

You will be prompted for a password; reply with the string "anoncvs"
(without the quotes).

Issue the command:

cvs -z 9 co xgcc

to check out the compiler/binutils/newlib sources, and you'll have in
the xgcc subdirectory the following:

Makefile
binutils-2.13
gcc-304
newlib-1.10.0

which take up about 163MB of disk space.

Execute make in the xgcc directory to bild a m68k-elf cross toolchain
which will be installed in /tmp/m68k-elf.

The obj/m68k-elf directory consumes 478MB of disk space.
The installed tools in /tmp/m68k-elf take up 154MB.

Edit the Makefile and change PREFIX to wherever you want the tools installed.



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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