Jeremi Piotrowski wrote:
> On Sun, May 27, 2018 at 05:06:43AM +0200, tu...@posteo.de wrote:
>> Hi,
>>
>> too feed a STM32F103C8T6 MCU (Core-M3) with some code to execute,
>> I want a compiler. For that I did a 
>>
>>     crossdev arm-unknown-linux-gnu
>>
>> . That one failed to build (gcc, binytils seem to be ok).
>>
> That triplet is not going to work for that hardware for two reasons:
> 
>  - bare-metal implies no kernel so 'linux' is wrong
>  - gnu (== glibc) is not going to work on bare-metal
> 
> What you're looking for is 'arm-none-eabi', that's what all the vendor
> supplied prebuilt toolchains use. That triplet will use 'newlib' as the
> libc, which is the correct choice for bare-metal.
> 
> I wouldv'e said 'arm-unknown-linux-eabi' or the gentoo specific
> 'armv7m-softfloat-none-eabi' but for some reasons the binutils
> build chokes on that. However compared to arm-none-eabi the only thing
> these triplets do is change some of the configured defaults (arch/fpu/...,
> see /usr/portage/eclass/toolchain.eclass), so you should be fine with
> 'arm-none-eabi'.
> 

arm-none-eabi is also what I'm using here on a similar platform.

To the OP, if you only need to build some program for ARM and not install a 
gentoo system
on the target then you could download the pre-built cross-compiler toolchain 
from the ARM
site (https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads).

raffaele

Reply via email to