Gentoo Archives: gentoo-user

From: Raffaele Belardi <raffaele.belardi@××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] crossdev arm-unknown-linux-gnu failed
Date: Mon, 28 May 2018 10:08:28
Message-Id: aa123e61-67b8-1abb-8631-b154073153f6@st.com
In Reply to: Re: [gentoo-user] crossdev arm-unknown-linux-gnu failed by Jeremi Piotrowski
1 Jeremi Piotrowski wrote:
2 > On Sun, May 27, 2018 at 05:06:43AM +0200, tuxic@××××××.de wrote:
3 >> Hi,
4 >>
5 >> too feed a STM32F103C8T6 MCU (Core-M3) with some code to execute,
6 >> I want a compiler. For that I did a
7 >>
8 >> crossdev arm-unknown-linux-gnu
9 >>
10 >> . That one failed to build (gcc, binytils seem to be ok).
11 >>
12 > That triplet is not going to work for that hardware for two reasons:
13 >
14 > - bare-metal implies no kernel so 'linux' is wrong
15 > - gnu (== glibc) is not going to work on bare-metal
16 >
17 > What you're looking for is 'arm-none-eabi', that's what all the vendor
18 > supplied prebuilt toolchains use. That triplet will use 'newlib' as the
19 > libc, which is the correct choice for bare-metal.
20 >
21 > I wouldv'e said 'arm-unknown-linux-eabi' or the gentoo specific
22 > 'armv7m-softfloat-none-eabi' but for some reasons the binutils
23 > build chokes on that. However compared to arm-none-eabi the only thing
24 > these triplets do is change some of the configured defaults (arch/fpu/...,
25 > see /usr/portage/eclass/toolchain.eclass), so you should be fine with
26 > 'arm-none-eabi'.
27 >
28
29 arm-none-eabi is also what I'm using here on a similar platform.
30
31 To the OP, if you only need to build some program for ARM and not install a gentoo system
32 on the target then you could download the pre-built cross-compiler toolchain from the ARM
33 site (https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads).
34
35 raffaele

Replies

Subject Author
Re: [gentoo-user] crossdev arm-unknown-linux-gnu failed tuxic@××××××.de