As the market for embedded systems grows, it has become more and more important to build a development environment that helps the embedded system designers to meet time-to-market needs. So, an interest in retargetable compilers is raised to support the varying architecture design styles and also new processors. It is necessary to examine the efficient retargeting strategy through analyzing the existing retargetable compilers.
In this thesis, we present an implementation of a compiler for ARM, an embedded RISC processor, using GNU C, a retargetable compiler. We also explain the retargeting method of the GNU C. It is separated into architecture-independent parts and architecture-dependent parts. These latter are automatically generated from machine specification information described by a developer using macro expansion and instruction RTL-pattern definition. We finally compare the new ARM compiler with other implementations and then analyze the retargeting strategy of GNU C, in addition to the comparison results.