03-14-2017 04:15 AM - edited 03-14-2017 04:16 AM
I'm trying to compile a simulink model into a library to be used in Linux RT on a myRIO, following the instructions here, using the target file NIVeriStand_Linux_ARM_32.tlc. I'm running Matlab 2016b and Veristand 2016.
Unfortunately, I'm getting the following error upon building my model:
### Generating code into build folder: D:\Google_Drive\Matlab\CodeGenerationTest\codeGenerationTest_niVeriStand_Linux_ARM_32_rtw ### VeriStand 2016.0.0.72 (2016) code generation started ### Invoking Target Language Compiler on codeGenerationTest.rtw ### Using System Target File: D:\VeriStand\2016\ModelInterface\tmw\target\NIVeriStand_Linux_ARM_32.tlc ### Loading TLC function libraries ### Initial pass through model to cache user defined code . ### Caching model source code ### Writing header file codeGenerationTest.h ### Writing header file codeGenerationTest_types.h ### Writing header file rtwtypes.h ### Writing header file builtin_typeid_types.h . ### Writing header file multiword_types.h ### Writing header file zero_crossing_types.h ### Writing source file codeGenerationTest.c ### Writing header file codeGenerationTest_private.h ### Writing header file rtmodel.h ### 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. . ### NI VeriStand 2016.0.0.72 (2016) Modifying source file codeGenerationTest.c . ### NI VeriStand 2016.0.0.72 (2016) Generating Ports Readme file ### NI VeriStand 2016.0.0.72 (2016) Generating Signals Readme file ### NI VeriStand 2016.0.0.72 (2016) Generating Parameters Readme file ### NI VeriStand 2016.0.0.72 (2016) Copying support files 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. ### VeriStand 2016.0.0.72 (2016) code generation done ### VeriStand 2016.0.0.72 (2016) code compilation started . ### Processing Template Makefile: D:\VeriStand\2016\ModelInterface\tmw\target\NIVeriStand_Linux_ARM_32.tmf ### Wrapping unrecognized make command (angle brackets added) ### <D:\VeriStand\2016\ModelInterface\tmw\toolchain\Linux_ARM_32_GNU_Setup.bat && cs-make> ### in default batch file ### codeGenerationTest.mk which is generated from D:\VeriStand\2016\ModelInterface\tmw\target\NIVeriStand_Linux_ARM_32.tmf is up to date ### Building codeGenerationTest: .\codeGenerationTest.bat D:\Google_Drive\Matlab\CodeGenerationTest\codeGenerationTest_niVeriStand_Linux_ARM_32_rtw>set MATLAB=C:\Program Files\MATLAB\R2016b D:\Google_Drive\Matlab\CodeGenerationTest\codeGenerationTest_niVeriStand_Linux_ARM_32_rtw>D:\VeriStand\2016\ModelInterface\tmw\toolchain\Linux_ARM_32_GNU_Setup.bat && cs-make -f codeGenerationTest.mk NIDEBUG=0 NIOPT="Default" OPTS="" ISPROTECTINGMODEL=NOTPROTECTING Setting environment for using NI Linux Real-Time 2014 32-bit tools. ### Deleting the objects and libcodeGenerationTest.so cs-rm.exe -f codeGenerationTest.o ni_modelframework.o rtGetInf.o rtGetNaN.o rt_logging.o rt_nonfinite.o rt_sim.o libcodeGenerationTest.so ### Compiling model source: codeGenerationTest.c arm-nilrt-linux-gnueabi-gcc.exe -c -fdollars-in-identifiers -march=armv7-a -fPIC -Wall -MD -fvisibility=protected -DUSE_RTMODEL -DNI_ROOTMODEL_codeGenerationTest -DMODEL=codeGenerationTest -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DMT=0 -DHAVESTDIO -DNATIONAL_INSTRUMENTS_SIT -DkNIOSLinux -I. -I.. -I.. -IC:/PROGRA~1/MATLAB/R2016b/simulink/include -IC:/PROGRA~1/MATLAB/R2016b/extern/include -IC:/PROGRA~1/MATLAB/R2016b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2016b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2016b/simulink/include/sf_runtime -ID:/Google_Drive/Matlab/CodeGenerationTest/codeGenerationTest_niVeriStand_Linux_ARM_32_rtw -ID:/Google_Drive/Matlab/CodeGenerationTest -DNI_VERISTAND_MAINMODELFILE -o codeGenerationTest.o codeGenerationTest.c codeGenerationTest.c: In function 'SetExternalInputs': codeGenerationTest.c:430:6: error: 'RT_MODEL_codeGenerationTest_T' has no member named 'ModelData' codeGenerationTest.c: In function 'SetExternalOutputs': codeGenerationTest.c:470:6: error: 'RT_MODEL_codeGenerationTest_T' has no member named 'ModelData' codeGenerationTest.c: In function 'NI_InitExternalOutputs': codeGenerationTest.c:500:6: error: 'RT_MODEL_codeGenerationTest_T' has no member named 'ModelData' codeGenerationTest.c: In function 'NI_ProbeOneSignal': codeGenerationTest.c:984:26: error: 'RT_MODEL_codeGenerationTest_T' has no member named 'ModelData' codeGenerationTest.c:984:49: error: 'RT_MODEL_codeGenerationTest_T' has no member named 'ModelData' cs-make: *** [codeGenerationTest.o] Error 1 ### Creating HTML report file codeGenerationTest_codegen_rpt.html ### Aborted due to an error in the build procedure for model: codeGenerationTest Error(s) encountered while building "codeGenerationTest"
Google has found no other examples of this error, so I'm at a loss. Any help would be greatly appreciated!
Matt
Solved! Go to Solution.
03-15-2017 08:21 AM
Hey Matt.
Thank you for your question and I'm glad to hear that you got it to work.
If anyone else has this issue I would like to share the solution with you on this page.
The solution was to install MatLab 2016a because MatLab 2016b is not compatible with VeriStand 2016. (See link below)
http://digital.ni.com/public.nsf/websearch/10BBA745CD5A2FAE86257F9A0054FF71
Best Regards \\
Morten Baltzer
03-28-2019 07:15 AM
I'm trying to compile a simulink model into a library to be used in Linux RT on a myRIO, following the instructions here, using the target file NIVeriStand_Linux_ARM_32.tlc. I'm running Matlab 2014a and Veristand 2015 SPI.
Unfortunately, I'm getting the following error upon building my model:
### VeriStand 2015.1.0.76 (2015 SP1) code generation started
### Invoking Target Language Compiler on untitled.rtw
### Using System Target File: D:\VeriStand\2015\ModelInterface\tmw\target\NIVeriStand_Linux_ARM_32.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing header file untitled.h
### Writing header file untitled_types.h
### Writing header file rtwtypes.h
### Writing header file builtin_typeid_types.h
### Writing header file multiword_types.h
### Writing source file untitled.c
### Writing header file untitled_private.h
### Writing header file rtmodel.h
### Writing source file untitled_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.
### NI VeriStand 2015.1.0.76 (2015 SP1) Modifying source file untitled.c
### NI VeriStand 2015.1.0.76 (2015 SP1) Generating Ports Readme file
### NI VeriStand 2015.1.0.76 (2015 SP1) Generating Signals Readme file
### NI VeriStand 2015.1.0.76 (2015 SP1) Generating Parameters Readme file
### NI VeriStand 2015.1.0.76 (2015 SP1) Copying support files
已复制 1 个文件。
已复制 1 个文件。
已复制 1 个文件。
### VeriStand 2015.1.0.76 (2015 SP1) code generation done
### VeriStand 2015.1.0.76 (2015 SP1) code compilation started
### Processing Template Makefile: D:\VeriStand\2015\ModelInterface\tmw\target\NIVeriStand_Linux_ARM_32.tmf
### Wrapping unrecognized make command (angle brackets added)
### <D:\VeriStand\2015\ModelInterface\tmw\toolchain\Linux_ARM_32_GNU_Setup.bat && cs-make>
### in default batch file
### untitled.mk which is generated from D:\VeriStand\2015\ModelInterface\tmw\target\NIVeriStand_Linux_ARM_32.tmf is up to date
### Building untitled: .\untitled.bat
D:\test\untitled_niVeriStand_Linux_ARM_32_rtw>set MATLAB=D:\Matlab2014
D:\test\untitled_niVeriStand_Linux_ARM_32_rtw>D:\VeriStand\2015\ModelInterface\tmw\toolchain\Linux_ARM_32_GNU_Setup.bat && cs-make -f untitled.mk NIDEBUG=0 NIOPT="Default" OPTS=""
Setting environment for using NI Linux Real-Time 2014 32-bit tools.
Error locating the NI Linux Real-Time 2014 toolchain. Confirm the C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition 2014 was properly installed.
Any help would be appreciated