TI C2000 LaunchPad with Simulink error

6 Ansichten (letzte 30 Tage)
tarek doghish
tarek doghish am 17 Jan. 2017
Beantwortet: Zeb Kamran am 13 Dez. 2017
I am trying to run the example 'Permanent Magnet Synchronous Motor Field-Oriented Control' (on TI F28027 LaunchPad with a BOOSTXL-DRV8301 booster pack)using Matlab2016a and CCSV6 I think I've setup the environment correctly but I am facing the following error:
### Generating code into build folder: E:\Lamar\Thesis\motor control with ti launchpad\c28027pmsmfoc_ert_ert_rtw
### Invoking Target Language Compiler on c28027pmsmfoc_ert.rtw
### Using System Target File: C:\Program Files\MATLAB\R2016a\rtw\c\ert\ert.tlc
### Loading TLC function libraries
Warning: The data type "int8" uses a word size that is not available on the intended target.
Fixed-point signals using this data type will be put inside a larger word or multi words. When used,
extra software will be generated to force this larger word or multi words to emulate a smaller
word. This emulation is helpful when your prototype target and your final
production target are not the same. If the smaller word size does NOT exist
on the final production target, then consider increasing the word size to
one that is supported.
Warning: The data type "uint8" uses a word size that is not available on the intended target.
.
Warning: The data type "boolean" uses a word size that is not available on the intended target.
.
### Generating TLC interface API for custom data
### Initial pass through model to cache user defined code
### Caching model source code
...............................................................................
.
### Writing source file c28027pmsmfoc_ert.c
.
### Writing header file c28027pmsmfoc_ert_private.h
### Writing header file c28027pmsmfoc_ert.h
### Writing header file DSP28xx_SciUtil.h
### Writing source file DSP28xx_SciUtil.c
### Writing header file c28027pmsmfoc_ert_types.h
.
### Writing header file rtwtypes.h
### Writing source file c28027pmsmfoc_ert_data.c
### Writing header file rtmodel.h
### Writing source file ert_main.c
### TLC code generation complete.
.### Evaluating PostCodeGenCommand specified in the model
### Using toolchain: Texas Instruments C2000 Code Generation Tools v6.0.0 | gmake (64-bit Windows)
### 'E:\Lamar\Thesis\motor control with ti launchpad\c28027pmsmfoc_ert_ert_rtw\c28027pmsmfoc_ert.mk' is up to date
### Building 'c28027pmsmfoc_ert': C:\PROGRA~1\MATLAB\R2016a\bin\win64\gmake -B -f c28027pmsmfoc_ert.mk all
E:\Lamar\Thesis\motor control with ti launchpad\c28027pmsmfoc_ert_ert_rtw>cd .
E:\Lamar\Thesis\motor control with ti launchpad\c28027pmsmfoc_ert_ert_rtw>if "" == "" (C:\PROGRA~1\MATLAB\R2016a\bin\win64\gmake -B -f c28027pmsmfoc_ert.mk all ) else (C:\PROGRA~1\MATLAB\R2016a\bin\win64\gmake -B -f c28027pmsmfoc_ert.mk )
C:/ti/ccsv6/tools/compiler/C2000_~2.LTS/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/tools/compiler/C2000_~2.LTS/include" -v28 -ml -DMODEL=c28027pmsmfoc_ert -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DSTACK_SIZE=512 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DRT -DSTACK_SIZE=512 -DMODEL=c28027pmsmfoc_ert -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -IC:/PROGRA~1/MATLAB/R2016a/simulink/include/sf_runtime -IE:/Lamar/Thesis/motor control with ti launchpad/c28027pmsmfoc_ert_ert_rtw -IE:/Lamar/Thesis/motor control with ti launchpad -IC:/PROGRA~1/MATLAB/R2016a/extern/include -IC:/PROGRA~1/MATLAB/R2016a/simulink/include -IC:/PROGRA~1/MATLAB/R2016a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2016a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2016a/rtw/c/ert -IC:/MATLAB/SupportPackages/R2016a/toolbox/target/supportpackages/tic2000/src -IC:/MATLAB/SupportPackages/R2016a/toolbox/target/supportpackages/tic2000/inc -IC:/ti/controlSUITE/device_support/f2802x/v222/f2802x_common/include -IC:/ti/controlSUITE/device_support/f2802x/v222/f2802x_headers/include -IC:/ti/controlSUITE/device_support/f2802x/v222 --output_file="MW_c28xx_board.obj" "MW_c28xx_board.c"
[control.]
>> WARNING: more than one source file is specified; option --output_file is ignored
Fatal error: cannot open source file "control"
1 catastrophic error detected in the compilation of "control".
Compilation terminated.
>> Compilation failure
gmake: *** [MW_c28xx_board.obj] Error 1
E:\Lamar\Thesis\motor control with ti launchpad\c28027pmsmfoc_ert_ert_rtw>echo The make command returned an error of 2
The make command returned an error of 2
E:\Lamar\Thesis\motor control with ti launchpad\c28027pmsmfoc_ert_ert_rtw>An_error_occurred_during_the_call_to_make
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
### Creating HTML report file c28027pmsmfoc_ert_codegen_rpt.html
### Build procedure for model: 'c28027pmsmfoc_ert' aborted due to an error.
Error(s) encountered while building "c28027pmsmfoc_ert":
### Failed to generate all binary outputs.
Please, if anyone can help

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 17 Jan. 2017
If you look at the command line
C:/ti/ccsv6/tools/compiler/C2000_~2.LTS/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/tools/compiler/C2000_~2.LTS/include" -v28 -ml -DMODEL=c28027pmsmfoc_ert -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DSTACK_SIZE=512 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DRT -DSTACK_SIZE=512 -DMODEL=c28027pmsmfoc_ert -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -IC:/PROGRA~1/MATLAB/R2016a/simulink/include/sf_runtime -IE:/Lamar/Thesis/motor control with ti launchpad/c28027pmsmfoc_ert_ert_rtw -IE:/Lamar/Thesis/motor control with ti launchpad -IC:/PROGRA~1/MATLAB/R2016a/extern/include -IC:/PROGRA~1/MATLAB/R2016a/simulink/include -IC:/PROGRA~1/MATLAB/R2016a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2016a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2016a/rtw/c/ert -IC:/MATLAB/SupportPackages/R2016a/toolbox/target/supportpackages/tic2000/src -IC:/MATLAB/SupportPackages/R2016a/toolbox/target/supportpackages/tic2000/inc -IC:/ti/controlSUITE/device_support/f2802x/v222/f2802x_common/include -IC:/ti/controlSUITE/device_support/f2802x/v222/f2802x_headers/include -IC:/ti/controlSUITE/device_support/f2802x/v222 --output_file="MW_c28xx_board.obj" "MW_c28xx_board.c"
notice that it contains in part
-IE:/Lamar/Thesis/motor control with ti launchpad
Unfortunately the command processor being used always treats unquoted spaces as ending the argument, so that command is as if you had used -IE:/Lamar/Thesis/motor as one argument, and had also asked to compile the files "control", "with", "ti", and "launchpad".
The toolchain "should" know enough to add quotes when needed, but it does not know that.
The easiest way to work around this is to move your model into a directory which does not have any spaces in any part of the name.
  3 Kommentare
Walter Roberson
Walter Roberson am 17 Jan. 2017
Sorry, I do not have PIL hardware available to me, so I do not know how to set that up.
Tarek Doghish
Tarek Doghish am 19 Jan. 2017
I figured that out.. Thanks again :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Zeb Kamran
Zeb Kamran am 13 Dez. 2017
How You fix this problem "### Failed to generate all binary outputs." plz let me know

Community Treasure Hunt

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

Start Hunting!

Translated by