Real-Time Systems Development

If there is no suitable ready-configured compiler available, you will have to 'roll your own' from the gcc sources. Before building a new gcc cross-compiler, the latest compatible versions of the gcc, newlib (or glibc) and binutils source code packages have to be obtained, either on CD or by downloading directly from gcc.gnu.org or an equivalent mirror site. The packages are available in tgz or bz2 compressed tar format and will be labelled something like: gcc- 3.2.3.tar.gz and binutils-2.13.90.tar.gz. You will need about 500 MB of free disk space to carry on with this operation. In the end, this reduces to about 100 MB after the removal of all the interim, temporary files. The availability of the particular CPU instruction set has to be investigated before too long. But it is probable that the gcc tool-chain has already been configured for any well-known processor, as evidenced by the list provided in Section 17.3.
A tool-chain refers to the series of processing steps required to generate a binary file that will execute on the target system. For C, the translation requires several passes: cpp, gcc, gas, ld. The preprocessor, cpp, handles all the source header files and macros. The compiler, gcc, takes the source file and produces assembler code for gas, the GNU assembler. This then produces object files containing machine code for the target CPU. Finally the linker, ld, combines several object files and libraries, by binding symbolic labels to address...