public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] ARM Thumb
@ 2001-04-26  9:21 Roman
  2001-04-26 10:31 ` Lewin A.R.W. Edwards
  2001-04-26 11:11 ` [ECOS] ARM Thumb Jonathan Larmour
  0 siblings, 2 replies; 10+ messages in thread
From: Roman @ 2001-04-26  9:21 UTC (permalink / raw)
  To: ecos-discuss

Hi everybody,
i have a question about ecos and thumb code.
I read this mailing list since a long time. There were and are a lot of
problems using arm7 thumb based controllers and ecos. The ecos team uses
a fixed version. I think there was at least one, who uses the normal
arm-elf-gcc (or arm-coff-gcc) with a compiler switch for generating
thumb code. Are there any experiences? Whats the best solution?

Greetings,
Roman Jordan

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

* Re: [ECOS] ARM Thumb
  2001-04-26  9:21 [ECOS] ARM Thumb Roman
@ 2001-04-26 10:31 ` Lewin A.R.W. Edwards
  2001-04-26 12:23   ` Jonathan Larmour
                     ` (2 more replies)
  2001-04-26 11:11 ` [ECOS] ARM Thumb Jonathan Larmour
  1 sibling, 3 replies; 10+ messages in thread
From: Lewin A.R.W. Edwards @ 2001-04-26 10:31 UTC (permalink / raw)
  To: Roman, ecos-discuss

>a fixed version. I think there was at least one, who uses the normal
>arm-elf-gcc (or arm-coff-gcc) with a compiler switch for generating
>thumb code. Are there any experiences? Whats the best solution?

You can't build eCos in thumb mode. There is a bug in gcc at the moment 
which makes the build operation fail. (Still there with CVS sources of Monday).

You can build eCos in ARM mode with thumb interworking enabled, as long as 
you also built newlib with interworking enabled. You can then build your 
app in thumb mode (with interworking).

There isn't a fully satisfactory solution yet.

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

"... a man who is endowed with real qualities of leadership will be tempted 
to refrain from taking part in political life; because [...] the situation 
does not call for a man who has a capacity for constructive statesmanship 
but rather for a man who is capable of bargaining for the favour of the 
majority. Thus the situation will appeal to small minds and will attract 
them accordingly."

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

* Re: [ECOS] ARM Thumb
  2001-04-26  9:21 [ECOS] ARM Thumb Roman
  2001-04-26 10:31 ` Lewin A.R.W. Edwards
@ 2001-04-26 11:11 ` Jonathan Larmour
  1 sibling, 0 replies; 10+ messages in thread
From: Jonathan Larmour @ 2001-04-26 11:11 UTC (permalink / raw)
  To: Roman; +Cc: ecos-discuss

Roman wrote:
> 
> Hi everybody,
> i have a question about ecos and thumb code.
> I read this mailing list since a long time. There were and are a lot of
> problems using arm7 thumb based controllers and ecos. The ecos team uses
> a fixed version. I think there was at least one, who uses the normal
> arm-elf-gcc (or arm-coff-gcc) with a compiler switch for generating
> thumb code. Are there any experiences? Whats the best solution?

I haven't tried it to be sure, but me and Bart (mostly Bart) arranged for
the current problem affecting the Thumb to be fixed. If you try current gcc
it may work better.

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] 10+ messages in thread

* Re: [ECOS] ARM Thumb
  2001-04-26 10:31 ` Lewin A.R.W. Edwards
@ 2001-04-26 12:23   ` Jonathan Larmour
  2001-04-26 12:30     ` Lewin A.R.W. Edwards
  2001-04-30  9:18     ` Rafael Rodríguez Velilla
  2001-04-27  0:43   ` Rafael Rodríguez Velilla
  2001-04-27  3:03   ` [ECOS] using struct II Carlos Camargo
  2 siblings, 2 replies; 10+ messages in thread
From: Jonathan Larmour @ 2001-04-26 12:23 UTC (permalink / raw)
  To: Lewin A.R.W. Edwards; +Cc: Roman, ecos-discuss

"Lewin A.R.W. Edwards" wrote:
> 
> >a fixed version. I think there was at least one, who uses the normal
> >arm-elf-gcc (or arm-coff-gcc) with a compiler switch for generating
> >thumb code. Are there any experiences? Whats the best solution?
> 
> You can't build eCos in thumb mode. There is a bug in gcc at the moment
> which makes the build operation fail. (Still there with CVS sources of Monday).

[ Jifl goes to the gcc-patches archive and checks... ]

You'll be displeased to know that the patch only got checked in on Tuesday
:-). Here's what it was BTW.

2001-04-24  Nick Clifton  <nickc@cambridge.redhat.com>

        * dwarf2out.c (mem_loc_descriptor): If a SYMBOL_REF is in the
        constant pool, use the pool's SYMBOL_REF instead.

Index: gcc/dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.263
diff -p -r1.263 dwarf2out.c
*** dwarf2out.c 2001/04/12 01:44:21     1.263
--- dwarf2out.c 2001/04/20 08:29:03
*************** mem_loc_descriptor (rtl, mode)
*** 7117,7122 ****
--- 7117,7128 ----
         pool.  */
      case CONST:
      case SYMBOL_REF:
+       /* Alternatively, the symbol in the constant pool can be referenced
+        by a different symbol.  */
+       if (GET_CODE (rtl) == SYMBOL_REF
+          && CONSTANT_POOL_ADDRESS_P (rtl))
+          rtl = get_pool_constant (rtl);
+ 
        mem_loc_result = new_loc_descr (DW_OP_addr, 0, 0);
        mem_loc_result->dw_loc_oprnd1.val_class = dw_val_class_addr;
        mem_loc_result->dw_loc_oprnd1.v.val_addr = save_rtx (rtl);


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] 10+ messages in thread

* Re: [ECOS] ARM Thumb
  2001-04-26 12:23   ` Jonathan Larmour
@ 2001-04-26 12:30     ` Lewin A.R.W. Edwards
  2001-04-30  9:18     ` Rafael Rodríguez Velilla
  1 sibling, 0 replies; 10+ messages in thread
From: Lewin A.R.W. Edwards @ 2001-04-26 12:30 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: Roman, ecos-discuss

> > You can't build eCos in thumb mode. There is a bug in gcc at the moment
> > which makes the build operation fail. (Still there with CVS sources of 
> Monday).
>
>You'll be displeased to know that the patch only got checked in on Tuesday

ROFL. I should set up my Linux box at work so that every time I turn it on, 
it updates all my CVSable modules.

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

"... a man who is endowed with real qualities of leadership will be tempted 
to refrain from taking part in political life; because [...] the situation 
does not call for a man who has a capacity for constructive statesmanship 
but rather for a man who is capable of bargaining for the favour of the 
majority. Thus the situation will appeal to small minds and will attract 
them accordingly."

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

* Re: [ECOS] ARM Thumb
  2001-04-26 10:31 ` Lewin A.R.W. Edwards
  2001-04-26 12:23   ` Jonathan Larmour
@ 2001-04-27  0:43   ` Rafael Rodríguez Velilla
  2001-04-27  5:44     ` Lewin A.R.W. Edwards
  2001-04-27  3:03   ` [ECOS] using struct II Carlos Camargo
  2 siblings, 1 reply; 10+ messages in thread
From: Rafael Rodríguez Velilla @ 2001-04-27  0:43 UTC (permalink / raw)
  To: ecos

> You can build eCos in ARM mode with thumb interworking enabled, as long as
> you also built newlib with interworking enabled. You can then build your
> app in thumb mode (with interworking).

  How is this done?
  When I build  the toolchain for eCos I follow the indications of eCos' web page.
In there they use the switch --with-newlib, but I have never built newlib itself.
  Is the output of newlib the library libgcc.a?

  I'm going to investigate this issue. Any other hints are welcome.




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

* [ECOS] using struct II
  2001-04-26 10:31 ` Lewin A.R.W. Edwards
  2001-04-26 12:23   ` Jonathan Larmour
  2001-04-27  0:43   ` Rafael Rodríguez Velilla
@ 2001-04-27  3:03   ` Carlos Camargo
  2 siblings, 0 replies; 10+ messages in thread
From: Carlos Camargo @ 2001-04-27  3:03 UTC (permalink / raw)
  To: ecos-discuss

sorry the code is..

static void stimulus( cyg_addrword_t data )
{
    int i, j;

     struct hola_type{
      int a;
    };
    hola_type hola;  //tis is a 59 line

    hola.a = 5;
..
..
sync_mbox.c:59: `hola_type' undeclared (first use in
this function)


Thanks

Carlos Camargo

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

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

* Re: [ECOS] ARM Thumb
  2001-04-27  0:43   ` Rafael Rodríguez Velilla
@ 2001-04-27  5:44     ` Lewin A.R.W. Edwards
  0 siblings, 0 replies; 10+ messages in thread
From: Lewin A.R.W. Edwards @ 2001-04-27  5:44 UTC (permalink / raw)
  To: Rafael Rodríguez Velilla, ecos

>   When I build  the toolchain for eCos I follow the indications of eCos' 
> web page.
>In there they use the switch --with-newlib, but I have never built newlib 
>itself.
>   Is the output of newlib the library libgcc.a?

You can get newlib by following the "other projects" (or is it "more 
projects"?) link on sources.redhat.com. Note that this is yet another piece 
of software that seems broken on cygwin. I had to build it on a Linux 
system and move it across.

If you build newlib 1.9.0 with a recent cvs snapshot of gcc then you'll get 
both the arm and thumb versions of the library (libc.a, libm.a, 
thumb/libc.a, thumb/libm.a) built automatically.

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

"... a man who is endowed with real qualities of leadership will be tempted 
to refrain from taking part in political life; because [...] the situation 
does not call for a man who has a capacity for constructive statesmanship 
but rather for a man who is capable of bargaining for the favour of the 
majority. Thus the situation will appeal to small minds and will attract 
them accordingly."

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

* Re: [ECOS] ARM Thumb
  2001-04-26 12:23   ` Jonathan Larmour
  2001-04-26 12:30     ` Lewin A.R.W. Edwards
@ 2001-04-30  9:18     ` Rafael Rodríguez Velilla
  2001-04-30 11:58       ` Jonathan Larmour
  1 sibling, 1 reply; 10+ messages in thread
From: Rafael Rodríguez Velilla @ 2001-04-30  9:18 UTC (permalink / raw)
  To: ecos

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]

  Does that patch makes gcc capable of compiling eCos in thumb mode?
   I imagine that that patch will be included on newer than 2001-04-24 snapshots,
isn't it?


> [ Jifl goes to the gcc-patches archive and checks... ]
>
> You'll be displeased to know that the patch only got checked in on Tuesday
> :-). Here's what it was BTW.
>
> 2001-04-24  Nick Clifton  <nickc@cambridge.redhat.com>
>
>         * dwarf2out.c (mem_loc_descriptor): If a SYMBOL_REF is in the
>         constant pool, use the pool's SYMBOL_REF instead.
>
> Index: gcc/dwarf2out.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
> retrieving revision 1.263
> diff -p -r1.263 dwarf2out.c
> *** dwarf2out.c 2001/04/12 01:44:21     1.263
> --- dwarf2out.c 2001/04/20 08:29:03
> *************** mem_loc_descriptor (rtl, mode)
> *** 7117,7122 ****
> --- 7117,7128 ----
>          pool.  */
>       case CONST:
>       case SYMBOL_REF:
> +       /* Alternatively, the symbol in the constant pool can be referenced
> +        by a different symbol.  */
> +       if (GET_CODE (rtl) == SYMBOL_REF
> +          && CONSTANT_POOL_ADDRESS_P (rtl))
> +          rtl = get_pool_constant (rtl);
> +
>         mem_loc_result = new_loc_descr (DW_OP_addr, 0, 0);
>         mem_loc_result->dw_loc_oprnd1.val_class = dw_val_class_addr;
>         mem_loc_result->dw_loc_oprnd1.v.val_addr = save_rtx (rtl);
>
> 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

--
Rafael Rodríguez Velilla        rrv@tid.es
Telefónica I+D          http://www.tid.es
Telf: +34 - 91 337 4270



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

* Re: [ECOS] ARM Thumb
  2001-04-30  9:18     ` Rafael Rodríguez Velilla
@ 2001-04-30 11:58       ` Jonathan Larmour
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Larmour @ 2001-04-30 11:58 UTC (permalink / raw)
  To: Rafael Rodríguez Velilla; +Cc: ecos

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 525 bytes --]

Rafael Rodríguez Velilla wrote:
> 
>   Does that patch makes gcc capable of compiling eCos in thumb mode?
>    I imagine that that patch will be included on newer than 2001-04-24 snapshots,
> isn't it?

It's certainly worth another go.

General remark: if there are any other problems, try compiling without
optimization (i.e. without -O2) to see if that helps.

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] 10+ messages in thread

end of thread, other threads:[~2001-04-30 11:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-26  9:21 [ECOS] ARM Thumb Roman
2001-04-26 10:31 ` Lewin A.R.W. Edwards
2001-04-26 12:23   ` Jonathan Larmour
2001-04-26 12:30     ` Lewin A.R.W. Edwards
2001-04-30  9:18     ` Rafael Rodríguez Velilla
2001-04-30 11:58       ` Jonathan Larmour
2001-04-27  0:43   ` Rafael Rodríguez Velilla
2001-04-27  5:44     ` Lewin A.R.W. Edwards
2001-04-27  3:03   ` [ECOS] using struct II Carlos Camargo
2001-04-26 11:11 ` [ECOS] ARM Thumb Jonathan Larmour

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).