| The engine electronic control system becomes more and more complex with thegrowing energy crisis, environmental problems and higher requirements for power,economy, emissions and safety performance of vehicle. It’s difficult for serialdevelopment method to meet the complexity and quickness demand of the market,whose development order is requirement analysis, system design, functionsimplementation and experimental verification. How to find a quick and efficientdevelopment means is the major goals of the main auto makers. Automatic codegeneration technology offers a real-time and effective research platform for thedevelopment of engine electronic control system, which greatly shorten the productdevelopment cycle and reduce the development cost due to crossly develop andvalidate the engine electronic control system. But the existing code generation tools atmarket are not suitable to all hardware environment and are expensive.Based on the above situation, refer to the function structure of automatic code generation tool at home and abroad, analyze the functional requirements of engine electronic control code generation software system and put forward a design scheme for engine electronic control code generation software system whose software environment is MATLAB/SIMULINK/RTW and hardware environment is infineon TC1728micro controller. The following are the main work:(1)Analyzed in detail the composition and working principle of engine electronic control system. Further studied the automatic code generation technology. Based on prior work determined the function of engine electronic control code generation software systems.The function of engine electronic control code generation software system is divided into the Modeling function, automatic code generation function, compiling and linkage function, download function, according to the functional requirements of electronic engine control code generation software system and the idea of modularization. At the same time detailed the functions of the above four parts.(3) Complete the function development of engine electronic control code generation software system. First of all, implement the development of the underlying driver module library and realize the extension of Simulink modeling function based on existing modeling function of Simulink, using the CMEX Sâ€Function and the corresponding Target Language Compiler TLC (Target Language Compiler). Secondly, write the code generation control file by using the target language compiler TLC and implement the automatic code generation function of the system. Finally, generate the make files by writing template program files and implement the compilation and link function of the system.(4) Set up function test environment of engine electronic control code generation software system based on Infineon microcontrollersTC1728and compiler HighTec GNU. Set up testing model in the case of LED module structures. Implement the test for engine electronic control code generation software system function.Experimental results show that the engine electronic control code generation software system developed in this paper realize the embedded code automatic generation in the goal environment.Automatically generated code is in accordance with the structure of the traditional application development. So the automatically generated code has strong readability, efficient code and avoids the disadvantage of manual coding, which is practical. |