摘要
Real-time workshop(RTW)可将Matlab/Simulink中的图形化设计模块生成用户目标所需的C语言代码,极大地方便了汽车电子ECU的软件开发。介绍了基于RTW的嵌入式C语言代码自动生成技术,分析RTW对微控制器的支持,代码效率的影响因素及代码优化方法,并进行代码的生成、移植和测试。实例证明,RTW生成标准C语言代码的效率高,代码执行快,可读性强,适用于所有资源足够的8位微控制器。
Real-time workshop makes it possible to covert the diagram model in Matlab/Simulink into the target C-code,which benefits the development of the software system of automotive ECUs a lot.This paper introduces the relative techniques of the C-code generation based on RTW,and analyses the supported MCU platforms of RTW and the factors affecting code efficiency,then conducting code porting and testing.Experimental results show that the Ccode generated from RTW has the advantages of high efficiency,nice readability,and is suitable for any 8-bit MCU having enough resources.
出处
《机电一体化》
2014年第A03期41-45,共5页
Mechatronics
基金
国家863项目(编号2011AA11A265)
关键词
RTW代码生成
代码执行效率
代码优化
代码移植
RTW code generation
code execution efficiency
code optimization
code transplantation