How to solve the error while building a simulink model?

43 views (last 30 days)
Hey everyone,
I'm using Matlab R2015b and I've made a very simple simulink model. It only contains an ADC and a Display block. Now I want to use "Build" to get the necessary files for using the model in dSPACE ControlDesk 5.5 in combination with MicroAutoBox (ds1401/1501). While building the model I always get the error "### Failed to generate all binary outputs."
When I activate the checkbox "Generate code only" in Configuration Parameters > Code Generation, the building process runs without an error but also no .trc-file was generated. This one is missing when I try to use the generated .sdf-file in ControlDesk.
When I type
rti_build('Test.slx')
in the command window in Matlab, the answer is 1. And I think it shouldn't be 1 ;)
Is there anyone who can solve this problem?
P.S.: Here you can see the whole message from the diagnostic viewer in Matlab/Simulink:
### Generating code into build folder: C:\Users\stestu2\Documents\MATLAB\Test_rti1401
### Generated code for 'Test' is up to date because no structural, parameter or code replacement library changes were found.
*** Optional User System Description File test_usr.sdf not available
*** Optional User Variable Description File Test_usr.trc not available
### Using toolchain: MinGW64 v4.x | gmake (64-bit Windows)
### 'C:\Users\stestu2\Documents\MATLAB\Test_rti1401\Test.mk' is up to date
### Building 'Test': C:\PROGRA~1\MATLAB\R2015b\bin\win64\gmake -f Test.mk all
C:\TDM-GC~1\bin/gcc -c -ansi -pedantic -Wno-long-long -fwrapv -O0 -DMAT_FILE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DTID01EQ=0 -DMODEL=Test -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -IC:/Users/stestu2/Documents/MATLAB/Test_rti1401 -IC:/Users/stestu2/Documents/MATLAB -IC:/PROGRA~1/MATLAB/R2015b/extern/include -IC:/PROGRA~1/MATLAB/R2015b/simulink/include -IC:/PROGRA~1/MATLAB/R2015b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2015b/rtw/c/src/ext_mode/common -o "Test.obj" "Test.c"
In file included from Test_trc_ptr.h:16:0,
from Test.c:17:
Test.h:23:20: fatal error: brtenv.h: No such file or directory
#include <brtenv.h>
^
compilation terminated.
gmake: *** [Test.obj] Error 1
----------------------------------------------------------------------
Error(s) encountered while building "Test":
### Failed to generate all binary outputs.
----------------------------------------------------------------------
*** Stopped RTI build procedure for model: Test.
----------------------------------------------------------------------
Error(s) encountered while building "Test":
### Failed to generate all binary outputs.
  4 Comments
Lukas Bathelt
Lukas Bathelt on 3 Jul 2018
Edited: Lukas Bathelt on 3 Jul 2018
I think it was a Compiler from Visual Studio. I had to install it and then I had the option in Matlab to change but I don't know the name anymore

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!