iPadから送信 2016/12/27 18:04、Konstantin Gribov via arch-general <arch-general@archlinux.org> のメッセージ:
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
RPi 2 B is Armv7. IIRC. Idk about 3, But I think it is ArmV7