This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/LAUNCHXL-F28069M: Problems with external mode in Simulink (error during building)

Part Number: LAUNCHXL-F28069M

Tool/software: TI C/C++ Compiler

Hi all! ;)

I want to run a Simulink model on my Texas Instruments F28069M (C2000 Microcontroller) in exernal mode, so that I can change certain parameters and view certain values on the scope online, i.e. during operation. I already set up the serial communication between laptop and MCU according to this documentation: www.mathworks.com/.../parameter-tuning-and-signal-logging-with-serial-external-mode.html However, I get an error message when I want to compile and run the model. The message looks like this:

C:/TI_CCSv6/ccsv6/tools/compiler/TI-CGT~1.STS/bin/cl2000 --compile_only --large_memory_model --cla_support=cla0 --silicon_version=28 --define="LARGE_MODEL" -i"/~SupportFiles/DSP280x_headers" -i"/~SupportFiles/DSP280x_headers/include" -i"C:/TI_CCSv6/ccsv6/tools/compiler/TI-CGT~1.STS/include" -v28 -ml --float_support=fpu32  --define="EXTMODE_DISABLEPRINTF"  -v28 -ml --float_support=fpu32 -DMODEL=Communication_Test -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DON_TARGET_WAIT_FOR_START=1 -DONESTEPFCN=1 -DEXT_MODE=1 -DTERMFCN=0 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=1 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DSTACK_SIZE=512 -DONESTEPFCN=1 -DEXT_MODE=1 -DTERMFCN=0 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=1 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DON_TARGET_WAIT_FOR_START=1 -DRT -DSTACK_SIZE=512 -DMODEL=Communication_Test -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Armin/Documents/MATLAB/Communication_Test_ert_rtw -IC:/Users/Armin/Documents/MATLAB -IC:/PROGRA~1/MATLAB/extern/include -IC:/PROGRA~1/MATLAB/simulink/include -IC:/PROGRA~1/MATLAB/rtw/c/src -IC:/PROGRA~1/MATLAB/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/rtw/c/ert -IC:/PROGRA~1/MATLAB/toolbox/coder/rtiostream/src/utils -IC:/MATLAB_Packages/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/src -IC:/PROGRA~1/MATLAB/toolbox/target/extensions/processor/tic2000/include -IC:/PROGRA~1/MATLAB/toolbox/rtw/targets/common/can/blocks/tlc_c -IC:/MATLAB_Packages/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/inc -IC:/TI_ControlSUITE/device_support/f2806x/v151/F2806x_common/include -IC:/TI_ControlSUITE/device_support/f2806x/v151/F2806x_headers/include -IC:/PROGRA~1/MATLAB/toolbox/shared/can/src/scanutil --output_file="MW_c28xx_board.obj" "MW_c28xx_board.c"
C:/TI_CCSv6/ccsv6/tools/compiler/TI-CGT~1.STS/bin/cl2000 --compile_only --large_memory_model --cla_support=cla0 --silicon_version=28 --define="LARGE_MODEL" -i"/~SupportFiles/DSP280x_headers" -i"/~SupportFiles/DSP280x_headers/include" -i"C:/TI_CCSv6/ccsv6/tools/compiler/TI-CGT~1.STS/include" -v28 -ml --float_support=fpu32  --define="EXTMODE_DISABLEPRINTF"  -v28 -ml --float_support=fpu32 -DMODEL=Communication_Test -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DON_TARGET_WAIT_FOR_START=1 -DONESTEPFCN=1 -DEXT_MODE=1 -DTERMFCN=0 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=1 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DSTACK_SIZE=512 -DONESTEPFCN=1 -DEXT_MODE=1 -DTERMFCN=0 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=1 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DON_TARGET_WAIT_FOR_START=1 -DRT -DSTACK_SIZE=512 -DMODEL=Communication_Test -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Armin/Documents/MATLAB/Communication_Test_ert_rtw -IC:/Users/Armin/Documents/MATLAB -IC:/PROGRA~1/MATLAB/extern/include -IC:/PROGRA~1/MATLAB/simulink/include -IC:/PROGRA~1/MATLAB/rtw/c/src -IC:/PROGRA~1/MATLAB/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/rtw/c/ert -IC:/PROGRA~1/MATLAB/toolbox/coder/rtiostream/src/utils -IC:/MATLAB_Packages/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/src -IC:/PROGRA~1/MATLAB/toolbox/target/extensions/processor/tic2000/include -IC:/PROGRA~1/MATLAB/toolbox/rtw/targets/common/can/blocks/tlc_c -IC:/MATLAB_Packages/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/inc -IC:/TI_ControlSUITE/device_support/f2806x/v151/F2806x_common/include -IC:/TI_ControlSUITE/device_support/f2806x/v151/F2806x_headers/include -IC:/PROGRA~1/MATLAB/toolbox/shared/can/src/scanutil --output_file="Communication_Test.obj" "Communication_Test.c"
"C:/TI_ControlSUITE/device_support/f2806x/v151/F2806x_headers/include/F2806x_Device.h", line 136: warning: typedef name has already been declared (with same type)
"C:/TI_ControlSUITE/device_support/f2806x/v151/F2806x_headers/include/F2806x_Device.h", line 136: error: expected a ";"
1 error detected in the compilation of "Communication_Test.c".
>> Compilation failure
gmake: *** [Communication_Test.obj] Error 1
The make command returned an error of 2
The command "An_error_occurred_during_the_call_to_make" is either written wrong or could not be found.
### Build procedure for model: 'Communication_Test' aborted due to an error.
Error(s) encountered while building "Communication_Test":
### Failed to generate all binary outputs.

It seems that the header files provided by TI contain an error. But that is not likely to be possible, so there might be something wrong with Simulink or Embedded Coder. Or are there some important setup steps which I missed? Does anyone know a solution?
Someone in the MathWorks-forums suggested installing an LTS-version instead of an STS-version of the compiler. I tried that, but the error still occurs when I try to build the model. However, the error does not occur when I switch the Simulink-mode to "Normal" and let the code run on the MCU. So it seems to be a problem of the external mode.

Best regards,
Armin