Research and Development of the Cross Compiler Based on GCC for Embedded System

Author
FengGang
Advisor
ZhengKouGen
School
Zhejiang University
Major
Computer Software and Theory
Classification
TP314 Compiler,interpreter
Degree
Master's thesis
Year
2004
Downloads
631
Citations
15

Request the full text

Abstract

With the rapid development of computer technology and Internet technology, the development of new embedded system is aimed to Infermation Appliance and combination of computer, communication and consumer. It’ widely applied in fileds of industrial control, communication, apparatus, and appliance consumption and so on. For the rapid development of the embedded, handheld and wireless devices, the embedded software is becoming a hot spot of the information industry.Without bootstrapping on themself, embedded systems always request a cross development tool chain. And for the special feature including compact code and fast run speed, the tool chain should be capable of optimization. It seems to be a popular solution for embedded equipements to compile software on another system, which use Linux as an operating system with a cross-compiler built on. And GCC, the most portable and optimized one of current open source compilers, which had been developed many years, can supports nearly all famous processors and become an appropriate cross-compiler for the development of embedded software.With the background of developing a renovated cross-compiler named ZLTCC supporting processor MIPS-X, this thesis analyzes the architecture of GCC, deeply studies the back-end, optimization technologies, the intermediate representation and machine description which the portability of GCC are based on, and realizes porting of GCC cross-compiler system to a target processor MIPS-X. By making use of instruction split, delay-slot scheduling, register allocation and peephole optimization in porting, the code ZLTCC outputs get much optimized.At First, this thesis describes the special features embedded system" constrains on the cross-compiler system and code optimizaion. Then it introduces the developing background of the cross-compiler system, ZLTCC. In chapter 2. it introduces the automatically generation of compiler and optimization technologies. In chapter 3, it analyses GCC on designatioin, architecture, back-end generators, intermediate language, machine description, back-end generation and optimization technologies. In chapter 4, it illustrates the architecture and ABI of MIPS-X and how to porting GCC for MIPS-X. In chapter 5, some difficult problems and optimization issues been discussed in detail. It then presents the successful porting result. At last, it gives some conclusions and foresight.

Table of contents

First chapter 7-11 1.2 ZLTCC compile Introduction 1.1 embedded systems and their requirements on the build system 7-9 <br / > 1.3 related work 9-11 automatic generation and optimization of the build system 11-24 2.1 compiler system architecture 11-12 2.2 compiler automatically generated 12-17 2.2.1 compiler to generate the structure of 12-13 2.2.2 lexical analyzer automatically generated 13-14 2.2.3 syntax analysis procedures for the automatic generation of 14-15 2.2.4 semantic analysis program generator 15-16 2.2.5 code generator automatically generated 16-17 2.3 compiler back-end technology research 17-24 2.3.1 intermediate code optimization 18 - 19 2.3.2 local optimization strategy 19-20 2.3.3 loop optimization strategy 20 2.3.4 Global Optimization strategies 20 2.3.5 code generation 20-21 2.3.6 of the code generated by said 21-22 2.3.7 register allocation 22-23 < br /> 2.3.8 peephole optimization strategy 23-24 Chapter III of GCC compiler, kernel profiling 24-46 3.1 GCC design ideas 24 -25 3.2 GCC architecture 25-27 3.3 GCC back-end automatic generator 27-31 3.3.1 \ 27-31 3.4 RTL (Register Transfer Language) 31-33 3.4.1 the RTL Introduction 31-32 3.4.2 function RTL said 32-33 3.5 target machine description (Machine Description) 33-40 3.5.1 template 34-38 3.5.2 standard instruction 38-40 3.5.3 macro definition is 40 3.6 back-end and optimize analysis 40-46 3.6.1 the RTL generated ( the RTL Generater) 40-42 3.6.2 register scan (Register Scan) 42 3.6.3 jump optimization (Jump Optimization) 42-43 < br /> 3.6.4 Based on the SSA optimization 43 3.6.5 remove the common subexpression (Common Subexpression Elimination) 43 3.6.6 loop optimization (Loop optimization) 43 3.6.7 data flow analysis (Data Flow Analysis) 43 3.6.8 instruction combined (the Instructions Combination) 43 3.6.9 instruction scheduling (Instruction Scheduling) 43-44 3.6.10 register allocation (Register Allocation) 44 3.6.11 delayed branch scheduling (Delay Branch Scheduing) 44-45 3.6.12 assembly code generated 45-46 Chapter transplantation is 46-70 4.1 transplant ideas and methods 46 4.2 target machine architecture 46-50 4.2.1 register 47 4.2.2 storage space 47-48 4.2.3 MIPS-X instruction set 48-50 4.3 target machine ABI (Application Binary Interface),.; 50-53 4.3.1 MIPS-X data that 50-51 4.3.2 MIPS-X function call 51-53 4.4 cross-compiler on the MIPS-X transplantation 53-59 <br / > 4.4.1 transplanted goal nose file 53-55 4.4.2 transplantation target machine description file 55-59 4.4.3 transplant target C files 59 4.5 porting issues and optimize 59-66 4.5.1 memory addressing problems 59-61 4.5.2 register allocation problem 61-62 4.5.3 of the delay slot handling 62-63 4.5.4 instruction attributes 63-64 4.5.5 instruction split 64-66 4.5.6 the GCC error 66 4.6 test 66-70 Chapter Summary and Outlook 70 -71 References 71-73 thank 73

Related dissertations

  1. Research and Implementation of Cross-compiler System
    SuZuoZuo ·Zhejiang University ·2003 ·Master's thesis
  2. Research and Development of Compiler in Embedded System Based on GCC
    YangChuanLong ·Harbin Engineering University ·2006 ·Master's thesis
  3. Design and Research on Retargetable C Compiler for Media Processors
    ZuoXiaoMing ·Zhejiang University ·2004 ·Doctoral dissertation
  4. GCC compiler system architecture analysis and back-end transplant practice
    CaiJie ·Zhejiang University ·2004 ·Master's thesis
  5. Research on Software Pipelining Based on GCC
    Yang ·Harbin Engineering University ·2006 ·Master's thesis
  6. The safety of the C language compiler
  7. Research and Realization of Video Surveillance and Play Based on ARM9Hardware Platform
    PanZuoZuo ·Dalian Polytechnic University ·2010 ·Master's thesis
  8. The Study of Remote Video Monitor System Baced on ARM
    GuoZuo ·Hebei University of Technology ·2012 ·Master's thesis
  9. Design and Implementation of Intelligent Video Surveillance System Based on Embedded Linux
    JinPing ·Central South University ·2013 ·Master's thesis
  10. Video Surveillance System Based on Embedded Technology Research
  11. Design of Video Monitoring System Based on the Embedded
  12. The Design of Embedded Network Video Surveillance System Based on ARM9
  13. Research and implementation of remote monitor system of ship based on the technology of the Internet of things
  14. Design of Video Surveillance Software Based on Ti Dm6446Processor
    YuanWei ·Zhejiang University of Technology ·2013 ·Master's thesis
  15. Data Acquisition System of Cavern Based on Embedded Web Server
  16. Research and Realization of Embedded Data Acquisition and Recording System for Industrial Process Based on ARM
    LiuDaoLin ·Dalian Polytechnic University ·2008 ·Master's thesis
  17. Research on the Indoor Air Monitoring System Based on Embedded Linux
  18. Research and Realization on the Key Technology of Monitoring System about Granary Environment Based on ARM9
    SunZuoLi ·Hunan University ·2013 ·Master's thesis
  19. Automatic Switcher Based on Embedded System Design and Implementation of Test Platform
  20. Research on Meteorological Data Acquisition and Processing System
    ZhaoSheng ·Wuhan University of Technology ·2013 ·Master's thesis