MATLAB Answers

Unable to build C code for real time desktop target due to "rt_nonfinite.h" missing

14 views (last 30 days)
### Generating code into build folder: C:\Users\braja\Desktop\HIL testing\HIL_squirrel_cage_test_at_1ms_sampling_time_sldrt_win64
### Invoking Target Language Compiler on HIL_squirrel_cage_test_at_1ms_sampling_time.rtw
### Using System Target File: C:\Program Files\MATLAB\R2017a\toolbox\sldrt\rtw\sldrt.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
.
### Caching model source code
### Writing source file HIL_squirrel_cage_test_at_1ms_sampling_time_tgtconn.c
### Writing header file HIL_squirrel_cage_test_at_1ms_sampling_time.h
### Writing header file HIL_squirrel_cage_test_at_1ms_sampling_time_types.h
### Writing source file HIL_squirrel_cage_test_at_1ms_sampling_time.c
### Writing header file rtwtypes.h
.
### Writing header file multiword_types.h
### Writing header file HIL_squirrel_cage_test_at_1ms_sampling_time_private.h
### Writing header file rtmodel.h
### TLC code generation complete.
### Generating TLC interface API.
### Creating data type transition file HIL_squirrel_cage_test_at_1ms_sampling_time_dt.h
.### Creating HTML report file HIL_squirrel_cage_test_at_1ms_sampling_time_codegen_rpt.html
.
### Processing Template Makefile: C:\Program Files\MATLAB\R2017a\toolbox\sldrt\rtw\sldrt.tmf
### Creating HIL_squirrel_cage_test_at_1ms_sampling_time.mk from C:\Program Files\MATLAB\R2017a\toolbox\sldrt\rtw\sldrt.tmf
### Building HIL_squirrel_cage_test_at_1ms_sampling_time: .\HIL_squirrel_cage_test_at_1ms_sampling_time.bat
C:\Users\braja\Desktop\HIL testing\HIL_squirrel_cage_test_at_1ms_sampling_time_sldrt_win64>set MATLAB=C:\Program Files\MATLAB\R2017a
C:\Users\braja\Desktop\HIL testing\HIL_squirrel_cage_test_at_1ms_sampling_time_sldrt_win64>"C:\PROGRA~1\MATLAB\R2017a\bin\win64\gmake" -f HIL_squirrel_cage_test_at_1ms_sampling_time.mk ISPROTECTINGMODEL=NOTPROTECTING EXTMODE_STATIC_ALLOC=0 EXTMODE_STATIC_ALLOC_SIZE=1000000 TMW_EXTMODE_TESTING=0 OPTS="-DTGTCONN -DON_TARGET_WAIT_FOR_START=0"
### Compiling HIL_squirrel_cage_test_at_1ms_sampling_time.c
C:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/clang/win64/clang -emit-llvm -c -m64 -O4 -DINT64_T="long long" -DUINT64_T="unsigned long long" -fno-ms-compatibility -U_MSC_VER -U__STDC_HOSTED__ -Wno-switch-enum -Wno-empty-body -IC:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/lib/include -I. -I.. -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/toolbox/shared/can/src/scanutil -IC:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/src -IC:/Users/braja/Desktop/HILTES~1 -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/braja/Desktop/HILTES~1/HIL_squirrel_cage_test_at_1ms_sampling_time_sldrt_win64 -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -DTGTCONN -DON_TARGET_WAIT_FOR_START=0 -DEXT_MODE -DUSE_RTMODEL -DMODEL=HIL_squirrel_cage_test_at_1ms_sampling_time -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DMT=0 -o "HIL_squirrel_cage_test_at_1ms_sampling_time.obj" "HIL_squirrel_cage_test_at_1ms_sampling_time.c"
### Compiling HIL_squirrel_cage_test_at_1ms_sampling_time_tgtconn.c
C:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/clang/win64/clang -emit-llvm -c -m64 -O4 -DINT64_T="long long" -DUINT64_T="unsigned long long" -fno-ms-compatibility -U_MSC_VER -U__STDC_HOSTED__ -Wno-switch-enum -Wno-empty-body -IC:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/lib/include -I. -I.. -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/toolbox/shared/can/src/scanutil -IC:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/src -IC:/Users/braja/Desktop/HILTES~1 -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/braja/Desktop/HILTES~1/HIL_squirrel_cage_test_at_1ms_sampling_time_sldrt_win64 -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -DTGTCONN -DON_TARGET_WAIT_FOR_START=0 -DEXT_MODE -DUSE_RTMODEL -DMODEL=HIL_squirrel_cage_test_at_1ms_sampling_time -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DMT=0 -o "HIL_squirrel_cage_test_at_1ms_sampling_time_tgtconn.obj" "HIL_squirrel_cage_test_at_1ms_sampling_time_tgtconn.c"
### Compiling C:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/src/sldrt_main.c
C:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/clang/win64/clang -emit-llvm -c -m64 -O4 -DINT64_T="long long" -DUINT64_T="unsigned long long" -fno-ms-compatibility -U_MSC_VER -U__STDC_HOSTED__ -Wno-switch-enum -Wno-empty-body -IC:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/lib/include -I. -I.. -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/toolbox/shared/can/src/scanutil -IC:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/src -IC:/Users/braja/Desktop/HILTES~1 -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/braja/Desktop/HILTES~1/HIL_squirrel_cage_test_at_1ms_sampling_time_sldrt_win64 -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -DTGTCONN -DON_TARGET_WAIT_FOR_START=0 -DEXT_MODE -DUSE_RTMODEL -DMODEL=HIL_squirrel_cage_test_at_1ms_sampling_time -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DMT=0 -o "sldrt_main.obj" "C:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/src/sldrt_main.c"
C:/PROGRA~1/MATLAB/R2017a/toolbox/sldrt/src/sldrt_main.c:26:10: fatal error: 'rt_nonfinite.h' file not found
#include <rt_nonfinite.h>
^
1 error generated.
gmake: *** [sldrt_main.obj] Error 1
Error(s) encountered while building "HIL_squirrel_cage_test_at_1ms_sampling_time"
The error popped up while trying to build a code for a desktop real time target. I have checked "Allow non finite numbers" in the configuration options and yet the error persists. Unable to find the file in the MATLAB root. Please suggest a fix.

  0 Comments

Sign in to comment.

Accepted Answer

Birdman
Birdman on 16 Nov 2017
Have you checked it? You should uncheck it to get rid of that header and its build.

  9 Comments

Show 6 older comments
Balakrishnan Rajan
Balakrishnan Rajan on 22 Nov 2017
How did it work? Was the issue because my "rt_nonfinite.h" is missing in my MATLAB installation?
Thank you very much for the solution !!

Sign in to comment.

More Answers (0)