public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] ARM Thumb - not working under Linux either
@ 2001-02-08 11:01 Lewin A.R.W. Edwards
  2001-02-09  9:46 ` Jonathan Larmour
  2001-02-09 10:15 ` Bart Veer
  0 siblings, 2 replies; 7+ messages in thread
From: Lewin A.R.W. Edwards @ 2001-02-08 11:01 UTC (permalink / raw)
  To: ecos-discuss

Today I installed a Red Hat 6.1 system just to see if I could get Thumb 
compiler support. I successfully built binutils 2.10 and gdb 5.0 and gcc 
(CVS snapshot from last week), all configured for arm-elf.

The problem is that now when I try to build eCos (1.3.1) I get the 
following error:

arm-elf-gcc -c -I/ARMDigi/ecos/install/include 
-I/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1 
-I/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/src 
-I/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/tests -I. 
-I/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/src/debug/ -mcpu=arm7tdmi 
-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef 
-Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti 
-fno-exceptions -fvtable-gc -finit-priority -mthumb 
-Wp,-MD,src/debug/dbg_gdb.tmp -o src/debug/kernel_dbg_gdb.o 
/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/src/debug/dbg_gdb.cxx
/tmp/ccSGafJS.s: Assembler messages:
/tmp/ccSGafJS.s:544: Error: byte or halfword not valid for base register
make[1]: *** [src/debug/dbg_gdb.o.d] Error 1
make[1]: Leaving directory '/ARMDigi/ecos/kernel/v1_3_1'
make: *** [build] Error 2

This is weird. Any suggestions? Can't be my OS this time. I am guessing 
that the arm-elf binutils can't work with thumb instructions, but I can't 
be sure of course.

Also, "ecosconfig new edb7xxx" creates a very empty kind of file. I was 
looking for the place to enable CYGHWR_THUMB, and I couldn't find it, 
because it's not in there. I had to copy the Windows-generated ecc across 
and modify it appropriately.
=== Lewin A.R.W. Edwards (Embedded Engineer)
Work: http://www.digi-frame.com/
Personal: http://www.zws.com/ and http://www.larwe.com/

"Und setzet ihr nicht das Leben ein,
Nie wird euch das Leben gewonnen sein."

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] ARM Thumb - not working under Linux either
  2001-02-08 11:01 [ECOS] ARM Thumb - not working under Linux either Lewin A.R.W. Edwards
@ 2001-02-09  9:46 ` Jonathan Larmour
  2001-02-09 12:47   ` Lewin A.R.W. Edwards
  2001-02-09 10:15 ` Bart Veer
  1 sibling, 1 reply; 7+ messages in thread
From: Jonathan Larmour @ 2001-02-09  9:46 UTC (permalink / raw)
  To: Lewin A.R.W. Edwards; +Cc: ecos-discuss

"Lewin A.R.W. Edwards" wrote:
> 
> Today I installed a Red Hat 6.1 system just to see if I could get Thumb
> compiler support. I successfully built binutils 2.10 and gdb 5.0 and gcc
> (CVS snapshot from last week), all configured for arm-elf.
> 
> The problem is that now when I try to build eCos (1.3.1) I get the
> following error:
> 
> arm-elf-gcc -c -I/ARMDigi/ecos/install/include
> -I/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1
> -I/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/src
> -I/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/tests -I.
> -I/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/src/debug/ -mcpu=arm7tdmi
> -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef
> -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti
> -fno-exceptions -fvtable-gc -finit-priority -mthumb
> -Wp,-MD,src/debug/dbg_gdb.tmp -o src/debug/kernel_dbg_gdb.o
> /opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/src/debug/dbg_gdb.cxx
> /tmp/ccSGafJS.s: Assembler messages:
> /tmp/ccSGafJS.s:544: Error: byte or halfword not valid for base register
> make[1]: *** [src/debug/dbg_gdb.o.d] Error 1
> make[1]: Leaving directory '/ARMDigi/ecos/kernel/v1_3_1'
> make: *** [build] Error 2
> 
> This is weird. Any suggestions? Can't be my OS this time. I am guessing
> that the arm-elf binutils can't work with thumb instructions, but I can't
> be sure of course.

It's a bug in gcc's reload. I've talked with people on the binutils list
about it - they need a _small_ testcase exhibiting the problem, but I
haven't time to do it (nor will I have time next week).

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] ARM Thumb - not working under Linux either
  2001-02-08 11:01 [ECOS] ARM Thumb - not working under Linux either Lewin A.R.W. Edwards
  2001-02-09  9:46 ` Jonathan Larmour
@ 2001-02-09 10:15 ` Bart Veer
  2001-02-09 12:55   ` Lewin A.R.W. Edwards
  1 sibling, 1 reply; 7+ messages in thread
From: Bart Veer @ 2001-02-09 10:15 UTC (permalink / raw)
  To: larwe; +Cc: ecos-discuss

>>>>> "Lewin" == Lewin A R W Edwards <larwe@larwe.com> writes:

    Lewin> Today I installed a Red Hat 6.1 system just to see if I
    Lewin> could get Thumb compiler support. I successfully built
    Lewin> binutils 2.10 and gdb 5.0 and gcc (CVS snapshot from last
    Lewin> week), all configured for arm-elf.

Apart from the other problems, please note that there was a recent
change to gcc (January 21st according to gcc.gnu.org) affecting the
way that the header file dependency information is generated. The new
format is incompatible with the current eCos build system: it should
not prevent the initial build of eCos itself, but it would prevent
subsequent rebuilds and it might also prevent building of test cases.
The problem needs further investigation, but so far we have not found
a simple solution that will work reliably with both the old and new
formats.

Bart

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] ARM Thumb - not working under Linux either
  2001-02-09  9:46 ` Jonathan Larmour
@ 2001-02-09 12:47   ` Lewin A.R.W. Edwards
  2001-02-09 13:48     ` Jonathan Larmour
  0 siblings, 1 reply; 7+ messages in thread
From: Lewin A.R.W. Edwards @ 2001-02-09 12:47 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: ecos-discuss

Hello Jonathan,

> > /tmp/ccSGafJS.s:544: Error: byte or halfword not valid for base register
> > make[1]: *** [src/debug/dbg_gdb.o.d] Error 1
>
>It's a bug in gcc's reload. I've talked with people on the binutils list

Good, glad to know it is a known/recogized problem and not the evil demon 
riding on my shoulder. And at least now I can build the CVS sources of 
eCos, which is a big step.

Do you have any insight on why I can't get eCos compiled with Thumb 
interworking? It would be an acceptable workaround for me if I could have 
the OS in 32-bit mode and my app in Thumb mode, since the friskier parts 
are all in my app anyway. At the moment, we are only demoing the technology 
so it isn't vital to get everything tweaked to perfection; the final 
firmware doesn't have to ship until Q3 :)

Thanks for the response.

=== Lewin A.R.W. Edwards (Embedded Engineer)
Work: http://www.digi-frame.com/
Personal: http://www.zws.com/ and http://www.larwe.com/

"Und setzet ihr nicht das Leben ein,
Nie wird euch das Leben gewonnen sein."

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] ARM Thumb - not working under Linux either
  2001-02-09 10:15 ` Bart Veer
@ 2001-02-09 12:55   ` Lewin A.R.W. Edwards
  0 siblings, 0 replies; 7+ messages in thread
From: Lewin A.R.W. Edwards @ 2001-02-09 12:55 UTC (permalink / raw)
  To: bartv; +Cc: ecos-discuss

Hi Bart,

>change to gcc (January 21st according to gcc.gnu.org) affecting the
>way that the header file dependency information is generated. The new
>format is incompatible with the current eCos build system: it should
>not prevent the initial build of eCos itself, but it would prevent
>subsequent rebuilds and it might also prevent building of test cases.

This isn't a big problem to me, but thanks for the heads-up. Some odd 
behaviors with the Windows tools have led me to routinely delete 
_everything_ and rebuild from scratch whenever I change any options.

(And compiling eCos is _so_ much faster under Linux vs Cygwin that this 
process is zero hassle anyway. I thought it had failed the first time I 
tried it, because it was over so quickly).

=== Lewin A.R.W. Edwards (Embedded Engineer)
Work: http://www.digi-frame.com/
Personal: http://www.zws.com/ and http://www.larwe.com/

"Und setzet ihr nicht das Leben ein,
Nie wird euch das Leben gewonnen sein."

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] ARM Thumb - not working under Linux either
  2001-02-09 12:47   ` Lewin A.R.W. Edwards
@ 2001-02-09 13:48     ` Jonathan Larmour
  2001-02-10 18:43       ` Lewin A.R.W. Edwards
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Larmour @ 2001-02-09 13:48 UTC (permalink / raw)
  To: Lewin A.R.W. Edwards; +Cc: ecos-discuss

"Lewin A.R.W. Edwards" wrote:
> 
> Hello Jonathan,
> 
> > > /tmp/ccSGafJS.s:544: Error: byte or halfword not valid for base register
> > > make[1]: *** [src/debug/dbg_gdb.o.d] Error 1
> >
> >It's a bug in gcc's reload. I've talked with people on the binutils list
> 
> Good, glad to know it is a known/recogized problem and not the evil demon
> riding on my shoulder. And at least now I can build the CVS sources of
> eCos, which is a big step.
> 
> Do you have any insight on why I can't get eCos compiled with Thumb
> interworking? It would be an acceptable workaround for me if I could have
> the OS in 32-bit mode and my app in Thumb mode, since the friskier parts
> are all in my app anyway. At the moment, we are only demoing the technology
> so it isn't vital to get everything tweaked to perfection; the final
> firmware doesn't have to ship until Q3 :)

I had a quick look. What you are seeing is messages like the following?

home/jlarmour/sourceware/test/arm-elf/H-i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.97/../../../../arm-elf/bin/ld:
_div_df.o(__divdf3): warning: interworking not enabled.

This object is actually from libgcc - part of the compiler. It has not been
built with -mthumb-interwork.

You probably need to edit (in your gcc sources) gcc/config/arm/t-arm-elf
and uncomment:

# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
# MULTILIB_DIRNAMES   += normal interwork
# MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*

Then rebuild your compiler from scratch.

If that works, I'll add it to the thumb gcc building instructions.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] ARM Thumb - not working under Linux either
  2001-02-09 13:48     ` Jonathan Larmour
@ 2001-02-10 18:43       ` Lewin A.R.W. Edwards
  0 siblings, 0 replies; 7+ messages in thread
From: Lewin A.R.W. Edwards @ 2001-02-10 18:43 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: ecos-discuss

Hello Jonathan,

> > Do you have any insight on why I can't get eCos compiled with Thumb
> > interworking? It would be an acceptable workaround for me if I could have
>
>I had a quick look. What you are seeing is messages like the following?
>
>home/jlarmour/sourceware/test/arm-elf/H-i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.97/../../../../arm-elf/bin/ld:
>_div_df.o(__divdf3): warning: interworking not enabled.
>
>This object is actually from libgcc - part of the compiler. It has not been
>built with -mthumb-interwork.

Yeah, and thank you for pointing out this very dumb mistake. I didn't think 
of libgcc at all; I had this feeling in my head that all I was linking was 
eCos and my app, despite having written the makefile by hand :/

>You probably need to edit (in your gcc sources) gcc/config/arm/t-arm-elf
>and uncomment:
>
># MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
># MULTILIB_DIRNAMES   += normal interwork
># MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*

Excellent suggestion, thanks. I will try that tonight or tomorrow. Right 
now I am wrestling with a couple of sourcefiles that no longer compile 
under the new gcc (they are part of mpeg2dec and it seems to be a new 
preprocessor bug).

=== Lewin A.R.W. Edwards (Embedded Engineer)
Work: http://www.digi-frame.com/
Personal: http://www.zws.com/ and http://www.larwe.com/

"Und setzet ihr nicht das Leben ein,
Nie wird euch das Leben gewonnen sein."

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-02-10 18:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-08 11:01 [ECOS] ARM Thumb - not working under Linux either Lewin A.R.W. Edwards
2001-02-09  9:46 ` Jonathan Larmour
2001-02-09 12:47   ` Lewin A.R.W. Edwards
2001-02-09 13:48     ` Jonathan Larmour
2001-02-10 18:43       ` Lewin A.R.W. Edwards
2001-02-09 10:15 ` Bart Veer
2001-02-09 12:55   ` Lewin A.R.W. Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).