Why do I receive an error when I use the S-function builder to generate an S-function for use with the Embedded Target for TI C6000 DSP 1.0 (R13)?

2 views (last 30 days)
I am using the S-function builder to generate an S-function for use with the Embedded Target for TI C6000 DSP 1.0(R13). The TLC files generated by the S-Function Builder do not seem to support the TI C6000 target. The following error message appears after generating code:
Error executing build command: Error using ==> make_rtw
Error using C:/matlab6p5_dsp/toolbox/ccslink/ccslink/private/beforemakehookpoint_dsptarget
The model contains non-inlined s-function blocks, which cannot be used with the Target for C6000. Please remove the following blocks from the model 'modelname_wrapper'.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The Embedded Target for TI C6000 DSP does not support non-inlined S-functions, that is, S-functions without TLC files. However, if you have a TLC file built using the S-function builder, please follow the instructions below in order to avoid the above error message:
1. Navigate to the following directory:
$MATLABROOT\toolbox\ccslink\ccslink\private
(where $MATLABROOT = MATLAB root directory on your machine)
and edit the file 'beforemakeHookpoint_DSPtarget.m'
2. Comment out the following code, as this prevents the error message from being thrown:
% Error if there are any non-inlined s-functions
% (i.e., blocks without tlc files)
nisf = modelInfo.buildOpts.noninlinedSFcns;
if ~isempty(nisf),
msg = sprintf([...
'The model contains non-inlined s-function blocks, which cannot be used with \n' ...'the Target for C6000. Please remove the following blocks
from the model: \n' ]);
for k = 1:length(nisf),
msg = [msg nisf{k} ' ' ];
end
error(msg);
end
3. Rebuild your model. You should get through to the Code Composer Studio IDE this time, however, you will get a linker error.
4. To avoid the linker error, the "<name>_wrapper.c" file that was generated by the S-function Builder needs to be added to the project. Add this file to the project, and rebuild.
5. You should now be able to generate code from your model using the Embedded Target fot TI C6000 DSP.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!