Problem with latest snapshot and Coldfire target

Joel Sherrill joel.sherrill at
Tue Oct 22 13:14:45 UTC 2002

I owe Fabrizio an apology.  He sent me this privately before sending
it to the list and I have been too overwhelmed to get to it.
You had so much to look at. :)

> Fabrizio Pirovano wrote:
> Hi Joel ,
> I am working with 20021007 snapshot and the latest toolchain (gcc3.2
> etc.)   and my coldfire platform. I constate the following problems:
> 1) crtbegin.o and crtend.o are not good for Coldfire because inside
> they use the <bsr> instruction  in place of  <jsr>. I use the old
> version of files and now all work fine.

>From what I can tell, this is because they are not multilib'ed.
So the same version is used for all cpu model options.  It is
on some other CPUs.  So I think the problem is as simple
as adding something like EXTRA_MULTILIB_PARTS (see gcc/config/sh/t-elf
an example) to config/m68k/t-crtstuff.   I am generating a patch to
attempt to address this now and will be building m68k gcc/newlib RPMs to
see if the files are now multilibed.  

> 2) In directory libmisc there are three little bugs due the new type
> related to <object-> name>. You find attached the patch that I use.
> Please verify.

The patch to mon-manager.c looks to be correct.  I will apply it.
Thanks for spotting this

> 3) I found problems with gcc 3.2 and <-O4 -fomit-frame-pointer
> option>:
> If I compile my application without optimization all work fine but if
> I optimize my programs crash.
> I found a evidence of almost one gcc error (see file gccproblems.pdf)
> Some explications:
> <ii> is a counter declared <short int> and used in a <for()>
> instruction.  gcc3.2 put it in frame position -10(a6).
> As you can see in 1E85E it is treated as word but.... in in 1E8A0 it
> is used as long  : <add.l> !!!!
> in 1E8A8 the test of end loop is made correctly as short! The result
> is that loop controlled by <ii> never finish!

As I explained to Chris .. please file this as a GCC PR with as short
a test case as possible.  cc me and ccj AT (Chris Johns) on the 
gcc PR.  Chris had the good idea to follow up with a corresponding
RTEMS PR on the tools so we will know to look at.

> 4) when I do <make install> the following file are missing in the
> install dir:
> start.o      (intentionally?)
> linkcmds  (intentionally?)

These two should be installed.  It is the responsibility of the
BSP's Makefiles to make it happen though.  Which BSP are you using?
If custom, then you are missing a bit of Makefile magic in 
start and startup.

> tmacros.h

only used by test code shouldn't be installed.

> shm_driver.h

Only installed if --enable-multiprocessing enabled.

> buffer_test_io.h

Same as tmacros.h

> Best regards
> Fabrizio Pirovano
> P.S.
> After 20 days of test over ten 5272 CPUs I can confirm that the patch
> of Chris for r PR267 work well: all my problems of instability are
> disappeared!

YEAH!!! Good reports like this are nice to hear.

> --------------------------------------------------------------------
> THYSYS s.r.l.
> Via della Valle 67
> 20048 Carate Brianza (MI) Italy
> pirovano.thysys at
> --------------------------------------------------------------------
>                        Name: mon-manager.diff
>    mon-manager.diff    Type: unspecified type
>                              (application/octet-stream)
>                    Encoding: quoted-printable
>                  Name: check.diff
>    check.diff    Type: unspecified type (application/octet-stream)
>              Encoding: quoted-printable
>                    Name: capture.diff
>    capture.diff    Type: unspecified type (application/octet-stream)
>                Encoding: quoted-printable
>                       Name: gccproblems.pdf
>    gccproblems.pdf    Type: Portable Document Format
>                             (application/pdf)
>                   Encoding: base64

Joel Sherrill, Ph.D.             Director of Research & Development
joel at                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

More information about the users mailing list