[coldfire-gnu-discuss] Invalid code generated with gcc-4.2 fo r target m68k-rtems.

Kirspel, Kevin kevin.kirspel at optimedical.com
Mon Jun 25 19:17:16 UTC 2007


When I compile gcc and install it, there is no m5329 lib directory created.
When I look at the m68k-elf releases that you guys build I see a m5329 lib
directory.  When I run GCC and specify the -mcpu=5329 option, GCC can not
find the libraries associated with that CPU and therefore picks the 68020
libraries as a default (I don't know if this is true but it explains why
there is 68020 instructions in my output). How do I get GCC to compile and
install the m5329 lib directories?  By default I see the following
processors in the lib directory

M5200, m5206, m68000, m68030, m68040, m68060, mcpu32

-----Original Message-----
From: Daniel Jacobowitz [mailto:dan at codesourcery.com] 
Sent: Monday, June 25, 2007 1:34 PM
To: Kirspel, Kevin
Cc: 'coldfire-gnu-discuss at codesourcery.com'
Subject: Re: [coldfire-gnu-discuss] Invalid code generated with gcc-4.2 for
target m68k-rtems.

On Mon, Jun 25, 2007 at 01:18:26PM -0400, Kirspel, Kevin wrote:
> I have downloaded the coldfire-4.2 source code and I have cross-compiled
it
> for the m68k-rtems target (for use with mcf5329EVB).  Everything builds
and
> installs fine.  After the tools are installed I compiled my OS.  The
> compilation of the OS completes with no errors.  When I run the OS using
> GDB, the program fails in the newlib memset() function.  The PC register
at
> the time of failure is at 0x400149ea.  I disassembled the application
(using
> m68k-rtems-objdump) and got the following output for memset():

> 400149ea:         e8c3                 0164303

This instruction does not occur in any of the memset implementations
we ship; I suspect it is a problem with your configuration when you
rebuilt the tools.

If I'm reading the disassembler table correctly, that is bftst - an
instruction present on the 68020 but not on ColdFire.


-- 
Daniel Jacobowitz
CodeSourcery



More information about the coldfire-gnu-discuss mailing list