Description
Bug description
I am trying to run FASTv8 on a real-time target (dSPACE1006). It consists of differents steps of a building process : (1) compiling the Simulink model, (2) Linking the application and (3) load the code in the dSPACE.
Here is my error message :
_----------------------------------------------------------------------
Starting build procedure with RTI 7.1 (RTI1006, 02-Nov-2013)
Model: "OpenLoop" (D:\HIL_Hedi\2019\FAST\HediFiles\FASTv8\Simulink\Samples\OpenLoop.mdl)
*** Using configuration set : "Configuration"
*** Working directory : "D:\HIL_Hedi\2019\FAST\HediFiles\FASTv8\Simulink\Samples"
*** Initializing code generation
Starting Simulink Coder build procedure for model: OpenLoop
Generating code into build folder: D:\HIL_Hedi\2019\FAST\HediFiles\FASTv8\Simulink\Samples\OpenLoop_rti1006
FAST (v8.16.00a-bjj, 27-Jul-2016)
Copyright (C) 2016 National Renewable Energy Laboratory
This program comes with ABSOLUTELY NO WARRANTY. See the "license.txt" file distributed with this
software for details.
Running FAST (v8.16.00a-bjj, 27-Jul-2016), compiled as a DLL S-Function for Simulink as a 32-bit
application using single precision
linked with NWTC Subroutine Library (v2.09.00, 23-Jul-2016)
Heading of the FAST input file:
FAST Certification Test #24: NREL 5.0 MW Baseline Wind Turbine with OC3 Hywind Configuration,
for use in offshore analysis
Running ElastoDyn (v1.04.00a-bjj, 26-Jul-2016).
Running AeroDyn (v15.03.00, 27-Jul-2016).
Running AirfoilInfo (v1.01.00a-bjj, 5-Apr-2016).
Running BEM (v1.02.00, 29-Jun-2016).
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 1, Blade = 1
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 2, Blade = 1
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 3, Blade = 1
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 4, Blade = 1
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 1, Blade = 2
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 2, Blade = 2
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 3, Blade = 2
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 4, Blade = 2
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 1, Blade = 3
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 2, Blade = 3
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 3, Blade = 3
Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0. BladeNode = 4, Blade = 3
Running InflowWind (v3.03.00, 26-Jul-2016).
Opening InflowWind input file:
....\CertTest\5MW_Baseline/NRELOffshrBsline5MW_InflowWind_12mps.dat
Reading a 31x31 grid (145 m wide, 17.5 m to 162.5 m above ground) with a characteristic wind
speed of 12 m/s. This full-field file was generated by TurbSim (v1.06.00, 21-Sep-2012) on
07-Jan-2014 at 12:50:45.
Processed 1442 time steps of 20-Hz full-field data (72.05 seconds).
Running ServoDyn (v1.06.00a-bjj, 26-Jul-2016).
Running ServoDyn Interface for Bladed Controllers (using Intel Visual Fortran for
Windows/Matlab, 14-Oct-2015).
Running HydroDyn (v2.05.01, 27-Jul-2016).
Generating incident wave kinematics and current time history.
Reading in WAMIT output with root name "....\CertTest\5MW_Baseline/HydroData/Spar".
Computing radiation impulse response functions and wave diffraction forces.
FAST_InitializeAll:SrvD_Init:ValidatePrimaryData:Yaw angle and rate are not commanded from Simulink model.
ValidatePrimaryData:Pitch angles are not commanded from Simulink model.
ValidatePrimaryData:Generator torque and power are not commanded from Simulink model.
ValidatePrimaryData:HSS brake is not commanded from Simulink model.
Timestep: 0 of 60 seconds.
FAST completed.
*** INFO: For use with RTI the recommended setting of the option
"Software environment/Target function library" is C89/C90 (ANSI).
Current setting is C99 (ISO).
*** Optional User System Description File openloop_usr.sdf not available
Invoking Target Language Compiler on OpenLoop.rtw
Using System Target File: C:\Program Files (x86)\dSPACE RCPHIL 2013-B\MATLAB\RTI\RTI1006\TLC\rti1006.tlc
.
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 OpenLoop.h
.
Writing header file OpenLoop_types.h
Writing source file OpenLoop.c
Writing header file rtwtypes.h
.
Writing header file OpenLoop_private.h
Writing header file rtmodel.h
Writing source file OpenLoop_data.c
.
Writing header file rt_nonfinite.h
Writing source file rt_nonfinite.c
Writing header file rt_defines.h
.
Writing header file rtGetInf.h
Writing source file rtGetInf.c
Writing header file rtGetNaN.h
.
Writing source file rtGetNaN.c
TLC code generation complete.
Generating TLC interface API.
........
*** Generating file OpenLoop_rti.c
*** Generating file OpenLoop_rti.mk
*** Generating Variable Description File OpenLoop.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.
NOTE: The following options in the Configuration Parameters dialog have been used:
Optimization:
"Signal storage reuse" on
"Reuse block outputs" on
As a consequence, in general no block output variables are written to the
-> OpenLoop.trc
file and are therefore not accessible from within ControlDesk.
You can ensure that a specific block output is accessible by declaring
its Simulink signal as a test point. To do so, select the signal line and
choose "Signal properties..." from the Edit menu. In the Signal Properties
dialog, select the "Test point" option.
..
*** Found User-Code File OpenLoop_usr.c from 14-janv.-2021 11:24:00
*** Found User Makefile OpenLoop_usr.mk from 14-janv.-2021 11:24:00
*** Optional User Variable Description File OpenLoop_usr.trc not available
.
Processing Template Makefile: C:\Program Files (x86)\dSPACE RCPHIL 2013-B\MATLAB\RTI\RTI1006\RTI\rti1006.tmf
OpenLoop.mk which is generated from C:\Program Files (x86)\dSPACE RCPHIL 2013-B\MATLAB\RTI\RTI1006\RTI\rti1006.tmf is up to date
Building OpenLoop: dsmake -f OpenLoop.mk GENERATE_REPORT=0 EXTMODE_STATIC_ALLOC=0 TMW_EXTMODE_TESTING=0 EXTMODE_STATIC_ALLOC_SIZE=1000000 EXTMODE_TRANSPORT=0 MAT_FILE=0 NCLIENT="OPTION_DISABLED"
BUILDING APPLICATION "OpenLoop" (Single Timer Task Mode)
WORK DIRECTORY "D:\HIL_Hedi\2019\FAST\HediFiles\FASTv8\Simulink\Samples"
BUILD DIRECTORY "D:\HIL_Hedi\2019\FAST\HediFiles\FASTv8\Simulink\Samples\OpenLoop_rti1006"
TARGET COMPILER "C:\Program Files (x86)\dSPACE RCPHIL 2013-B\Compiler\x86Tools" (DS1006 Compiler Vs 2.3, GCC Vs 3.3.5)
COMPILING "OpenLoop.c"
COMPILING "OpenLoop_data.c"
COMPILING "OpenLoop_trc_ptr.c"
COMPILING "rtGetInf.c"
COMPILING "rtGetNaN.c"
COMPILING "rt_nonfinite.c"
COMPILING "C:\Program Files (x86)\dSPACE RCPHIL 2013-B\MATLAB\RTI\RTI\C\rti_sim_engine.c"
LINKING APPLICATION ...
..\OpenLoop.x86: In function mdlTerminate': ..\OpenLoop.x86(.text+0x8d): undefined reference to
FAST_End'
..\OpenLoop.x86: In function mdlInitializeSizes': ..\OpenLoop.x86(.text+0x273): undefined reference to
FAST_Sizes'
..\OpenLoop.x86: In function mdlStart': ..\OpenLoop.x86(.text+0x4e8): undefined reference to
FAST_Start'
..\OpenLoop.x86: In function mdlOutputs': ..\OpenLoop.x86(.text+0x610): undefined reference to
FAST_Start'
..\OpenLoop.x86: In function mdlUpdate': ..\OpenLoop.x86(.text+0x700): undefined reference to
FAST_Update'
-- call "C:\Program Files (x86)\dSPACE RCPHIL 2013-B\Compiler\x86Tools\BIN\x86-ld.exe" -T "C:\Program Files (x86)\dSPACE RCPHIL 2013-B\DS1006\RTLib\extsym1006.lk" -o NUL ..\OpenLoop.x86
LINKING FAILED (2)(1)
MAKE PROCESS ABORTED
*** Errors occurred during make process.
*** Inspect MATLAB Command Window for details.
*** Aborting RTI build procedure for model OpenLoop.
*** Stopped RTI build procedure for model: OpenLoop._
End of the error message
It seems that it cannot find the FAST_End and ohters functions. By checking with "Dependency Walker", the mex32 (because I am using a 32bits versions of MatlabR2012b connecter to the 32bits dSPACE) the functions are well included in the mex file.
Does someone has an idea please ?
Best regards,