Target Language Compiler | ![]() ![]() |
Generating Auxiliary Files for Batch FTP
Objective: One application that could use an auxiliary file is automating the process of downloading source files (e.g., model
.c
, model
.h
, model
.rtw
, model
_prm.h,
model
_reg.h
, model
.mk
) to an external target. Such cases arise when the compiler resides on the machine. For example, LynxOS and QNX are UNIX-based systems that allow you to run a compiler under the RTOS where the real-time executable will run.
The files for this exercise are in the tlctutorial
/addinfo
directory of the TLC examples directory.
Exercise
grt.tlc
(in matlabroot
/rtw/c/grt/grt.tlc
) to your current working directory.ftpdownload.tlc
in grt.tlc
. ftp_assign.tlc
file to ftpdownload.tlc
into the same directory.This exercise only requires you to add the ability for TLC to extract the model name and place it in the file that is generated. The information required can be found in the first few lines of the model
.rtw
file.
ftpdownload.tlc
file so that it extracts the model name and outputs the appropriate filenames to a file called download
along with the ftp commands..mdl
files used thus far) and generate code for it using the modified grt.tlc
file that you have just created. Look at the file download
to see if everything has proceeded okay.![]() | "Hello World" Example with model.rtw File | Generating Code for Models with States | ![]() |