Re: [arch-general] STM32 compilation on ArchLinuxARM
On Wed, 28 Dec 2016 03:18:44 + Konstantin Gribov via arch-generalwrote: > > > > RPi 2 B is Armv7. IIRC. > > Idk about 3, But I think it is ArmV7 > > RPi3 is armv8-a (it has Cortex-A53 cores), not armv7-a. But it's offtopic. > > OP's question was about cross-compiling for Cortex-M which is for > microcontrollers. He just wants to compile code for it on RPi as a host. > It's not very different from compiling for Cortex-M on x86_64. Maybe not, but this entire thread is off topic, since Arch Linux ARM is a separate distro that's not supported here.
Re: [arch-general] STM32 compilation on ArchLinuxARM
> > RPi 2 B is Armv7. IIRC. > Idk about 3, But I think it is ArmV7 RPi3 is armv8-a (it has Cortex-A53 cores), not armv7-a. But it's offtopic. OP's question was about cross-compiling for Cortex-M which is for microcontrollers. He just wants to compile code for it on RPi as a host. It's not very different from compiling for Cortex-M on x86_64. -- Best regards, Konstantin Gribov
Re: [arch-general] STM32 compilation on ArchLinuxARM
iPadから送信 2016/12/27 18:04、Konstantin Gribov via arch-generalのメッセージ: > 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
Re: [arch-general] STM32 compilation on ArchLinuxARM
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
Re: [arch-general] STM32 compilation on ArchLinuxARM
On 12/27/16 at 05:40am, Foxtrot Mike via arch-general wrote: > TL;DR; > I need a way to install arm-none-eabi-gcc on Raspberry Pi (Arch Linux > ARM) using pacman or from source. Well arm-none-eabi-gcc is a armv7 (6?) cross compiler and on your RPI you are already running on an arm platform you probably won't need a cross compiler. (Assuming arvm7 can compile armv6 like gcc on 64 bit can compile 32 bit) #archlinux-arm might also be a good place to ask questions. > Hi guys, > > First of all, I know that this mailing list entertains questions and > information related to Arch Linux, not Arch Linux ARM. Since I have > received valuable suggestions on this list before, I am going to ask my > question here in the hope that someone would be able and willing to > help. I couldn't find the required info on the internet. > > I am running Arch on my main desktop. I installed arm-none-eabi-gcc > package using pacman so I can compile code for my STM32F103 board. > > I switched from Raspbian to ArchLinuxARM on Raspberry pi yesterday*. I > have found most of the my daily usage packages in ARchLinuxARM repo, but > can't find arm-none-eabi-gcc package. There's a post on ArchLinuxARM > forums [1] requesting the same info, but the post didn't get any reply. > > Every google search tells ways to develop for Raspberry Pi on x86 > computers using arm-none-eabi-gcc. I couldn't find any meaningful info > about developing for ARM Cortex-Mx on Raspberry pi. > > Any suggestions would be apreciated. > > Regards, > Fulcrum > > > [1] https://archlinuxarm.org/forum/viewtopic.php?f=15=10060 > > * Hoping to use Raspberry pi as my daily computer so I could run Windows > on my main desktop for gaming -- Jelle van der Waa signature.asc Description: PGP signature