Error when building code for C2000 MCU in external mode
古いコメントを表示
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: https://www.mathworks.com/help/supportpkg/texasinstrumentsc2000/examples/parameter-tuning-and-signal-logging-with-serial-external-mode.html?s_tid=gn_loc_drop 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
採用された回答
その他の回答 (2 件)
Venkatesh Chilapur
2017 年 7 月 26 日
0 投票
Hi,
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: http://software-dl.ti.com/codegen/non-esd/downloads/download.htm
Regards, Venkatesh C
Venkatesh Chilapur
2017 年 7 月 26 日
0 投票
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.
カテゴリ
ヘルプ センター および File Exchange で Texas Instruments C2000 Processors についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!