Embedded Systems Architecture
上QQ阅读APP看书,第一时间看更新

The GCC toolchain

An embedded toolchain is a set of software tools aimed to build software for a specific platform. While, in some cases, the complexity of the toolchain can be abstracted through a GUI, it is often distributed as a set of standalone applications, each one serving a specific purpose. Understanding the single tools and learning how to use them properly speeds up the development process and gives us a closer look at how things work under the hood.

GCC is nowadays one of the reference toolchains to build embedded systems, due to its modular structure allowing backends for multiple architectures. Thanks to its open source model, and the flexibility in building tailored toolchains from it, GCC-based toolchains are among the most popular development tools in embedded systems.

Building software using a command-line-based toolchain has several advantages, including the possibility of automating the intermediate steps that would build all the modules up from the source code into the final image. This is particularly useful when it is required to program multiple devices in a row, or to automate builds on a continuous integration server.

ARM distributes the GNU Arm Embedded Toolchain for all the most popular development hosts. Toolchains are prefixed with a triplet describing the target. In the case of the GNU Arm Embedded Toolchain, the prefix is arm-none-eabi, indicating that the cross-compiler backend is configured to produce objects for ARM, with no specific support for an operating system API, and with the embedded ABI.