Unable to export Simulink model to FMU (lcclnk64 not recognized)

13 次查看(过去 30 天)
I have been unable to export my Simulink Model to FMU. I noticed the lcclnk64 does not exist in the designated folder. I have also been searching for solution for this but there seems to be none. I also have raised service request but did not get any reply from MathWorks Technical support.
The ouput of exportToFMU2CS is below. I am hoping some people have a workaround for this issue. I appreciate any help.
success = exportToFMU2CS('FRx_sl','CreateModelAfterGeneratingFMU','on')
Setting System Target to FMU Co-Simulation for model 'FRx_sl'.
Setting Hardware Implementation > Device Type to 'MATLAB Host' for model 'FRx_sl'.
### 'GenerateComments' is disabled for Co-Simulation Standalone FMU Export.
"C:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/include64 -DRT -DUSE_RTMODEL -fno-inline -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DMODEL=FRx_sl -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -IC:/Users/CYWang/MatLab/SimuLink -IC:/Users/CYWang/MatLab/SimuLink/FRx_sl_fmu2cs_rtw -IC:/PROGRA~1/MATLAB/R2022b/extern/include -IC:/PROGRA~1/MATLAB/R2022b/simulink/include -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2022b/toolbox/shared/simulink/fmuexport/fmi2_noprefix -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/rapid/fmu -Fo"FRx_sl.obj" "C:\Users\CYWang\MatLab\SimuLink\FRx_sl_fmu2cs_rtw\FRx_sl.c"
"C:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/include64 -DRT -DUSE_RTMODEL -fno-inline -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DMODEL=FRx_sl -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -IC:/Users/CYWang/MatLab/SimuLink -IC:/Users/CYWang/MatLab/SimuLink/FRx_sl_fmu2cs_rtw -IC:/PROGRA~1/MATLAB/R2022b/extern/include -IC:/PROGRA~1/MATLAB/R2022b/simulink/include -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2022b/toolbox/shared/simulink/fmuexport/fmi2_noprefix -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/rapid/fmu -Fo"FRx_sl_data.obj" "C:\Users\CYWang\MatLab\SimuLink\FRx_sl_fmu2cs_rtw\FRx_sl_data.c"
"C:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/include64 -DRT -DUSE_RTMODEL -fno-inline -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DMODEL=FRx_sl -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -IC:/Users/CYWang/MatLab/SimuLink -IC:/Users/CYWang/MatLab/SimuLink/FRx_sl_fmu2cs_rtw -IC:/PROGRA~1/MATLAB/R2022b/extern/include -IC:/PROGRA~1/MATLAB/R2022b/simulink/include -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2022b/toolbox/shared/simulink/fmuexport/fmi2_noprefix -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/rapid/fmu -Fo"rtGetInf.obj" "C:\Users\CYWang\MatLab\SimuLink\FRx_sl_fmu2cs_rtw\rtGetInf.c"
"C:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/include64 -DRT -DUSE_RTMODEL -fno-inline -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DMODEL=FRx_sl -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -IC:/Users/CYWang/MatLab/SimuLink -IC:/Users/CYWang/MatLab/SimuLink/FRx_sl_fmu2cs_rtw -IC:/PROGRA~1/MATLAB/R2022b/extern/include -IC:/PROGRA~1/MATLAB/R2022b/simulink/include -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2022b/toolbox/shared/simulink/fmuexport/fmi2_noprefix -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/rapid/fmu -Fo"rtGetNaN.obj" "C:\Users\CYWang\MatLab\SimuLink\FRx_sl_fmu2cs_rtw\rtGetNaN.c"
"C:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/include64 -DRT -DUSE_RTMODEL -fno-inline -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DMODEL=FRx_sl -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -IC:/Users/CYWang/MatLab/SimuLink -IC:/Users/CYWang/MatLab/SimuLink/FRx_sl_fmu2cs_rtw -IC:/PROGRA~1/MATLAB/R2022b/extern/include -IC:/PROGRA~1/MATLAB/R2022b/simulink/include -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2022b/toolbox/shared/simulink/fmuexport/fmi2_noprefix -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/rapid/fmu -Fo"rt_nonfinite.obj" "C:\Users\CYWang\MatLab\SimuLink\FRx_sl_fmu2cs_rtw\rt_nonfinite.c"
"C:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/include64 -DRT -DUSE_RTMODEL -fno-inline -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DMODEL=FRx_sl -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -IC:/Users/CYWang/MatLab/SimuLink -IC:/Users/CYWang/MatLab/SimuLink/FRx_sl_fmu2cs_rtw -IC:/PROGRA~1/MATLAB/R2022b/extern/include -IC:/PROGRA~1/MATLAB/R2022b/simulink/include -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2022b/toolbox/shared/simulink/fmuexport/fmi2_noprefix -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/rapid/fmu -Fo"RTWCG_FMU_util.obj" "C:\PROGRA~1\MATLAB\R2022b\rtw\c\src\rapid\fmu\RTWCG_FMU_util.c"
"C:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/include64 -DRT -DUSE_RTMODEL -fno-inline -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DMODEL=FRx_sl -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -IC:/Users/CYWang/MatLab/SimuLink -IC:/Users/CYWang/MatLab/SimuLink/FRx_sl_fmu2cs_rtw -IC:/PROGRA~1/MATLAB/R2022b/extern/include -IC:/PROGRA~1/MATLAB/R2022b/simulink/include -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2022b/toolbox/shared/simulink/fmuexport/fmi2_noprefix -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/rapid/fmu -Fo"FRx_sl_fmu.obj" "FRx_sl_fmu.c"
"C:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/include64 -DRT -DUSE_RTMODEL -fno-inline -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DMODEL=FRx_sl -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -IC:/Users/CYWang/MatLab/SimuLink -IC:/Users/CYWang/MatLab/SimuLink/FRx_sl_fmu2cs_rtw -IC:/PROGRA~1/MATLAB/R2022b/extern/include -IC:/PROGRA~1/MATLAB/R2022b/simulink/include -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2022b/toolbox/shared/simulink/fmuexport/fmi2_noprefix -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/rapid/fmu -Fo"lccstub.obj" "C:\PROGRA~1\MATLAB\R2022b\sys\lcc64\lcc64\mex\lccstub.c"
"### Creating shared library "./FRx_sl_win64.dll" ..."
"C:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/bin/lcclnk64" -dll -entry LibMain -s -LC:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/lib64 FRx_sl.def -o ./FRx_sl_win64.dll @FRx_sl.rsp
'"C:/PROGRA~1/MATLAB/R2022b/sys/lcc64/lcc64/bin/lcclnk64"' is not recognized as an internal or external command,
operable program or batch file.
gmake: *** [FRx_sl_win64.dll] Error 1
The make command returned an error of 2
Build Summary
Top model targets built:
Model Action Rebuild Reason
==================================================================
FRx_sl Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 16.583s
Error(s) encountered while building "FRx_sl_win64"
My versions are below.
MATLAB Version 9.13 (R2022b)
Simulink Version 10.6 (R2022b)
MATLAB Compiler Version 8.5 (R2022b)
Simulink Compiler Version 1.5 (R2022b)

采纳的回答

Pravarthana P
Pravarthana P 2022-12-1
Hi Cynthia Wang,
I understand that you are unable to export Simulink model to FMU because of the error ‘lcclnk64’ is not recognized.
Exporting a Simulink model to Functional Mockup Unit requires C code generation, which will require a supported C compiler. In this case, the LCC C compiler is not a supported C compiler.
To resolve this issue, the C compiler must be changed from LCC to a supported C compiler. A list of supported C compiler is given in the documentation link:
The recommended free C compiler for MathWorks products is Min GW which can be downloaded from the above mentioned documentation link.
Once downloaded, the default C compiler needs to be set to Min GW following the below documentation link:
Hope this information helps you.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by