Error message - OPUS MAKE: Don't know how to make

dSPACE FAQ 256
FAQ 256
Error message - OPUS MAKE: Don't know how to
make
Keywords
OPUS MAKE; compiler; user makefile; search path; C-coded S-Function; TargetLink Blockset (standalone)
Question
I achieve the error message OPUS MAKE: Don't know how to make <filename>.<…>. Stop while
compiling the generated code (while the make utility is running).
How can I find the reason for this error message?
Solution
The make utility (OPUS MAKE) instructs to compile a C-coded source file named <filename>.c.
The compile process is stopped because of the missing source file. The source file cannot be found on
the compiler’s search path. The following scenarios and descriptions can help to find the problem of
the missing source file:
1.) Your model contains of M-coded S-Functions. Do not use M-coded S-Functions in Simulink
models that you want to use for building real-time programs (FAQ 248)
2.) Your model contains a C-coded S-Function, but the make utility cannot find the corresponding
C source file. Place the C source files of your S-Functions in the same working folder as the
model or in the same folder as the MEX DLL. Alternatively specify the S-function folder in the
user makefile. To specify the S-Function folder in the user makefile, add the name of the
folder to the entry.
# Directories for S-Functions
SFCN_DIR =
You can find the user makefile template <model>_usr.mk in the working folder of the model.
As an alternative to the user makefile you can use the Configuration Parameter’s custom code
page (FAQ 271)
3.) A user makefile has been defined for a model which contains user-written C-coded
S-Functions. The model has been renamed, but the related user makefile has not been
renamed accordingly. Please check whether the user makefile template or a specific usermakefile is used (the settings of the user makefile are displayed at the beginning of the
compile process).
4.) An additional C-coded source file has been defined at the user makefile setting USER_SRCS,
but the compiler is not able to locate the source file. Place the C-coded source files in the
same working folder as the model or specify the folder in the user makefile. To specify the
specific folder in the user makefile, add the name of the folder to the entry
# Directories where additional C and assembler source files are
stored.
USER_SRCS_DIR =
5.) An additional C-coded source file has been defined at the custom code pane setting “Source
Files” on the Configuration Parameter’s page custom code, but the compiler is not able to
locate the source file. Place the C-coded source files in the same working folder as the model
or specify the folder at the custom code pane “Include directories” setting.
6.) Your model contains blocks from the TargetLink Blockset and the RTI build process is started
without switching to the TargetLink Blockset (stand-alone) before. Please make use of the
Error message - OPUS MAKE: Don't know how to make
FAQ Version: 1 / 2013-02-26
Page 1
dSPACE FAQ 256
documented API command tl_switch_blockset to switch to the TargetLink Blockset
(stand-alone).
7.) Your model contains blocks from the TargetLink Blockset, the TargetLink blockset (standalone) has been activated, but the links to the blocks of the TargetLink blockset have been
broken before. Simulink cannot reference the exchanged blocks from the TargetLink blockset.
We recommend leaving the TargetLink blocks untouched, when working with the RTI.
8.) Your model contains a C++ coded S-Function, but the dSPACE C++ Integration Kit is not yet
installed. If available please install the Integration Kit or contact the responsible sales engineer
to get further information about the C++ Integration Kit.
9.) Your model contains a TargetLink stand-alone S-Function generated from the TargetLink
Model Manager. Please check whether the user-makefile used for the build process consists
of TargetLink specific settings and include instructions, which are encapsulated with the
following comments
#-----------------------------------------------------------------# Begin of settings done by TargetLink's Standalone Model Manager
# for model '<model>'.
#-----------------------------------------------------------------# include TL model Makefile
%include <model>.mk
USER_SRCS += …
USER_INCLUDES_PATH += …
#-----------------------------------------------------------------# End of settings done by TargetLink's Standalone Model Manager
# for model '<model>'.
#-----------------------------------------------------------------otherwise the user-makefile generated from the TargetLink Model Manager or the adapted
user-makefile for the integration of a TargetLink stand-alone S-Function is not used for the RTI
build process (FAQ 243).
If the scenarios mentioned above or problem descriptions does not help please contact
[email protected] and provide the following information.
1.) The Simulink model and all generated makefiles with the extension .mk from the working
directory, build directory and additional folders.
2.) Execute the commands (the model <model>.mdl must be opened)
>> rti_build('<model>','Command','CleanUp')
>> [errorFlag, errorMsg] = rti_build('<model>','Command',
'CodeGen&Make','LogOutput','on')
at the MATLAB command window and provide the file <model>_rti<xxxx>_log.txt from
the working directory.
3.) Answers to the questions “Are TargetLink stand-alone S-Functions part of the model“? and
“Are blocks from the TargetLink blockset (stand-alone) part of the model?”
Error message - OPUS MAKE: Don't know how to make
FAQ Version: 1 / 2013-02-26
Page 2
dSPACE FAQ 256
Related documents
For more detailed information regarding the user makefile refer to User Makefile (USR.MK File) in the
RTI and RTI-MP Implementation Reference.
For more detailed information regarding the TargetLink Model Manager refer to How to Prepare the
Simulation of Production Code in a dSPACE Prototyping Environment in the TargetLink Production
Code Generation Guide
For more detailed information how the C or C++ S-Function source files are handled by the Real-Time
Workshop/Simulink Coder please refer to Implicit Build Support in the Real-Time Workshop/Simulink
Coder User’s Guide
Related FAQs

FAQ 271: Alternatives for the User-Code and User-Make file

FAQ 243: Running TargetLink code with RTI

FAQ 246:: Using M-Code with RTI
Error message - OPUS MAKE: Don't know how to make
FAQ Version: 1 / 2013-02-26
Page 3
dSPACE FAQ 256
How to Contact dSPACE Support
dSPACE GmbH
Rathenaustr. 26
D-33102 Paderborn
Germany
++49 5251 1638-941
mailto:[email protected]
http://www.dspace.com/support
dSPACE recommends that you use the support request form on the internet to contact
dSPACE support.
It is available under

http://www.dspace.com/goto?supportrequest
Software Updates and Patches
dSPACE strongly recommends that you download and install the most recent patches for your
current dSPACE installation. Visit http://www.dspace.com/goto?patches for software updates
and patches.
FAQ
FAQ documents are available under http://www.dspace.com/goto?faq.
Important Notice
This document contains proprietary information that is protected by copyright. All rights are
reserved. Neither the documentation nor software may be copied, photocopied, reproduced,
translated, or reduced to any electronic medium or machine-readable form, in whole or in part,
without the prior written consent of dSPACE GmbH.
© Copyright 2013 by:
dSPACE GmbH
Rathenaustr. 26
D-33102 Paderborn
Germany
This publication and the contents hereof are subject to change without notice.
For a list of registered trademarks of dSPACE products refer to
http://www.dspace.com/goto?Trademarks
Error message - OPUS MAKE: Don't know how to make
FAQ Version: 1 / 2013-02-26
Page 4