Running the "Using the Control Law Accelerator (CLA)" example in F28069 ControlStick
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hong Ting Hui
le 11 Juil 2016
Réponse apportée : Brian McKay
le 12 Juil 2016
Hi, when I was running the example, it has compilation error. The line "line 4: fatal error: cannot open source file "CLAmath.h" could be the main cause of this error.
Thanks in advance, Hugo
### Starting build procedure for model: c28069blink_cla Code Generation 1 Elapsed: 7 sec ### Generating code into build folder: C:\Users\HONGTING\Documents\MATLAB\c28069blink_cla_ert_rtw ### Invoking Target Language Compiler on c28069blink_cla.rtw ### Using System Target File: C:\Program Files\MATLAB\R2015b\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 header file c28069blink_cla.h ### Writing header file c28069blink_cla_types.h ### Writing header file rtwtypes.h . ### Writing source file c28069blink_cla.c ### Writing header file c28069blink_cla_private.h ### Writing header file cla_header.h ### 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 v5.2.12 | gmake (64-bit Windows) ### Creating 'C:\Users\HONGTING\Documents\MATLAB\c28069blink_cla_ert_rtw\c28069blink_cla.mk' ... ### Building 'c28069blink_cla': C:\PROGRA~1\MATLAB\R2015b\bin\win64\gmake -B -f c28069blink_cla.mk all
C:\Users\HONGTING\Documents\MATLAB\c28069blink_cla_ert_rtw>cd .
C:\Users\HONGTING\Documents\MATLAB\c28069blink_cla_ert_rtw>if "" == "" (C:\PROGRA~1\MATLAB\R2015b\bin\win64\gmake -B -f c28069blink_cla.mk all ) else (C:\PROGRA~1\MATLAB\R2015b\bin\win64\gmake -B -f c28069blink_cla.mk ) C:/TI/ccsv5/tools/compiler/C2000_~1.0/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/ccsv5/tools/compiler/C2000_~1.0/include" -v28 -ml --float_support=fpu32 -DCLA_BLOCK_INCLUDED -DMODEL=c28069blink_cla -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DSTACK_SIZE=64 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DRT -DSTACK_SIZE=64 -DMODEL=c28069blink_cla -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/HONGTING/Documents/MATLAB/c28069blink_cla_ert_rtw -IC:/Users/HONGTING/Documents/MATLAB -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/tic2000examples -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 -IC:/PROGRA~1/MATLAB/R2015b/rtw/c/ert -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/src -IC:/PROGRA~1/MATLAB/R2015b/toolbox/target/extensions/processor/tic2000/include -IC:/PROGRA~1/MATLAB/R2015b/toolbox/rtw/targets/common/can/blocks/tlc_c -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/inc -IC:/ti/controlSUITE/device_support/f2806x/v136/F2806x_common/include -IC:/ti/controlSUITE/device_support/f2806x/v136/F2806x_headers/include -IC:/PROGRA~1/MATLAB/R2015b/toolbox/shared/can/src/scanutil -IC:/workspace/include --output_file="MW_c28xx_board.obj" "MW_c28xx_board.c" C:/TI/ccsv5/tools/compiler/C2000_~1.0/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/ccsv5/tools/compiler/C2000_~1.0/include" -v28 -ml --float_support=fpu32 -DCLA_BLOCK_INCLUDED -DMODEL=c28069blink_cla -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DSTACK_SIZE=64 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DRT -DSTACK_SIZE=64 -DMODEL=c28069blink_cla -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/HONGTING/Documents/MATLAB/c28069blink_cla_ert_rtw -IC:/Users/HONGTING/Documents/MATLAB -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/tic2000examples -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 -IC:/PROGRA~1/MATLAB/R2015b/rtw/c/ert -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/src -IC:/PROGRA~1/MATLAB/R2015b/toolbox/target/extensions/processor/tic2000/include -IC:/PROGRA~1/MATLAB/R2015b/toolbox/rtw/targets/common/can/blocks/tlc_c -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/inc -IC:/ti/controlSUITE/device_support/f2806x/v136/F2806x_common/include -IC:/ti/controlSUITE/device_support/f2806x/v136/F2806x_headers/include -IC:/PROGRA~1/MATLAB/R2015b/toolbox/shared/can/src/scanutil -IC:/workspace/include --output_file="MW_c28xx_csl.obj" "MW_c28xx_csl.c" C:/TI/ccsv5/tools/compiler/C2000_~1.0/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/ccsv5/tools/compiler/C2000_~1.0/include" -v28 -ml --float_support=fpu32 -DCLA_BLOCK_INCLUDED -DMODEL=c28069blink_cla -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DSTACK_SIZE=64 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DRT -DSTACK_SIZE=64 -DMODEL=c28069blink_cla -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/HONGTING/Documents/MATLAB/c28069blink_cla_ert_rtw -IC:/Users/HONGTING/Documents/MATLAB -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/tic2000examples -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 -IC:/PROGRA~1/MATLAB/R2015b/rtw/c/ert -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/src -IC:/PROGRA~1/MATLAB/R2015b/toolbox/target/extensions/processor/tic2000/include -IC:/PROGRA~1/MATLAB/R2015b/toolbox/rtw/targets/common/can/blocks/tlc_c -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/inc -IC:/ti/controlSUITE/device_support/f2806x/v136/F2806x_common/include -IC:/ti/controlSUITE/device_support/f2806x/v136/F2806x_headers/include -IC:/PROGRA~1/MATLAB/R2015b/toolbox/shared/can/src/scanutil -IC:/workspace/include --output_file="c28069blink_cla.obj" "c28069blink_cla.c" C:/TI/ccsv5/tools/compiler/C2000_~1.0/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/ccsv5/tools/compiler/C2000_~1.0/include" -v28 -ml --float_support=fpu32 -DCLA_BLOCK_INCLUDED -DMODEL=c28069blink_cla -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DSTACK_SIZE=64 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DRT -DSTACK_SIZE=64 -DMODEL=c28069blink_cla -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/HONGTING/Documents/MATLAB/c28069blink_cla_ert_rtw -IC:/Users/HONGTING/Documents/MATLAB -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/tic2000examples -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 -IC:/PROGRA~1/MATLAB/R2015b/rtw/c/ert -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/src -IC:/PROGRA~1/MATLAB/R2015b/toolbox/target/extensions/processor/tic2000/include -IC:/PROGRA~1/MATLAB/R2015b/toolbox/rtw/targets/common/can/blocks/tlc_c -IC:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000/toolbox/target/supportpackages/tic2000/inc -IC:/ti/controlSUITE/device_support/f2806x/v136/F2806x_common/include -IC:/ti/controlSUITE/device_support/f2806x/v136/F2806x_headers/include -IC:/PROGRA~1/MATLAB/R2015b/toolbox/shared/can/src/scanutil -IC:/workspace/include --output_file="cla_task.obj" "cla_task.cla" "cla_task.cla", line 4: fatal error: cannot open source file "CLAmath.h" 1 catastrophic error detected in the compilation of "cla_task.cla". Compilation terminated.
>> Compilation failure gmake: * [cla_task.obj] Error 1
C:\Users\HONGTING\Documents\MATLAB\c28069blink_cla_ert_rtw>echo The make command returned an error of 2 The make command returned an error of 2
C:\Users\HONGTING\Documents\MATLAB\c28069blink_cla_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. ### Build procedure for model: 'c28069blink_cla' aborted due to an error. Error(s) encountered while building "c28069blink_cla": ### Failed to generate all binary outputs. Component: Simulink | Category: Model error
The settings of the F28069 is as follows:
>> checkEnvSetup('ccsv5', 'F2806x')
1. Checking CCSv5 (Code Composer Studio) version Required version: 5.0 or later Required for : Code Generation Your Version : 5.5.0 ### Setting environment variable "TI_DIR" to "C:\ti\ccsv5"
2. Checking CGT (Texas Instruments C2000 Code Generation Tools) version Required version: 5.2.1 to 6.0.2 Required for : Code generation Your Version : 6.0.2 ### Setting environment variable "C2000_CGT_INSTALLDIR" to "C:\Program Files (x86)\Texas Instruments\C2000 Code Generation Tools 6.0.2"
3. Checking DSP/BIOS (Real Time Operating System) version Required version: 5.33.05 to 5.41.11.38 Required for : Code generation Your Version : 5.41.11.38 ### Setting environment variable "CCSV5_DSPBIOS_INSTALLDIR" to "C:\Program Files\Texas Instruments\bios_5_41_11_38"
4. Checking XDC Tools (eXpress DSP Components) version Required version: 3.16.02.32 or later Required for : Code generation Your Version : 3.25.03.72
5. Checking 2806x C/C++ Header Files version Required version: 1.36 Required for : Code generation Your Version : 1.36 ### Setting environment variable "DSP2806x_INSTALLDIR" to "C:\ti\controlSUITE\device_support\f2806x\v136"
6. Checking Flash Tools (TMS320F2806x Piccolo™ Flash API) version Required version: 1.00 Required for : Flash Programming Your Version : 1.00 ### Setting environment variable "FLASH_2806X_API_INSTALLDIR" to "C:\ti\controlSUITE\libs\utilities\flash_api\2806x\v100"
0 commentaires
Réponse acceptée
Brian McKay
le 12 Juil 2016
Hi Hugo,
Try this to set the correct path for CLAMathLib:
setpref('MathWorks_TIC2000', 'CLALibDir', 'C:\ti\controlSUITE\libs\math\CLAmath\v400')
In this case, “C:\ti\controlSUITE” is the controlSUITE path.
-Brian
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur DSP Algorithm Acceleration dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!