Font Size: a A A

Research On RTW Automatic Code Technology Based On MC9S12XEP100

Posted on:2019-09-22Degree:MasterType:Thesis
Country:ChinaCandidate:H H LiFull Text:PDF
GTID:2518306470498894Subject:Vehicle Engineering
Abstract/Summary:PDF Full Text Request
Traditional vehicle embedded software development process is mainly based on the software requirements documents and related technical requirements,handwritten C code or assembly language by the software staff in the relevant hardware platform for functional program development.This will require developers to not only grasp the characteristics of embedded hardware platforms and hardware circuit framework,but also need to have the signal processing algorithms and hardware development applications required for the programming of the classic,which will undoubtedly greatly increase the difficulty of embedded development.At the same time,as the complexity of vehicle control increases,the correlation among various systems becomes more and more close,which makes the software development and debugging more and more difficult.This will greatly reduce the software development efficiency.With the development of model-based embedded software development,Simulink and Real-Time Workshop Embedded Coder(RTWEC)tools developed by MATLAB provide the platform for developers to develop and simulate and test the same source code for algorithm development and hardware platform.Development efficiency has been greatly improved.However,MATLAB itself only carries the support library of some manufacturers' control chips.For the hardware platform developed by users themselves,the "secondary development" of RTW can be utilized.According to the hardware characteristics of different core control chips,the control code of the control chip is designed Support library,in order to be able to tie in with the algorithm model to achieve seamless connection between the underlying and application layer software.This paper presents a hardware platform based on Simulink and RTW for Freescale's16-bit microcontroller MC9S12XEP100 and the application of peripheral devices to create a hardware support library for the microcontroller peripheral registers Through the Simulink platform application MC9S12XEP100 support library algorithm model to build the hardware support library functions to verify.First of all,analyze the function module of MC9S12XEP100 microcontroller,use "secondary development" of RTW to write specific C Mex S function and corresponding TLC file for different function module of this microcontroller,and create MC9S12XEP100 microcontroller Peripheral register drive module,the establishment of the corresponding hardware driver support library.Secondly,taking MC9S12XEP100 as the hardware platform to control the core design and test circuit board;combining the automatic code generation function of RTW,using the hardware support library of MC9S12XEP100 to build the algorithm test model of the corresponding functional module,and automatically generating the C code into an executable file Download to test circuit board for support library verification and testing.This paper studies the scalability of RTW auto-generated code.At the same time,on the basis of solid theoretical support,a hardware driver support library is created for the MC9S12XEP100 microcontroller,which is widely used in the automotive electronics industry,and the hardware coordination based on the processor is realized Simulation test.The research results can be widely used in the development and application of different types of microcontrollers,and can speed up the development speed to reduce development difficulty and realize the cost.
Keywords/Search Tags:Simulink, RTW, Automatic code generation, C Mex S function, TLC file
PDF Full Text Request
Related items