摘要
随着日前越来越多嵌入式系统的飞速发展,必须快速有效地为之开发合适的交叉编译器。因为GCC(GNU(Compiler Collection)是非常优秀的交叉编译器而且具有很好的可移植性,所以移植GCC是一个非常正确的方法。以交叉编译系统ZLTCG的开发为背景,详细分析了交叉编译系统GCC的体系结构,对其高度可移植性所依赖的中间表示和机器描述技术进行了深入研究,并在此基础上阐述了如何基于GCC构造用于嵌入式系统开发的交叉编译器。介绍了GCC的内核和工作机制,特别是RTL(Register Transfer Language)代码和汇编代码的生成以及解释GCC的移植方法和移植实例,对测试方法进行了探讨。
With the rapid development of more and more embedded systems nowadays, the need for fit cross-compilers should be satisfied efficiently. Porting GCC (GNU compiler collection) is the right method for GCC is a very excellent cross-compiler and has high portability. With the background of developing a renovated cross-compiler named ZLTCG supporting processor MIPSX, the architecture of GCC cross-compiler system is analyzed, and the intermediate representation and machine description are deeply studied which the portability of GCC is based on, and how to poring GCC for an embedded system is illustrated which it doesn't support. GCC's internals and how it works are introduced, especially parts on RTL (register transfer language) code and assembly code generation. Then porting method with examples are expained. Finally, the testing methods are discussed.
出处
《计算机工程与设计》
CSCD
2004年第11期1880-1883,共4页
Computer Engineering and Design
基金
国家863高技术计划基金项目(2003AA1Z2080)