How to solve the error while building a simulink model?

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

I have a new Compiler, now it's working.
To which Compiler have you switched? I have the same problem and don't know, which Compiler should be usefull.
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
which compiler used to debug these error

Sign in to comment.

Answers (0)

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Asked:

on 12 Jul 2017

Commented:

on 25 Sep 2023

Community Treasure Hunt

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

Start Hunting!