Error while building model on xPC Target
조회 수: 1 (최근 30일)
이전 댓글 표시
I have compiled my functions individually and they work fine but when I compile them together I am getting the following error. HIL is the name of the final block that I tried building on my Target PC.
There are no functions or variables with '_c' or '_m' extensions.
### Invoking Target Language Compiler on HIL.rtw
### Using System Target File: C:\MyMatlab1\R2014a\toolbox\slrt\rtw\slrtert.tlc
[Warning: This model contains blocks that do
not handle sample time
changes at runtime. To avoid incorrect
results, only change
the sample time in the original model, then
rebuild the model.]
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Generating TLC interface API.
### Writing header file HIL.h
### Writing header file HIL_types.h
### Writing header file rtwtypes.h
### Writing header file builtin_typeid_types.h
### Writing header file multiword_types.h
### Writing source file HIL.c
### Writing source file HIL_capi.c
### Writing header file HIL_capi.h
### Writing header file HIL_private.h
### Writing header file rtmodel.h
### Writing source file HIL_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.
### Creating data type transition file HIL_dt.h
### Creating xPC Options Header file xpcoptions.h.
### Creating xPC Definition File xpcvcdll.def
### Creating model Hierarchy xml HIL.xml
### Creating model HIL_ref.m
### Patch bio and pt MATLAB files
### Create sorted BIO
### Create sorted PT
### Patch xml-file
### Processing Template Makefile: C:\MyMatlab1\R2014a\toolbox\slrt\rtw\slrtert_vc.tmf
### HIL.mk which is generated from C:\MyMatlab1\R2014a\toolbox\slrt\rtw\slrtert_vc.tmf is up to date
### Building HIL: .\HIL.bat
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>call setup_mssdk71.bat
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set COMPILER=cl
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set COMPFLAGS=/c /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE -I"C:\MyMatlab1\R2014a\extern\include" -I"C:\MyMatlab1\R2014a\simulink\include" /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /DMATLAB_MEX_FILE
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set OPTIMFLAGS=/O2 /Oy- /DNDEBUG
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set DEBUGFLAGS=/Z7
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set LINKER=link
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set LINKFLAGS= /nologo /manifest /incremental:NO /export: /DLL /LIBPATH:"C:\MyMatlab1\R2014a\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /EXPORT:mexFunction
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set LINKDEBUGFLAGS=/debug /PDB:".mexw32.pdb"
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set NAME_OUTPUT=/out:""
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set PATH=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files\Microsoft Visual Studio 10.0\VC\Bin;C:\Program Files\Microsoft Visual Studio 10.0\VC\Bin\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Bin;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Bin;;;C:\MyMatlab1\R2014a\bin\win32;C:\Program Files\Measurement Computing\DAQ\;C:\watcom-1.3\binnt;C:\watcom-1.3\binw;C:\Program Files\MATLAB\R2014a\runtime\win32;C:\Program Files\MATLAB\R2014a\bin;C:\Program Files\MATLAB\R2010a\bin;C:\Program Files\MATLAB\R2010a\bin\win32;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\National Instruments\Motion Assistant\bin\mxwplugins;C:\Program Files\National Instruments\Shared\System\;C:\Program Files\MATLAB\R2010a\runtime\win32;C:\Program Files\MATLAB\R2010a\bin;C:\Program Files\Microsoft Windows Performance Toolkit\
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set INCLUDE=C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\\INCLUDE\gl;;
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set LIB=C:\Program Files\Microsoft Visual Studio 10.0\VC\Lib;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Lib;;
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>set LIBPATH=C:\Program Files\Microsoft Visual Studio 10.0\VC\Lib;C:\Program Files\Microsoft SDKs\Windows\v7.1\\LIB;C:\Program Files\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB;C:\MyMatlab1\R2014a\extern\lib\win32;;
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>cd .
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>nmake -f HIL.mk GENERATE_ERT_S_FUNCTION=0 INCLUDE_MDL_TERMINATE_FCN=1 COMBINE_OUTPUT_UPDATE_FCNS=0 MAT_FILE=1 MULTI_INSTANCE_CODE=0 INTEGER_CODE=0 EXT_MODE=1 OPTS="-DON_TARGET_WAIT_FOR_START=0"
Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved.
### Compiling HIL.c cl -D_MT -MT /wd4996 /fp:precise -DON_TARGET_WAIT_FOR_START=0 /W3 /c /nologo /O2 /Oy- -DMODEL=HIL -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DMT=0 -DHAVESTDIO -DXPCMSVISUALC -DXPCCALLCONV=__cdecl -DUSE_RTMODEL -DERT_CORE HIL.c HIL.c c:\users\administrator\downloads\hil simulink\try\hil_slrtert_rtw\HIL.h(800) : error C2143: syntax error : missing '{' before '.' c:\users\administrator\downloads\hil simulink\try\hil_slrtert_rtw\HIL.h(800) : error C2059: syntax error : '.' c:\users\administrator\downloads\hil simulink\try\hil_slrtert_rtw\HIL.h(970) : error C2061: syntax error : identifier 'HIL_B' c:\users\administrator\downloads\hil simulink\try\hil_slrtert_rtw\HIL.h(970) : error C2059: syntax error : ';' c:\users\administrator\downloads\hil simulink\try\hil_slrtert_rtw\HIL_dt.h(56) : error C2065: 'HIL_B' : undeclared identifier c:\users\administrator\downloads\hil simulink\try\hil_slrtert_rtw\HIL_dt.h(56) : error C2224: left of '.q_br_m' must have struct/union type HIL.c(22) : error C2061: syntax error : identifier 'HIL_B' HIL.c(22) : error C2059: syntax error : ';' HIL.c(67) : warning C4020: 'OPC' : too many actual parameters HIL.c(75) : warning C4020: 'eci_lla' : too many actual parameters HIL.c(79) : warning C4020: 'sun_model' : too many actual parameters HIL.c(84) : warning C4020: 'igrf' : too many actual parameters HIL.c(96) : warning C4020: 'eci_body' : too many actual parameters HIL.c(102) : warning C4020: 'eci_body' : too many actual parameters HIL.c(106) : warning C4020: 'mag_body' : too many actual parameters HIL.c(110) : warning C4020: 'sun_body' : too many actual parameters HIL.c(117) : warning C4020: 'Td' : too many actual parameters HIL.c(133) : error C2065: 'HIL_B' : undeclared identifier HIL.c(133) : error C2224: left of '.q_br_m' must have struct/union type HIL.c(136) : error C2065: 'HIL_B' : undeclared identifier HIL.c(136) : error C2224: left of '.q_br_m' must have struct/union type HIL.c(137) : error C2065: 'HIL_B' : undeclared identifier HIL.c(137) : error C2224: left of '.q_br_m' must have struct/union type HIL.c(138) : error C2065: 'HIL_B' : undeclared identifier HIL.c(138) : error C2224: left of '.q_br_m' must have struct/union type HIL.c(139) : error C2065: 'HIL_B' : undeclared identifier HIL.c(139) : error C2224: left of '.q_br_m' must have struct/union type HIL.c(150) : error C2065: 'HIL_B' : undeclared identifier HIL.c(150) : error C2224: left of '.w_err_c' must have struct/union type HIL.c(153) : error C2065: 'HIL_B' : undeclared identifier HIL.c(153) : error C2224: left of '.w_err_c' must have struct/union type HIL.c(154) : error C2065: 'HIL_B' : undeclared identifier HIL.c(154) : error C2224: left of '.w_err_c' must have struct/union type HIL.c(155) : error C2065: 'HIL_B' : undeclared identifier HIL.c(155) : error C2224: left of '.w_err_c' must have struct/union type HIL.c(158) : warning C4013: 'q_bi_dot' undefined; assuming extern returning int HIL.c(163) : error C2065: 'HIL_B' : undeclared identifier HIL.c(163) : error C2224: left of '.q_bi' must have struct/union type HIL.c(166) : error C2065: 'HIL_B' : undeclared identifier HIL.c(166) : error C2224: left of '.q_bi' must have struct/union type HIL.c(167) : error C2065: 'HIL_B' : undeclared identifier HIL.c(167) : error C2224: left of '.q_bi' must have struct/union type HIL.c(168) : error C2065: 'HIL_B' : undeclared identifier HIL.c(168) : error C2224: left of '.q_bi' must have struct/union type HIL.c(169) : error C2065: 'HIL_B' : undeclared identifier HIL.c(169) : error C2224: left of '.q_bi' must have struct/union type HIL.c(175) : error C2065: 'HIL_B' : undeclared identifier HIL.c(175) : error C2224: left of '.q_ri' must have struct/union type HIL.c(178) : error C2065: 'HIL_B' : undeclared identifier HIL.c(178) : error C2224: left of '.q_ri' must have struct/union type HIL.c(179) : error C2065: 'HIL_B' : undeclared identifier HIL.c(179) : error C2224: left of '.q_ri' must have struct/union type HIL.c(180) : error C2065: 'HIL_B' : undeclared identifier HIL.c(180) : error C2224: left of '.q_ri' must have struct/union type HIL.c(181) : error C2065: 'HIL_B' : undeclared identifier HIL.c(181) : error C2224: left of '.q_ri' must have struct/union type HIL.c(184) : warning C4020: 'T_br' : too many actual parameters HIL.c(190) : warning C4020: 'w_br' : too many actual parameters HIL.c(193) : warning C4020: 'q_error' : too many actual parameters HIL.c(202) : warning C4020: 'q_err_int' : too many actual parameters HIL.c(211) : warning C4020: 'calc_K' : too many actual parameters HIL.c(217) : warning C4020: 'Tc2' : too many actual parameters HIL.c(224) : error C2065: 'HIL_B' : undeclared identifier HIL.c(224) : error C2224: left of '.feedback_p' must have struct/union type HIL.c(227) : error C2065: 'HIL_B' : undeclared identifier HIL.c(227) : error C2224: left of '.feedback_p' must have struct/union type HIL.c(228) : error C2065: 'HIL_B' : undeclared identifier HIL.c(228) : error C2224: left of '.feedback_p' must have struct/union type HIL.c(229) : error C2065: 'HIL_B' : undeclared identifier HIL.c(229) : error C2224: left of '.feedback_p' must have struct/union type HIL.c(241) : warning C4020: 'Torquer' : too many actual parameters HIL.c(248) : warning C4020: 'funcEval_dwdt' : too many actual parameters HIL.c(253) : warning C4013: 'rk4_wbi' undefined; assuming extern returning int HIL.c(255) : error C2065: 'HIL_B' : undeclared identifier HIL.c(255) : error C2224: left of '.w_bi' must have struct/union type HIL.c(258) : error C2065: 'HIL_B' : undeclared identifier HIL.c(258) : error C2224: left of '.w_bi' must have struct/union type HIL.c(259) : error C2065: 'HIL_B' : undeclared identifier HIL.c(259) : error C2224: left of '.w_bi' must have struct/union type HIL.c(260) : error C2065: 'HIL_B' : undeclared identifier HIL.c(260) : error C2224: left of '.w_bi' must have struct/union type HIL.c(443) : error C2065: 'HIL_B' : undeclared identifier HIL.c(446) : error C2065: 'HIL_B' : undeclared identifier HIL.c(446) : error C2224: left of '.q_br_m' must have struct/union type HIL.c(447) : error C2065: 'HIL_B' : undeclared identifier HIL.c(447) : error C2224: left of '.q_br_m' must have struct/union type HIL.c(448) : error C2065: 'HIL_B' : undeclared identifier HIL.c(448) : error C2224: left of '.q_br_m' must have struct/union type HIL.c(449) : error C2065: 'HIL_B' : undeclared identifier HIL.c(449) : error C2224: left of '.q_br_m' must have struct/union type HIL.c(450) : error C2065: 'HIL_B' : undeclared identifier HIL.c(450) : error C2224: left of '.w_err_c' must have struct/union type HIL.c(451) : error C2065: 'HIL_B' : undeclared identifier HIL.c(451) : error C2224: left of '.w_err_c' must have struct/union type HIL.c(452) : error C2065: 'HIL_B' : undeclared identifier HIL.c(452) : error C2224: left of '.w_err_c' must have struct/union type HIL.c(453) : error C2065: 'HIL_B' : undeclared identifier HIL.c(453) : error C2224: left of '.q_bi' must have struct/union type HIL.c(454) : error C2065: 'HIL_B' : undeclared identifier HIL.c(454) : error C2224: left of '.q_bi' must have struct/union type HIL.c(455) : error C2065: 'HIL_B' : undeclared identifier HIL.c(455) : error C2224: left of '.q_bi' must have struct/union type HIL.c(456) : error C2065: 'HIL_B' : undeclared identifier HIL.c(456) : error C2224: left of '.q_bi' must have struct/union type HIL.c(457) : error C2065: 'HIL_B' : undeclared identifier HIL.c(457) : error C2224: left of '.q_ri' must have struct/union type HIL.c(458) : error C2065: 'HIL_B' : undeclared identifier HIL.c(458) : error C2224: left of '.q_ri' must have struct/union type HIL.c(459) : error C2065: 'HIL_B' : undeclared identifier HIL.c(459) : error C2224: left of '.q_ri' must have struct/union type HIL.c(460) : error C2065: 'HIL_B' : undeclared identifier HIL.c(460) : error C2224: left of '.q_ri' must have struct/union type HIL.c(461) : error C2065: 'HIL_B' : undeclared identifier HIL.c(461) : error C2224: left of '.feedback_p' must have struct/union type HIL.c(462) : error C2065: 'HIL_B' : undeclared identifier HIL.c(462) : error C2224: left of '.feedback_p' must have struct/union type HIL.c(463) : error C2065: 'HIL_B' : undeclared identifier HIL.c(463) : error C2224: left of '.feedback_p' must have struct/union type HIL.c(464) : error C2065: 'HIL_B' : undeclared identifier HIL.c(464) : error C2224: left of '.w_bi' must have struct/union type HIL.c(464) : fatal error C1003: error count exceeds 100; stopping compilation NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\Bin\cl.EXE"' : return code '0x2' Stop.
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>echo The make command returned an error of 2 The make command returned an error of 2
C:\Users\Administrator\Downloads\HIL Simulink\try\HIL_slrtert_rtw>An_error_occurred_during_the_call_to_make 'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command, operable program or batch file.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!