I am always confused then it is about ARM architecture toolchain. I always see that there is two oppisite sides: ARM ltd. official and GNU community. ARM provides official tools while GNU community provide free and open source flexible and more versatile solutions. I want to start using GNU free and open software to use in my work. But this confusion makes me lost where to start. Which GNU toolchain support which architectures and so on. M, A, R profiles? What to choose? I want to get rid of the "ARM ltd. way of doimg things". Can you please provide official GNU resourses and links for tools that support all ARM architectures? What main projects should I check, what toolchain to dowload?
2 Answers
Being basically the most popular architecture (for every other processor, x86, etc you probably have or touch one or more ARM based things). There are many tools. There are pay-for tools from various vendors, arm and keil which is now ARM. As well as others. And the gnu toolchain also supports arm so there is an uncountable number of builds of that. On Ubuntu and derivatives it is as simple as an apt-get to install the toolchain. Launchpad.net has one you can download. the formerly codesourcery folks whose name is on some of the gnu port has a free and supported version of the toolchain (now mentor graphics). There are a number of ones like yagarto devkitarm and others that folks use for bare metal work. And of course being open source you can "simply" build the toolchain from sources. On linux it is fairly easy, on windows I dont know have not done it in 10 years, but was not hard then. Or you can just get a raspberry pi or some other arm computer or run one in a simulator like qemu and use the native gnu toolchain there.
There are way too many options to suggest one, so I suggest you try several. The pay-for ones often have an eval version. You will get pay-for support. If you go with gnu there is a massive amount of free support out there, many of the issues being generic gnu or gnu cross compiler and apply to arm as well as mips and others multiplying the amount of support. At the same time more so with gnu, there is a lot of old info that doesnt apply anymore that can get in the way.
A and R are the same basically R is two full sized cores in lock step for security (medical, automotive, etc). The cortex-m is thumb microcontroller only with various amounts of thumb2 extensions depending. All cores from armv4t to the present support the original thumb that is the only common arm instruction set. the cortex-ms and some newer cortex-As support various levels of thumb2 extensions (formerly undefined thumb instructions now turned into variable length instructions). The full sized as I call them ARMs support the full sized instructions with small modifications being made (usually additions) over time. ARMv8 did a complete do-over for the 64 bit instructions. there is an aarch32 compatibility mode and when you switch to aarch64 it is 32 bit instructions that are completely incompatible with aarch32. You will find certainly with the gnu tools support from one end to the other so long as you dont get a really old toolchain (3.x to the present supports thumb). Aarch64 came about not too long ago, but the ARM and thumb instruction sets are supported.
The gnu way is to do a build of the sources for the target or family, so aarch64 is a separate toolchain from the other ARM instruction sets. If you build the regular arm instruction sets it should support the thumb and arm architeture variations. Depending on how the gnu tools are built (again the gnu way) you may or may not get floating point or soft float support in the toolchain, that is your bigger worry than cortex A,R,M, and the floating point instruction sets for ARM have changed over time, used to be it was rare, now it is somewhat common to find an FPU in the chip.
llvm/clang is another option, thank apple and iphones/idevices for maturing these tools. the llvm way is to have one build that supports many targets arm, mips, x86, etc. one is the primary target but the installed tools can be used as a cross compiler, at least compiler, maybe not linker (gnu binutils works well to fill that gap). you should try these as well, pre-builts are available and you can "simply" build from sources. Easily apt-got if you are running ubuntu or a derivative.

- 69,149
- 8
- 89
- 168
I would use the GNU ARM Launchpad. This is the GNU toolchain but is maintained by ARM (which should be a good thing I think). It says it supports Cortex M & R, but it also supports older processors like ARM 7 & 9.

- 1,632
- 10
- 22