Error when building code for C2000 MCU in external mode

조회 수: 7 (최근 30일)
Armin Lensker
Armin Lensker 2017년 7월 25일
편집: Armin Lensker 2017년 7월 27일
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: 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?
Best regards, Armin

채택된 답변

Armin Lensker
Armin Lensker 2017년 7월 27일
편집: Armin Lensker 2017년 7월 27일
Hi all! ;)
I found a solution to my problem: There was something wrong with my xmakefilesetup. A few days ago I set up the code generation by using the command "xmakefilesetup", as it is described in the following video: I created a clone version of the default "ticcs_c2000_ccsv4"-profile. I was using this profile the whole time when the above-mentioned error occurred in external mode. Today I remembered this modification and reversed it. Now I am using the default "ticcs_c2000_ccsv4"-profile and everything runs fine! The error does not occur anymore in external mode.
Thanks for the help and information so far!
Best regards, Armin

추가 답변 (2개)

Venkatesh Chilapur
Venkatesh Chilapur 2017년 7월 26일
This appears to be a redefinition error which probably could be related to compiler version being used. From the Error Log, we see the compiler version is one of the STS (short term support) which TI releases as a intermediate release before the final LTS (long term support)release. It is recommended to upgrade you compiler version to LTS and preferably use the recommended version as found during the setup of our support package. The link to TI codegen tools are at:
Regards, Venkatesh C
  댓글 수: 1
Armin Lensker
Armin Lensker 2017년 7월 26일
Hi, thank for the help! ;) I installed the newest LTS-version but the error still occurs when I try to build the model. However, the error does not occur when I switch the mode to "Normal" and let the code run on the MCU. So it seems to be a problem of the external mode.

댓글을 달려면 로그인하십시오.

Venkatesh Chilapur
Venkatesh Chilapur 2017년 7월 26일
HI, please contact MathWorks Technical Support with necessary artifacts like Model used for us to reproduce and help on the error. Please include details on the version of the MATLAB, support package, TI Codegen tools.

Community Treasure Hunt

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

Start Hunting!

Translated by