필터 지우기
필터 지우기

I am unable to compile and execute SystemC code generated from a Simulink model

조회 수: 8 (최근 30일)
The code generation is successfull but when I click on "Verify TLM Component" in the Configuration Parameter window inside the TLM Testbench panel I get the following error,
### Starting component verification
### Checking available compiler.
### Building testbench and TLM component.
C:\Users\advaitthakre\Documents\SystemC\DualFilter_VP\DualFilter_uttb_tlm_tb>set "VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\"
C:\Users\advaitthakre\Documents\SystemC\DualFilter_VP\DualFilter_uttb_tlm_tb>set "VSCMD_START_DIR=C:\Users\advaitthakre\Documents\SystemC\DualFilter_VP\DualFilter_uttb_tlm_tb"
C:\Users\advaitthakre\Documents\SystemC\DualFilter_VP\DualFilter_uttb_tlm_tb>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\\..\..\VC\Auxiliary\Build\vcvarsall" x64
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.58
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall] Environment initialized for: 'x64'
Microsoft (R) Program Maintenance Utility Version 14.16.27051.0
Copyright (C) Microsoft Corporation. All rights reserved.
nmake.exe /nologo /f makefile.mk all-am OPT_CXXFLAGS="/O2 /MT /D _NDEBUG" OPT_LDFLAGS=""
cd ..\DualFilter_uttb_tlm && nmake.exe /nologo /f makefile.mk all-am
cd ..\DualFilter && nmake.exe /nologo /f makefile.mk all-am
cl.exe /c /O2 /MT /D _NDEBUG /Fd".\obj\DualFilter_uttb_tlm.pdb" /D "RT" /D "USE_RTMODEL" /D "WIN64" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /D "_UNICODE" /D "UNICODE" /I ".\include" /I "..\DualFilter\include" /I "..\DualFilter\utils" /I "" /I "" /D SC_INCLUDE_DYNAMIC_PROCESSES /nologo /FD /EHsc /W3 /TP /wd4244 /wd4267 /vmg /Foobj\DualFilter_uttb_tlm.obj src\DualFilter_uttb_tlm.cpp
cl : Command line error D8004 : '/I' requires an argument
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
  댓글 수: 10
Jerome Chevalier
Jerome Chevalier 2023년 11월 22일
편집: Jerome Chevalier 2023년 11월 22일
Based on the compilation log, the environment variables pointing to your SystemC library installation are missing
cl.exe /c /O2 /MT /D _NDEBUG /Fd".\obj\DualFilter_uttb_tlm.pdb" /D "RT" /D "USE_RTMODEL" /D "WIN64" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /D "_UNICODE" /D "UNICODE" /I ".\include" /I "..\DualFilter\include" /I "..\DualFilter\utils" /I "" /I "" /D SC_INCLUDE_DYNAMIC_PROCESSES /nologo /FD /EHsc /W3 /TP /wd4244 /wd4267 /vmg /Foobj\DualFilter_uttb_tlm.obj src\DualFilter_uttb_tlm.cpp
cl : Command line error D8004 : '/I' requires an argument
You must download and compile the SystemC library and define the following variables in your system (or enter the values directly in the 'TLM Compilation' dialog):
  • SYSTEMC_INC_PATH and TLM_INC_PATH to provide the path to the systemC and tlm .h include files
  • SYSTEMC_LIB_NAME and SYSTEMC_LIB_PATH to provide the name and location of the systemC .lib static library file.
Jerome Chevalier
Jerome Chevalier 2023년 11월 22일
Based on the linker log, SYSTEMC_LIB_NAME environment variable is missing
link.exe obj\mw_support_tb.obj obj\DualFilter_uttb_tlm_tb.obj obj\DualFilter_uttb_tlm_tb_main.obj /LIBPATH:"C:\Users\advaitthakre\Downloads\systemc-2.3.4\src" /LIBPATH:"C:\Program Files\MATLAB\R2023b\extern\lib\win64\microsoft" /nologo /INCREMENTAL /SUBSYSTEM:CONSOLE /MACHINE:X64 ..\DualFilter_uttb_tlm\lib\DualFilter_uttb_tlm.lib ..\DualFilter\lib\DualFilter.lib "" libmat.lib libmx.lib libeng.lib /PDB:".\obj\DualFilter_uttb_tlm_tb.pdb" /out:DualFilter_uttb_tlm_tb.exe

댓글을 달려면 로그인하십시오.

답변 (2개)

Marc Erickson
Marc Erickson 2023년 11월 15일
편집: Walter Roberson 2023년 11월 15일
You appear to have a missing the specification of the systemc library and so it is showing up as an empty string in the linker line:
..\DualFilter\lib\DualFilter.lib "" libmat.lib
Please read through:
Here is a successful link command for a design named "Subsystem".
link.exe \
obj\mw_support_tb.obj obj\Subsystem_tlm_tb.obj obj\Subsystem_tlm_tb_main.obj \
/LIBPATH:"F:/tools/SystemC/systemc-2.3.1/lib/win64" /LIBPATH:"O:\27\matlab\extern\lib\win64\microsoft" \
/nologo /INCREMENTAL /SUBSYSTEM:CONSOLE /MACHINE:X64 \
..\Subsystem_tlm\lib\Subsystem_tlm.lib ..\Subsystem\lib\Subsystem.lib \
"systemc-vs-15.0.lib" \
libmat.lib libmx.lib libeng.lib \
/PDB:".\obj\Subsystem_tlm_tb.pdb" /out:Subsystem_tlm_tb.exe
If you continue to have issues, you can file a tech support request and we can look further.

Jerome Chevalier
Jerome Chevalier 2023년 11월 22일
편집: Jerome Chevalier 2023년 11월 22일
Based on the compilation log, the environment variables pointing to your SystemC library installation are missing
cl.exe /c /O2 /MT /D _NDEBUG /Fd".\obj\DualFilter_uttb_tlm.pdb" /D "RT" /D "USE_RTMODEL" /D "WIN64" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /D "_UNICODE" /D "UNICODE" /I ".\include" /I "..\DualFilter\include" /I "..\DualFilter\utils" /I "" /I "" /D SC_INCLUDE_DYNAMIC_PROCESSES /nologo /FD /EHsc /W3 /TP /wd4244 /wd4267 /vmg /Foobj\DualFilter_uttb_tlm.obj src\DualFilter_uttb_tlm.cpp
cl : Command line error D8004 : '/I' requires an argument
You must download and compile the SystemC library and define the following variables in your system (or enter the values directly in the 'TLM Compilation' dialog):
  • SYSTEMC_INC_PATH and TLM_INC_PATH to provide the path to the systemC and tlm .h include files
  • SYSTEMC_LIB_NAME and SYSTEMC_LIB_PATH to provide the name and location of the systemC .lib static library file.

카테고리

Help CenterFile Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by