[arch-general] STM32 compilation on ArchLinuxARM

Konstantin Gribov grossws at gmail.com
Tue Dec 27 09:04:11 UTC 2016


Hello.

TL;DR;
> I need a way to install arm-none-eabi-gcc on Raspberry Pi (Arch Linux
> ARM) using pacman or from source.
>
Just use gcc package.

It has these targets:
> valid arguments to '-march=' are: armv2 armv2a armv3 armv3m armv4 armv4t
armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6kz armv6s-m
armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve
armv8-a armv8-a+crc armv8.1-a armv8.1-a+crc
iwmmxt iwmmxt2 native

Which includes armv6-m, armv6s-m, armv7-m, armv7e-m. IIRC Cortex-M3 is
armv7-m.

Of course you have to add `-mcpu=cortex-m3`, `-mthumb`, some keys for
freestanding environment (`-ffreestanding` and `-nostdlib`), provide your
own linker script via `-Tyour-layout.ld`.

I've tested compilation on RPi3 with gcc, it works fine for embedded
targets.

-- 

Best regards,
Konstantin Gribov


More information about the arch-general mailing list