NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue when compiling a model from Simulink for a cRIO 9030 with Linux RT

Hi, I have the following setup:

1.- Windows 7 (64 bit)

2.- NI Veristand 2017

3.- NI LabView 2017

4.- Matlab r2016a

5.- Eclipse 2014 and 2017 both installed (GCC 4.7.2 & 4.9 respectively)

 

I've followed the instructions dictated here http://zone.ni.com/reference/en-XX/help/372846L-01/veristand/convert_model_to_dll/

 

and I haven't had any success when compiling the actual model (the final step, basically).

 

I get a compilation error associated with a "stdint.h" header of some sorts. Any idea of what's exactly going on here? 

I already tried with a very basic model (the sum of two inputs) and the error persists, so it's not an issue specific to the model that I'm trying to compile.

 

I'll attach a screenshot of the error that I'm getting.

 

PD: I also tried with a whole another setup (in the same computer, with matlab 2015 and veristand 2015, and I get the exact same error)

 

Error log on Matlab:

### Generating code into build folder: C:\Users\AlterInfo\Downloads\BatteryLinux2016_niVeriStand_Linux_64_rtw
### Generated code for 'BatteryLinux2016' is up to date because no structural, parameter or code replacement library changes were found.
### VeriStand 2017.0.0.143 (2017) code generation started
### VeriStand 2017.0.0.143 (2017) code generation done
### VeriStand 2017.0.0.143 (2017) code compilation started
.
### Processing Template Makefile: C:\VeriStand\2017\ModelInterface\tmw\target\NIVeriStand_Linux_64.tmf
### Wrapping unrecognized make command (angle brackets added)
### <C:\VeriStand\2017\ModelInterface\tmw\toolchain\Linux_64_GNU_Setup.bat && cs-make>
### in default batch file
### BatteryLinux2016.mk which is generated from C:\VeriStand\2017\ModelInterface\tmw\target\NIVeriStand_Linux_64.tmf is up to date
### Building BatteryLinux2016: .\BatteryLinux2016.bat

C:\Users\AlterInfo\Downloads\BatteryLinux2016_niVeriStand_Linux_64_rtw>set MATLAB=C:\Program Files\MATLAB\R2016a

C:\Users\AlterInfo\Downloads\BatteryLinux2016_niVeriStand_Linux_64_rtw>C:\VeriStand\2017\ModelInterface\tmw\toolchain\Linux_64_GNU_Setup.bat && cs-make -f BatteryLinux2016.mk NIDEBUG=0 NIOPT="Default" OPTS="" ISPROTECTINGMODEL=NOTPROTECTING
Setting environment for using NI Linux Real-Time 2014 64-bit tools.
### Deleting the objects and libBatteryLinux2016.so
cs-rm.exe -f BatteryLinux2016.o BatteryLinux2016_data.o ni_modelframework.o rtGetInf.o rtGetNaN.o rt_logging.o rt_nonfinite.o rt_sim.o libBatteryLinux2016.so
### Compiling model source: BatteryLinux2016.c
x86_64-nilrt-linux-gcc.exe -c -fdollars-in-identifiers -mtune=generic -m64 -fPIC -Wall -MD -fvisibility=protected -DUSE_RTMODEL -DNI_ROOTMODEL_BatteryLinux2016 -DMODEL=BatteryLinux2016 -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DMT=0 -DHAVESTDIO -DNATIONAL_INSTRUMENTS_SIT -DkNIOSLinux -I. -I.. -I.. -IC:/PROGRA~1/MATLAB/R2016a/simulink/include -IC:/PROGRA~1/MATLAB/R2016a/extern/include -IC:/PROGRA~1/MATLAB/R2016a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2016a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2016a/simulink/include/sf_runtime -IC:/Users/AlterInfo/Downloads/BatteryLinux2016_niVeriStand_Linux_64_rtw -IC:/Users/AlterInfo/Downloads -IC:/PROGRA~1/MATLAB/R2016a/toolbox/physmod/powersys/facts/facts -IC:/PROGRA~1/MATLAB/R2016a/toolbox/physmod/powersys/DR/DR -DNI_VERISTAND_MAINMODELFILE -o BatteryLinux2016.o BatteryLinux2016.c
BatteryLinux2016.c: In function 'BatteryLinux2016_output':
BatteryLinux2016.c:205:12: warning: unused variable 'idxOutSw' [-Wunused-variable]
BatteryLinux2016.c:203:12: warning: unused variable 'switchTypes' [-Wunused-variable]
BatteryLinux2016.c:202:13: warning: unused variable 'yswitch' [-Wunused-variable]
BatteryLinux2016.c:201:12: warning: unused variable 'gState' [-Wunused-variable]
In file included from c:\program files (x86)\national instruments\eclipse\14.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\../../lib/x86_64-nilrt-linux/gcc/x86_64-nilrt-linux/4.7.2/include/stdint.h:3:0,
from ni_modelframework.h:46,
from ni_modelframework_ex.h:9,
from BatteryLinux2016.c:905:
c:\program files (x86)\national instruments\eclipse\14.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\../../../../x86_64-nilrt-linux/usr/include/stdint.h: At top level:
c:\program files (x86)\national instruments\eclipse\14.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\../../../../x86_64-nilrt-linux/usr/include/stdint.h:48:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
cs-make: *** [BatteryLinux2016.o] Error 1

 

 

Download All
0 Kudos
Message 1 of 2
(2,407 Views)

Hi Soski. I think it would be best for us to assist you by means of a service request so that we can investigate this further. Can you please create a service request with Applications Engineering at ni.com/support? Feel free to send me a private message with your service request number after you have created it so I can make sure it gets to the right place as quickly as possible.

 

Thanks! Have a nice weekend.

0 Kudos
Message 2 of 2
(2,380 Views)