【实例简介】
simulink自带的realtime workshop,也就是RTW,可以实现代码自动生成,但是,如果要对生成代码进行自定义,控制代码生成过程中的每一个阶段,需要额外的编程,而不是单单搭建好模型就可以的。本文档也仅仅是个简单介绍,详细内容需要参阅help文件。
基于模型设计一自定义目标系统配置指南
基于模型设计一自定义目标系统配置指南
1、自定义目标系统组成
新建一个mdl文件,打开 Tools- Real Time Worksop-Options如下图所示,点击
Browse,在弹出窗口中可以看到本机已有的目标系统,如MPC555C166、ert、gt等。
本教程主要讲述怎样针对S12平台配置自定义的目标系统,其他平台的配置可以
参考此过程修改相应配置。
Configuration Parameters: test/Configuration (Active)
Select
Target
Solwer
System target file: htt tlcl
rouse
--.Diagnostics
Sample Tim
Description:
rkshop Bost Targe
t
er5101
TL
Makefile conf
-Simulation Target
Template makefile:
RReal-Time Workshop
Data specification override
□工
Symbol
g
二[caa21p[sp
图1-1RTW属性设置窗口
system Target File
Descripti
asap2.tlc
ASAM-ASAB2 Data Defination ta
色1七。s2.t⊥c
AUTOSAR
Target Support Package (for use with Infineon C166
c166gxt,t工
Target support package (for use with Infineon C166)(GRT code forma
Embedded Target for Microchip dspIc (real-time)
eyt. tlc
Real-Time Workshop Embedded coder
ext.t⊥c
visual C/C++ Project Makefile only for the Real-Time Workshop Embed
ert shrub. tlc
Real-Time workshop Embedded Coder (host-based shared library target
grt. tlc
Generic Real-Time Target
grt. tic
Visual C/C++ Project Makefile only for the "grt target
c2t a1。e,tc
Generic Real-Time Target with dynamic memory allocation
grt malloc, tlc
Visual C/C++ Project Makefile only for the grt malloc target
ntat, tIc
WorkshOp H。 gt arget
⊥e1 ink ert,t工c
mbedded IDE⊥ nk ERT
bedded IDE Link GRT
Target Support Package ( for use with Freescale MPC5xx) (algorithm e
1mc5550i7t1c
TT色十11 root package if1eti+hFe
两1eMPc5x1nTCe门T
D: Program Files\MATLAB\R201Da\rtw\c\ert\ert. t1
Make command
make rt w
1 Help
!pply
基于模型设计一自定义目标系统配置指南
图1-2已有的目标系统
1.1目标系统自动代码生成过程
目标系统的代码生成过程如下,首先是在 simul