|
Sebastian,
It is unfortunate that the error message is not very
indicative of the real problem...The real lines of interest
to you are these..
---
./sinusgenerator_dy8147e2cu6.c:8:20: ss2dym.c: No such file
> or directory
> ../sinusgenerator_dy8147e2cu6.c:15:22: matrixop.h: No such
> file or directory
> ../sinusgenerator_dy8147e2cu6.c:21:20: moutil.c: No such
> file or directory
> ../sinusgenerator_dy8147e2cu6.c:22:22: dsblock1.c: No such
> file or directory
---
Its clear that you have a bunch of legacy code integrated
with the model. Unfortunately, RTW is unable to find a bunch
of files. The rest of the parse errors are compiler errors
that follow from this deficiency..
What you should do is go to the custom code pane in the
Configuration Parameters and correctly include the source
and the header files (implying correctly specify the path to
the source and headers).
Also, I'd recommend that if your file sizes are large you
use a professional compiler such as MSVC as opposed to using
the standard LCC which is shipped.
Thanks.
Chindu.
"Sebastian " <nowoisky@cs.tu-berlin.de> wrote in message
<fa3oj0$fkq$1@fred.mathworks.com>...
> Hi there,
>
> I got a real big problem. I worked with Dymola v. 6.1,
> Matlab R2007a and dSPACE DS1006 board.
>
> I create a small Dymola Modell an build the s-function in
> Simulink. That works well, but if I choose in the Dymola
> Modell that the Option "Evaluate parameter to reduce
> modells" Experiment setup\translation. I didn't get the
> inner parameters in the s-function. That is the second
> problem with the Interface between Dymola and Matlab.
>
> To compile this modell it works fine, the *.mdl file is
> created and I get correct values after the simulation in
> Simulink.
>
> Now I like to build the *.sdf file to run this modell at the
> dSPACE expansion box. But the Compiler stops and I get the
> following Message:
>
> ------------------------------------------------------------
> Error building Real-Time Workshop target for block diagram
> 'Simulink_Test'. MATLAB error message:
> Error using ==> RTW.genMakefileAndBuild at 937
> *** Make process failed while compiling, linking, or loading
> *** Detailed error messages are printed in the MATLAB
> Command Window
> *** Aborted RTI build procedure for model Simulink_Test.
> ------------------------------------------------------------
>
> This is shown in the command window:
>
>
> ------------------------------------------------------------
>
----------------------------------------------------------------------
> Starting build procedure with RTI 5.5 (RTI1006, 27-Jun-2007)
> Model: "Simulink_Test"
> (D:\OWL_Tutoren\Sebastian\Simulink\Simulink_Test.mdl)
>
----------------------------------------------------------------------
> *** Using configuration set : "Configuration"
> *** Working directory :
> "d:\owl_tutoren\sebastian\simulink"
> Warning: Output port 1 of 'Simulink_Test/DymolaBlock' is not
> connected.
> *** Optional User System Description File
> simulink_test_usr.sdf not available
> *** Initializing code generation
> ### Starting Real-Time Workshop build procedure for model:
> Simulink_Test
> ### Generating code into build directory:
> d:\owl_tutoren\sebastian\simulink\Simulink_Test_rti1006
> Warning: Output port 1 of 'Simulink_Test/DymolaBlock' is not
> connected.
> ### Invoking Target Language Compiler on Simulink_Test.rtw
> tlc
> -r
>
d:\owl_tutoren\sebastian\simulink\Simulink_Test_rti1006\Simulink_Test.rtw
> C:\dSPACE\matlab\rti1006\tlc\rti1006.tlc
> -Od:\owl_tutoren\sebastian\simulink\Simulink_Test_rti1006
> -IC:\dSPACE\matlab\rti1006\tlc
> -Id:\owl_tutoren\sebastian\simulink\Simulink_Test_rti1006\tlc
> -IC:\Programme\MATLAB\R2007a\rtw\c\tlc\mw
> -IC:\Programme\MATLAB\R2007a\rtw\c\tlc\lib
> -IC:\Programme\MATLAB\R2007a\rtw\c\tlc\blocks
> -IC:\Programme\MATLAB\R2007a\rtw\c\tlc\fixpt
> -IC:\Programme\MATLAB\R2007a\stateflow\c\tlc
> -aEnforceIntegerDowncast=1
> -aFoldNonRolledExpr=1
> -aInlineInvariantSignals=0
> -aInlineParameters=0
> -aLocalBlockOutputs=0
> -aRollThreshold=5
> -aZeroInternalMemoryAtStartup=1
> -aZeroExternalMemoryAtStartup=1
> -aInitFltsAndDblsToZero=1
> -aGenerateReport=0
> -aGenCodeOnly=0
> -aRTWVerbose=1
> -aIncludeHyperlinkInReport=0
> -aLaunchReport=0
> -aForceParamTrailComments=0
> -aGenerateComments=1
> -aIgnoreCustomStorageClasses=1
> -aIncHierarchyInIds=0
> -aMaxRTWIdLen=31
> -aShowEliminatedStatements=0
> -aPrefixModelToSubsysFcnNames=1
> -aIncDataTypeInIds=0
> -aInsertBlockDesc=0
> -aSimulinkBlockComments=1
> -aInlinedPrmAccess="Literals"
> -aTargetFcnLib="ansi_tfl_tmw.mat"
> -aIsPILTarget=0
> -aLogVarNameModifier="rt_"
> -aGenerateFullHeader=1
> -aExtMode=0
> -aExtModeStaticAlloc=0
> -aExtModeTesting=0
> -aExtModeStaticAllocSize=1000000
> -aExtModeTransport=0
> -aRTWCAPISignals=0
> -aRTWCAPIParams=0
> -aGenerateASAP2=0
> -aInitialSimState="RUN"
> -aExecutionMode="real-time"
> -aExecutionModeNonUI="RTSIM"
> -aTimeScaleFactor="1.0"
> -aTimeScaleFactorNonUI="OPTION_DISABLED"
> -aAssertionMode="OFF"
> -aTAStimulusEngineEnable=0
> -aEnableRealTimeTesting=0
> -aEnableRealTimeTestingNonUI="OFF"
> -aCCompilerCommonOpts=""
> -aCCompilerOptimizationOptsPopup="Default (-O2
> -finline-functions -D_INLINE)"
> -aCCompilerOptimizationOpts=""
> -aCCompilerOptimizationOptsNonUI="USE_DEFAULT"
> -aLoadAfterBuild=1
> -aLoadToFlash=0
> -aLoadApplNonUI="ON"
> -aPlatformSelectionPopup="Auto"
> -aBoardName=""
> -aBoardNameNonUI="OPTION_DISABLED"
> -aNetworkClient=""
> -aNetworkClientNonUI="OPTION_DISABLED"
> -aTRCMaskParameters=0
> -aTRCGenerateLabels=1
> -aTRCGenerateVirtualBlocks=1
> -aTRCGenerateStates=0
> -aTRCGenerateDerivatives=0
> -aTRCApplySubsystemPermissions=0
> -aTRCGenerateParamValues=0
> -p10000
>
>
> ### Loading TLC function libraries
>
> .....
> ### Initial pass through model to cache user defined code
> .
> *** Postprocessing RTI blocks
> *** Starting I/O block checking
> *** Passed I/O block checking
> ### Caching model source code
> .......................
> ### Writing header file Simulink_Test_types.h
> ### Writing header file Simulink_Test.h
> ### Writing source file Simulink_Test.c
> ### Writing header file Simulink_Test_private.h
> .
> ### Writing header file rtmodel.h
> ### Writing source file Simulink_Test_data.c
> ### Writing header file rt_nonfinite.h
> .
> ### Writing source file rt_nonfinite.c
> ### TLC code generation complete.
> ### Generating TLC interface API.
> ..
> *** Generating file Simulink_Test_rti.c
> *** Generating file Simulink_Test_rti.mk
> *** Generating Variable Description File Simulink_Test.trc
>
>
-------------------------------------------------------------------------------
> NOTE: The following option in the Configuration Parameters
> dialog has been
> used:
>
> Optimization:
> "Conditional input branch execution" On
>
> This leads to code optimization in which blocks are
> not computed if their
> outputs are not required in the simulation step, for
> example, if their
> output values are used as input for a Switch block and
> the Switch
> currently routes another signal. When the
> corresponding output signals
> are displayed in ControlDesk, their values are static.
>
> To ensure that the blocks are computed, turn off the
> "Conditional input branch execution" option and
> rebuild the model.
>
-------------------------------------------------------------------------------
> .
> *** Optional User Variable Description File
> Simulink_Test_usr.trc not available
> *** Found User-Code File Simulink_Test_usr.c from
> 17-Aug-2007 10:33:49
> *** Found User Makefile Simulink_Test_usr.mk from
> 17-Aug-2007 10:33:49
> .
> ### Processing Template Makefile:
> C:\dSPACE\matlab\rti1006\m\rti1006.tmf
> ### Simulink_Test.mk which is generated from
> C:\dSPACE\matlab\rti1006\m\rti1006.tmf is up to date
> ### Building Simulink_Test: dsmake -f Simulink_Test.mk
> GENERATE_REPORT=0 EXTMODE_STATIC_ALLOC=0
> TMW_EXTMODE_TESTING=0 EXTMODE_STATIC_ALLOC_SIZE=1000000
> EXTMODE_TRANSPORT=0
>
> BUILDING APPLICATION (Single Timer Task Mode)
>
> WORK DIRECTORY "d:\owl_tutoren\sebastian\simulink"
> BUILD DIRECTORY
> "d:\owl_tutoren\sebastian\simulink\Simulink_Test_rti1006"
> TARGET COMPILER "C:\x86Tools" (Vs 3.3.5)
>
> COMPILING Simulink_Test.c
> COMPILING Simulink_Test_data.c
> COMPILING C:\PROGRA~1\MATLAB\R2007a\rtw\c\src\rt_matrx.c
> COMPILING rt_nonfinite.c
> COMPILING C:\dSPACE\MATLAB\RTI1006\C\rt_printf.c
> COMPILING C:\dSPACE\MATLAB\RTI1006\C\rti_sim_engine.c
> COMPILING ..\sinusgenerator_dy8147e2cu6.c
> ../sinusgenerator_dy8147e2cu6.c:8:20: ss2dym.c: No such file
> or directory
> ../sinusgenerator_dy8147e2cu6.c:15:22: matrixop.h: No such
> file or directory
> ../sinusgenerator_dy8147e2cu6.c:21:20: moutil.c: No such
> file or directory
> ../sinusgenerator_dy8147e2cu6.c:22:22: dsblock1.c: No such
> file or directory
> ../sinusgenerator_dy8147e2cu6.c:34: error: parse error
> before "BoundParameterSection"
> ../sinusgenerator_dy8147e2cu6.c:39: error: `false'
> undeclared here (not in a function)
> ../sinusgenerator_dy8147e2cu6.c:39: warning: data definition
> has no type or storage class
> ../sinusgenerator_dy8147e2cu6.c:39: error: parse error
> before numeric constant
> ../sinusgenerator_dy8147e2cu6.c:39: warning: data definition
> has no type or storage class
> ../sinusgenerator_dy8147e2cu6.c:39: error: redefinition of
> `Init'
> ../sinusgenerator_dy8147e2cu6.c:39: error: `Init' previously
> defined here
> ../sinusgenerator_dy8147e2cu6.c:39: error: `true' undeclared
> here (not in a function)
> ../sinusgenerator_dy8147e2cu6.c:39: warning: data definition
> has no type or storage class
> ../sinusgenerator_dy8147e2cu6.c:42: error: parse error
> before "Output"
> ../sinusgenerator_dy8147e2cu6.c:42: error: function `Output'
> is initialized like a variable
> ../sinusgenerator_dy8147e2cu6.c:42: warning: implicit
> declaration of function `Parameter'
> ../sinusgenerator_dy8147e2cu6.c:42: warning: implicit
> declaration of function `Input'
> ../sinusgenerator_dy8147e2cu6.c:42: warning: data definition
> has no type or storage class
> ../sinusgenerator_dy8147e2cu6.c:46: error: parse error
> before "AcceptedSection1"
> ../sinusgenerator_dy8147e2cu6.c:54:22: dsblock6.c: No such
> file or directory
> ../sinusgenerator_dy8147e2cu6.c:92:22: dsblock5.c: No such
> file or directory
> {standard input}: Assembler messages:
> {standard input}:13: Error: symbol `Init' is already defined
>
> COMPILING FAILED (1)
>
> MAKE PROCESS ABORTED
>
> *** Stopped RTI build procedure
> ------------------------------------------------------------
>
>
> Please could someone tell me what is wrong to comile clean
> Simulink modells it works without any errors, but if I like
> to use s-function it doesn'nt do this.
>
>
> I have read th bug reports
>
>
http://www.dspace.com/ww/en/pub/home/support/patches/suppatchsfc/tmwpr47238.cfm
>
> and I have done these to workarounds:
>
>
http://www.mathworks.com/support/bugreports/details.html?rp=380630
>
>
http://www.mathworks.com/support/bugreports/details.html?rp=361994
>
>
> Thank you for your great help and advanced
>
> Sebastian Nowoisky
>
>
>
>
>
>
|