User`s guide

Step-by-Step Example of Fortran and xPC Target™
The build procedure has access to the Fortran run-time libraries (see
“Compiling and Linking the Wrapper S-Function” o n page 13-12 ) for the
link stage.
This topic assumes that you have validated the Fortran code and wrapper
S-function (see “Validating the Fortran Code and Wrapper S-Function” on
page 13-14).
1 In the MATLAB window, type
fortran_atmos_xpc
This opens the Simulink model a ssociated with the Atmosphere model.
2 In the Simulink model, from the Simulation menu, click Configuration
Param ete rs .
The Configuration Parameters dialog box appears.
3 In the left pane, click the Real-Time W orkshop node.
The Real-Time Workshop pane opens.
4 In the Target selection section, click the Browse button at the System
target file list.
5 Click xpctarget.tlc.
6 In the Make command field, replace make_rtw with one for the Fortran
compiler.
make_rtw S_FUNCTIONS_LIB="..\sfun_atmos_sub.obj ..\libifcoremt.lib ..\libmmt.lib
..\ifconsol.lib ..\libifport.lib ..\libirc.lib ..\svml_disp.lib"
Ensure that the whole command is all on one line.
7 Click Apply.
8 Click OK.
9 From the File menu, click Save.
13-15