public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-embedded] arm-unknown-elf
@ 2009-03-28 17:49 billium
  2009-03-28 23:29 ` billium
  0 siblings, 1 reply; 7+ messages in thread
From: billium @ 2009-03-28 17:49 UTC (permalink / raw
  To: gentoo-embedded

I am trying to build a toolchain for a STM32 board.
I use: crossdev -s1 arm-unknown-elf-gnu

but that fails in binutils, o/p of log:
checking target system type... Invalid configuration
`arm-unknown-elf-gnu': machine `arm-unknown-elf' not recognized

yet crossdev -s1 arm-unknown-linux-gnu works

Linux-2.6.27-gentoo-r8-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_6000+-with-glibc2.2.5
Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.3.3,
glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)

  Any help please?

Billy



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

* Re: [gentoo-embedded] arm-unknown-elf
  2009-03-28 17:49 [gentoo-embedded] arm-unknown-elf billium
@ 2009-03-28 23:29 ` billium
  2009-03-29 11:41   ` Martin Gysel
  0 siblings, 1 reply; 7+ messages in thread
From: billium @ 2009-03-28 23:29 UTC (permalink / raw
  To: gentoo-embedded

billium wrote:
> I am trying to build a toolchain for a STM32 board.
> I use: crossdev -s1 arm-unknown-elf-gnu
>
> but that fails in binutils, o/p of log:
> checking target system type... Invalid configuration
> `arm-unknown-elf-gnu': machine `arm-unknown-elf' not recognized
>
> yet crossdev -s1 arm-unknown-linux-gnu works
>
> Linux-2.6.27-gentoo-r8-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_6000+-with-glibc2.2.5
> Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.3.3,
> glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
>
>   Any help please?
>
> Billy
>
>   
My mistake .. I should have used: crossdev -s1 --without-headers arm-elf


Billy




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

* Re: [gentoo-embedded] arm-unknown-elf
  2009-03-28 23:29 ` billium
@ 2009-03-29 11:41   ` Martin Gysel
  2009-03-30  5:05     ` Mike Frysinger
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Martin Gysel @ 2009-03-29 11:41 UTC (permalink / raw
  To: gentoo-embedded

billium schrieb:
> billium wrote:
>   
>> I am trying to build a toolchain for a STM32 board.
>> I use: crossdev -s1 arm-unknown-elf-gnu
>>
>> but that fails in binutils, o/p of log:
>> checking target system type... Invalid configuration
>> `arm-unknown-elf-gnu': machine `arm-unknown-elf' not recognized
>>
>> yet crossdev -s1 arm-unknown-linux-gnu works
>>
>> Linux-2.6.27-gentoo-r8-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_6000+-with-glibc2.2.5
>> Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.3.3,
>> glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
>>
>>   Any help please?
>>
>> Billy
>>
>>   
>>     
> My mistake .. I should have used: crossdev -s1 --without-headers arm-elf
>   
afaik arm-softfloat-elf should also work and should be used as the STM32
doesn't have a floating point unit... (I use it on a luminary board)
what I'm still wondering, how do I enable the arm EABI? do I have to
configure this at build time, can it be done through a compiler switch
or at the end is this enabled anyway? afaik you need EABI if you want to
link you code against libraries which were build with a different
compiler, say IAR

/martin



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

* Re: [gentoo-embedded] arm-unknown-elf
  2009-03-29 11:41   ` Martin Gysel
@ 2009-03-30  5:05     ` Mike Frysinger
  2009-03-30  8:06     ` Martin Guy
  2009-03-30  8:06     ` billium
  2 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2009-03-30  5:05 UTC (permalink / raw
  To: gentoo-embedded

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

On Sunday 29 March 2009 07:41:54 Martin Gysel wrote:
> what I'm still wondering, how do I enable the arm EABI? do I have to
> configure this at build time, can it be done through a compiler switch
> or at the end is this enabled anyway? afaik you need EABI if you want to
> link you code against libraries which were build with a different
> compiler, say IAR

afaik, there is no EABI for bare metal yet.  or i'm remembering wrong.  try 
searching the crossgcc/binutils lists as i believe this came up recently.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-embedded] arm-unknown-elf
  2009-03-29 11:41   ` Martin Gysel
  2009-03-30  5:05     ` Mike Frysinger
@ 2009-03-30  8:06     ` Martin Guy
  2009-03-30  8:06     ` billium
  2 siblings, 0 replies; 7+ messages in thread
From: Martin Guy @ 2009-03-30  8:06 UTC (permalink / raw
  To: gentoo-embedded

On 3/29/09, Martin Gysel <m.gysel@gmx.ch> wrote:
> afaik arm-softfloat-elf should also work and should be used as the STM32
>  doesn't have a floating point unit... (I use it on a luminary board)
>  what I'm still wondering, how do I enable the arm EABI?

Normally, you set the fourth field of the GNU architecture name to
-gnueabi instead of -gnu, such as arm-blah-linux-gnueabi. I have also
seen arm-none-eabi quoted as building successfully, but know nothing
of this.

> do I have to configure this at build time

That is the usual way

> can it be done through a compiler switch

You can also select EABI with appropriate command-line switches to any
GNU ARM compiler (from 4.1.1 on), but this is unusual. You normally
build the compiler to the system-wide default that you need.

> afaik you need EABI if you want to link you code against libraries which were build with a different compiler, say IAR

You need EABI if you want to link against other EABI binaries. The ABI
is a set of conventions for where you put parameters to function
calls, and where results are returned (on the stack? in registers?
which registers?) plus stuff like how objects must be aligned in
memory, how structure elements are laid out, the default size in bytes
of enums (a byte? a word?) and so on.

Lots of details are at wiki.debian.org/ArmEabiPort

    M



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

* Re: [gentoo-embedded] arm-unknown-elf
  2009-03-29 11:41   ` Martin Gysel
  2009-03-30  5:05     ` Mike Frysinger
  2009-03-30  8:06     ` Martin Guy
@ 2009-03-30  8:06     ` billium
  2009-03-30 13:21       ` Martin Gysel
  2 siblings, 1 reply; 7+ messages in thread
From: billium @ 2009-03-30  8:06 UTC (permalink / raw
  To: gentoo-embedded

Martin Gysel wrote:
> billium schrieb:
>   
>> billium wrote:
>>   
>>     
>>> I am trying to build a toolchain for a STM32 board.
>>> I use: crossdev -s1 arm-unknown-elf-gnu
>>>
>>> but that fails in binutils, o/p of log:
>>> checking target system type... Invalid configuration
>>> `arm-unknown-elf-gnu': machine `arm-unknown-elf' not recognized
>>>
>>> yet crossdev -s1 arm-unknown-linux-gnu works
>>>
>>> Linux-2.6.27-gentoo-r8-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_6000+-with-glibc2.2.5
>>> Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.3.3,
>>> glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
>>>
>>>   Any help please?
>>>
>>> Billy
>>>
>>>   
>>>     
>>>       
>> My mistake .. I should have used: crossdev -s1 --without-headers arm-elf
>>   
>>     
> afaik arm-softfloat-elf should also work and should be used as the STM32
> doesn't have a floating point unit... (I use it on a luminary board)
> what I'm still wondering, how do I enable the arm EABI? do I have to
> configure this at build time, can it be done through a compiler switch
> or at the end is this enabled anyway? afaik you need EABI if you want to
> link you code against libraries which were build with a different
> compiler, say IAR
>
> /martin
>
>
>   
Hello Martin
Thanks for your answer.  Did not look at it yesterday, as it was sunny
in the UK :).  I also tried arm-softfloat-elf and got the same error. I
do not know about switching the EABI.  Do you know how to include
newlib? Could you please post your linker script / makefile as I am
having linker problems ..not finding file.

Many thanks

Billy
 



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

* Re: [gentoo-embedded] arm-unknown-elf
  2009-03-30  8:06     ` billium
@ 2009-03-30 13:21       ` Martin Gysel
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Gysel @ 2009-03-30 13:21 UTC (permalink / raw
  To: gentoo-embedded

billium schrieb:
> Hello Martin
> Thanks for your answer.  Did not look at it yesterday, as it was sunny
> in the UK :).  I also tried arm-softfloat-elf and got the same error. I
> do not know about switching the EABI.  Do you know how to include
> newlib? Could you please post your linker script / makefile as I am
> having linker problems ..not finding file.
>   
I've just builded a new toolchain:
1. edit /usr/sbin/crossdev on line 201:
    add |*-eabi just after *-elf
    this is needed if you want to build newlib, otherwise crossdev chose
libc
2. crossdev -s3 --without-headers arm-softfloat-eabi

this should work... at least on this very machine I did it
at the moment I haven't tried it on the target

/martin




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

end of thread, other threads:[~2009-03-30 13:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-28 17:49 [gentoo-embedded] arm-unknown-elf billium
2009-03-28 23:29 ` billium
2009-03-29 11:41   ` Martin Gysel
2009-03-30  5:05     ` Mike Frysinger
2009-03-30  8:06     ` Martin Guy
2009-03-30  8:06     ` billium
2009-03-30 13:21       ` Martin Gysel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox