endianess of MCORE processors

Nick Clifton nickc@cambridge.redhat.com
Thu Jun 20 07:38:00 GMT 2002


Hi Mark,

> I've compiled the binutils,gcc,newlib for the MCORE processor
> (successfully I might add) only to find later that there is an
> endian-issue. I searched on the binutils archives and found where
> Nick had a request from Motorola to change the endianess of the
> MCORE port to default to little-endian. This works
> correctly. Problem is... I know they released the processor as big
> endian. I look at all the S-records the produced with their
> Metrowerks application and it's big-endian but the gnu tools output
> little endian... It appears as though at compile time this can be
> forced (I think) but that's it...
> 
> What should be done?

The compiler and assembler both support command line switches to
select big-endian code generation.  For the compiler use:

        -mbig-endian

and for gas use:

        -EB

(Note if you are driving gas from gcc then use the gcc switch).

Cheers
        Nick




More information about the Binutils mailing list