Converting Simulink file (.slx) to .dll for integrating with CANoe
22 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to generate a .dll file from a simulink model to integrate with Vector CANoe.
I have chosen 'cn.tlc' in the code generation panel. I have set my environment variables to point to the mingw64 binaries.
I have used 'getenv' to check if matlab points to the same folder. But when I try to build the model, I get the following error:
C:\Users\prade\Desktop\Work\Attempts\CON_veh\Simulator\MCU_cn_rtw>call "set MINGW_ROOT_PATH=C:\MinGW\mingw64" x86 The filename, directory name, or volume label syntax is incorrect.
C:\Users\prade\Desktop\Work\Attempts\CON_veh\Simulator\MCU_cn_rtw>nmake -f MCU.mk MAT_FILE=1 GENERATE_MODEL_DESCRIPTION=1 DEBUG_BUILD=0 COMBINE_OUTPUT_UPDATE_FCNS=0 INCLUDE_MDL_TERMINATE_FCN=1 MULTI_INSTANCE_CODE=0 ISPROTECTINGMODEL=NOTPROTECTING TARGET_ARCH="x86" XCP_MAX_MSG_LENGTH=-1 ANALYSIS_MODEL=0 HAS_CAPL_CALL=0 'nmake' is not recognized as an internal or external command, operable program or batch file.
I am on a Windows 10 64 bit OS.
6 Kommentare
Stefanie Schwarz
am 16 Nov. 2022
@Nouran Mostafa Please contact Vector for support regarding cn.tlc: https://www.vector.com/int/en/support-downloads/support/
Cristian
am 28 Jul. 2023
Antworten (1)
Stefanie Schwarz
am 27 Mai 2020
Bearbeitet: Stefanie Schwarz
am 25 Apr. 2024
In general, please contact Vector for questions regarding their cn.tlc target:
From our experience, the issue can be resolved as follows:
1) Consult the Vector CANoe User Manual to determine which compiler is supported with cn.tlc. As far as we know, MinGW is currently not supported and you need to install a specific Visual Studio C++ version.
2) Make sure to install Visual Studio with the "Desktop development with C++" workload as described here:
3) Run the command
>> mex -setup c++
in MATLAB to select the supported Visual Studio compiler after installing it.
4) Make sure that you have selected C++ as Language in the model settings under Configuration Parameters > Code Generation.
5 Kommentare
Stefanie Schwarz
am 7 Jun. 2022
Hi @Louisa Lohn, you executed the command correctly, but it appears that you either didn't install Visual Studio, or that Visual Studio is not detected by MATLAB. Please submit a help request to MathWorks and attach the output that you receive after executing: >> mex -setup -v
Stefanie Schwarz
am 25 Apr. 2024
Update 2024: According to the video tutorial below, the CANoe target now supports MinGW as compiler:
In this case, you need to make sure to select the matching template makefile (.tmf) for MinGW in the model's code generation settings. For details, please refer to the "Vector CANoe Matlab Integration Package" documentation, or Vector technical support.
Siehe auch
Kategorien
Mehr zu MATLAB Support for MinGW-w64 C/C++ Compiler finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!