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


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

Re: 68000/RTEMS question..




On Thu, 23 Jul 1998, Geir Frode Raanes wrote:

> 1) Under Linux, will a recompilation from GCC source make changes to my
>    existing x86 GCC bintree/libtree even if 'prefix' is given or does
>    all compilation results stay in the 'prefix' indicated directory?

There is a build directory and an install directory (--prefix).  Nothing
is installed outside of the $prefix directory.  I regularly keep multiple
toolsets installed at different prefixes and they are completely
independent of one another.

> 4) EGCS, is that something a mere mortal should touch or does it break
>    more than it fix/offer?

egcs works well as a cross compiler.  I regularly compile cross systems
for the 8 CPU families RTEMS supports.

> 5) How do I configure GCC+BinUtils to target 68000 per default and not
>    68020 the --target=m68k supposedly gives? 

68000 is included and selected with a compile time switch.

> 7) What symbol table format to use.  Is ELF supported for plain 68000?
>    In any case, what is ELF32?  COFF is rumored to be a 'memory pig'
>    assigning 16 bytes to any variable.  True?  a.out reportedly use a
>    'jmp __main' into a enduser supplied crt0.o.  This I can handle and
>    actually use for initializing as long as nothing like the stack is
>    touched beforehand.  Is there a list somewhere as to what the egg or
>    hen libraries libc/newlic actually contain and what constructions make
>    explicit or - even more scaring to me - implicit calls to them?  
>    Is there a price to be paid for the more advanced ELF format?

I think COFF is the object format of choice for embedded 68k work.  

> 8) Is there a X11 based frontend for GDB supporting a m68k configuration?
>    (I have seen documentation specifically excepting m68k from the list.)

There are a handful of frontends for gdb.  AFAIK they should all work fine
with any cross configuration of gdb.  You just have to make sure you start
gdb correctly.  Someone more knowledgeable on them can give you hints.
The erc32ccs (embedded sparc toolset) includes ddd I think.  

> 9) How do I actually write an interrupt handler for m68k in GCC?

If not using RTEMS, you write an assembly language wrapper which invokes
C.  This wrapper has to save/restore d[01]/a[01] as  minimum.

If using RTEMS, you can simply do this:

rtems_interrupt_catch(MY_ISR, MY_VECTOR, &OLD_ISR) 

And hook the C routine.

> 10) I hope the compilation of the linker extracts som useful information
>     om how to do section allocation and what sections GCC generate.
>     Where is this info present on the net?

The GNU ld manual is the official reference.  libgloss with newlib and
RTEMS include plenty of examples.

> 11) Does RTEMS require 68020 at the minimum or will plain 68000 do?

Works on just about any m68k variant you can throw at it including 683xx,
680x0, and ColdFire.  

--joel