Mathworks: Real Time Workshop and VxWorks 5.3.1

The idea here is that this is my cheat sheet of things I need to do every time I install a new Mathlab/Simulink release. What I do is to use a target system for RTW called mmt386 that is closely modeled after the official tornado target system.

Install the new matlab. At this point in time, I install in a directory somewhere called Mathworks_2007b_64 or some such and make a symbolic link /home/Mathworks to point to that install. This would make a quick switch back to an earlier version pretty easy to do.

Copy the stuff for mmt386

This is in M/rtw/c/mmt386 in the directory for the previous release. It would be good to cross check the following three files against what is in the tornado directory and merge in changes.

mmt386.tlc
mmt386.tmf
rt_main.c

Add a couple of hacks to the extlib source.

This is in M/rtw/c/src/ext_mode_common, in particular there are changes to the following two files:

ext_svr.c
ext_work.c
Look for the strings: MMT and/or tjt in the source tree from the previous release.

At one time I had added some print statements to updown.c, but no longer do I do this.

Build the extlib library

This needs to be looked at in more detail. There are files in both M/rtw/ext_mode and M/rtw/c/src/ext_mode that look like they should be included, but I only am building from some of the files in the latter. In ~/Mathworks I make the directory extlib_2007b and link extlib to it, copy Makefile and README to it, and type make, this yields extlib.o.

Build the rtwlib library

In ~/Mathworks I make the directory rtwlib_2007b and link rtwlib to it, copy Makefile and README to it. Then there is a need for the following 3 files:
rt_nonfinite.c
rt_nonfinite.h
rtwtypes.h
What I do, is to fire up simulink, and use realtime workshop to build some model, then copy these files from there. This tacitly assumes that these files don't change from model to model, and thus far that assumption has been valid.

Once these files are in place, just type make and rtwlib.o gets generated. It usually isn't quite that simple. Files vanish (this is easily detected by the makefile tripping over the missing files), and new one appear (this needs to be discovered by a careful hand inspection of M/rtw/c/libsrc). For 2007b, several files vanished, but no new ones were added.

Build the dsplib library

This is a repeat of what is done for rtwlib. The file rtwtypes.h is needed, and can be grabbed from the rtwlib directory, or the same model it was grabbed from for rtwlib. After this, it is an exercise, as for rtwlib, of discovering what has been removed and added for this release. In the case of 2007b, several directories vanished lock, stock, and barrel, but nothing new was added.
Feedback? Questions? Drop me a line!

Uncle Tom's Computer Info / tom@mmto.org