Font Size: a A A

Design And Implementation Of Open Source Compiler Evaluation Framework For Embedded MCU

Posted on:2024-06-16Degree:MasterType:Thesis
Country:ChinaCandidate:C SunFull Text:PDF
GTID:2558307079492804Subject:Electronic Information·Computer Technology (Professional Degree)
Abstract/Summary:PDF Full Text Request
With the introduction of emerging technologies such as 5G(5th Generation Mobile Communication Technology)and the Internet of Things,embedded systems are taking more and more crucial role in aerospace,smart medical,national defense,industrial production and other fields.Due to the advantages of small size,low power consumption and low cost,MCU(Micro Control Unit)occupies an important position in the whole embedded field.As an essential tool for embedded MCU development,the compiler is not only used to convert high-level language programs into low-level machine code,but also can generate more compact and efficient low-level machine code and save system resources by selecting appropriate compiler and compiler optimization options for embedded MCU systems with very limited computing and storage resources.GCC(GNU Compiler Collection)and Clang/LLVM(LLVM,which originally means Low Level Virtual Machine,is a collection of modular and reusable compiler and toolchain technologies,and Clang is a C language family compiler frontend for LLVM)are currently the two most widely used open source compilers.However,based on the research conducted in recent years,it is found that currently there is the lack of comprehensive comparative evaluation research on the two compilers in the field of embedded MCU.Clang/LLVM is a competitor to GCC,and at present it is a pressing issue to know whether Clang/LLVM is suitable for embedded MCU development and what its application effectiveness would be.In addition,during the research,this thesis also found that some of the existing compiler comparative evaluation research did not fully consider the special needs of embedded MCU development,such as not considering power consumption factors,conducting comparative evaluation on non-embedded processor architectures,and outdated compiler versions leading to the loss of guidance of the evaluation results.Therefore,there is room for further improvement and exploration of the existing evaluation scheme.The research work in this thesis provides help and reference to solve the above problems.Based on the analysis and summary of the existing compiler evaluation methods,combined with the practicability of the relevant indices and the feasibility of the test,for the application scenarios of embedded MCU development,this thesis determines a more comprehensive compiler evaluation indices,designs a detailed compiler evaluation scheme,and implements the scheme as a compiler automatic evaluation framework.In addition,this thesis applies the framework to actual comparative evaluation of the latest stable versions of GCC and Clang/LLVM compilers,taking MCUs based on ARM Cortex-M3 and RISC-V32 architectures as examples.Specifically,the main research work of this thesis includes:(1)A set of compiler evaluation scheme for embedded MCU is designed.Compared with the existing related research work,the evaluation indices are more comprehensive and practical.(2)The evaluation scheme designed in this thesis is implemented as a general and portable compiler automatic evaluation framework,which reduces the manual operation of compiler evaluation.Compared with the manual evaluation method,the correctness of the evaluation results and the improvement of the evaluation speed of the automatic evaluation framework are verified.(3)This framework is utilized to compare the two compilers of GCC 12 and Clang/LLVM 15 on the domestic MCU hardware platforms gd32vf103_rvstar and gd32f103c8t6.The comparative evaluation results not only have reference significance for actual embedded project development,but also can provide further optimization direction for compiler developers.The same comparative evaluations were also performed on the stm32f103 hardware platform to verify whether the compiler comparative evaluation results on different hardware platforms of the same architecture(ARM Cortex-M3)are consistent.(4)The compiler comparative evaluation results are fitted to the decision tree model in machine learning.As another representation of the results,it can assist in the decision recommendation of the compiler selection during the actual project development,simplifying the analysis and selection of the comparative evaluation results.
Keywords/Search Tags:MCU, GCC, Clang/LLVM, Evaluation comparison
PDF Full Text Request
Related items