MATLAB Answers

0

C2000 SVPWM with Simulink Error

Asked by Cati Kati on 19 Jan 2017
Latest activity Commented on by Gu Yujun on 27 Mar 2018
Hi there,
I want to generate SVPWM - gate signal from C2000 TMS320F28027f for an inverter via Matlab/Simulink. When I settle my model as below, it is working.
But when I settle my model as below, it is not working.
I am facing that error message:
_### Generating code into build folder: C:\X\Desktop\BitirmeModelTI_ticcs
### Invoking Target Language Compiler on BitirmeModelTI.rtw
### Using System Target File: C:\Program Files\MATLAB\R2016a\toolbox\idelink\foundation\pjtgenerator\rtw\idelink_grt.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.
.
### Initial pass through model to cache user defined code
### Caching model source code
### Writing header file BitirmeModelTI.h
.
### Writing header file BitirmeModelTI_types.h
### Writing header file BitirmeModelTI_private.h
### Writing header file rtwtypes.h
### Writing header file multiword_types.h
### Writing header file zero_crossing_types.h
### Writing header file rtGetNaN.h
.
### Writing source file rtGetNaN.c
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
### Writing source file BitirmeModelTI.c
### Writing header file rtmodel.h
.
### Writing source file BitirmeModelTI_data.c
### Writing header file rt_defines.h
### Writing source file BitirmeModelTI_main.c
### TLC code generation complete.
.### Creating makefile: C:\X\Desktop\BitirmeModelTI_ticcs\BitirmeModelTI.mk
### Makefile creation done.
### Building makefile...
The call to idelink_grt_make_rtw_hook, during the exit hook generated the following error:
Error while building the project.
The build process will terminate as a result.
Caused by:
Error while building the project.
The build failed with the following message: "C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/bin/cl2000" -I"C:/MATLAB/SupportPackages/R2016a/toolbox/target/supportpackages/tic2000/inc" -I"C:/ti/controlSUITE/device_support/f2802x/v220/f2802x_common/include" -I"C:/ti/controlSUITE/device_support/f2802x/v220/f2802x_headers/include" -I"C:/ti/controlSUITE/device_support/f2802x/v220" -I"C:/Program Files/MATLAB/R2016a/simulink/include/sf_runtime" -I"C:/X/Desktop/BitirmeModelTI_ticcs" -I"C:/X/Desktop" -I"C:/Program Files/MATLAB/R2016a/extern/include" -I"C:/Program Files/MATLAB/R2016a/simulink/include" -I"C:/Program Files/MATLAB/R2016a/rtw/c/src" -D"__TICCSC__" -D"RT" -D"USE_RTMODEL" -ml -v28 -D"MODEL=BitirmeModelTI" -D"NUMST=1" -D"NCSTATES=0" -D"HAVESTDIO=" -D"INTEGER_CODE=0" -D"MT=0" -D"CLASSIC_INTERFACE=1" -D"ALLOCATIONFCN=0" -D"ONESTEPFCN=0" -D"TERMFCN=1" -D"MULTI_INSTANCE_CODE=0" -D"TID01EQ=0" -I"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/include" -fr"./derived/" ./rt_sim.c ./BitirmeModelTI.c ./BitirmeModelTI_data.c ./BitirmeModelTI_main.c ./MW_c28xx_board.c ./MW_c28xx_csl.c ./MW_c28xx_pwm.c ./rtGetInf.c ./rtGetNaN.c ./rt_nonfinite.c ./f2802x_codestartbranch.asm ./f2802x_cputimers.c ./f2802x_defaultisr.c ./f2802x_piectrl.c ./f2802x_pievect.c ./f2802x_sysctrl.c ./f2802x_usdelay.asm ./F2802x_GlobalVariableDefs.c
[rt_sim.c]
[BitirmeModelTI.c]
"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/include/stdbool.h", line 36: warning: incompatible redefinition of macro "false" (declared at line 761 of "C:/Program Files/MATLAB/R2016a/extern/include/tmwtypes.h")
"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/include/stdbool.h", line 37: warning: incompatible redefinition of macro "true" (declared at line 764 of "C:/Program Files/MATLAB/R2016a/extern/include/tmwtypes.h")
[BitirmeModelTI_data.c]
"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/include/stdbool.h", line 36: warning: incompatible redefinition of macro "false" (declared at line 761 of "C:/Program Files/MATLAB/R2016a/extern/include/tmwtypes.h")
"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/include/stdbool.h", line 37: warning: incompatible redefinition of macro "true" (declared at line 764 of "C:/Program Files/MATLAB/R2016a/extern/include/tmwtypes.h")
[BitirmeModelTI_main.c]
"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/include/stdbool.h", line 36: warning: incompatible redefinition of macro "false" (declared at line 761 of "C:/Program Files/MATLAB/R2016a/extern/include/tmwtypes.h")
"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/include/stdbool.h", line 37: warning: incompatible redefinition of macro "true" (declared at line 764 of "C:/Program Files/MATLAB/R2016a/extern/include/tmwtypes.h")
[MW_c28xx_board.c]
"./MW_c28xx_board.c", line 42: warning: function "config_ePWM_GPIO" declared implicitly
[MW_c28xx_csl.c]
[MW_c28xx_pwm.c]
[rtGetInf.c]
[rtGetNaN.c]
[rt_nonfinite.c]
[f2802x_codestartbranch.asm]
[f2802x_cputimers.c]
[f2802x_defaultisr.c]
[f2802x_piectrl.c]
[f2802x_pievect.c]
[f2802x_sysctrl.c]
[f2802x_usdelay.asm]
[F2802x_GlobalVariableDefs.c]
"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/bin/cl2000" -z -I"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/lib" -l"rts2800_ml.lib" -c -x -m"BitirmeModelTI.map" -stack0x200 -o ./CustomMW/BitirmeModelTI.out ./derived/rt_sim.obj ./derived/BitirmeModelTI.obj ./derived/BitirmeModelTI_data.obj ./derived/BitirmeModelTI_main.obj ./derived/MW_c28xx_board.obj ./derived/MW_c28xx_csl.obj ./derived/MW_c28xx_pwm.obj ./derived/rtGetInf.obj ./derived/rtGetNaN.obj ./derived/rt_nonfinite.obj ./derived/f2802x_codestartbranch.obj ./derived/f2802x_cputimers.obj ./derived/f2802x_defaultisr.obj ./derived/f2802x_piectrl.obj ./derived/f2802x_pievect.obj ./derived/f2802x_sysctrl.obj ./derived/f2802x_usdelay.obj ./derived/F2802x_GlobalVariableDefs.obj ./BitirmeModelTI.cmd ../../../../MATLAB/SupportPackages/R2016a/toolbox/target/supportpackages/tic2000/rtlib/IQmath.lib
<Linking>
warning: build attribute vendor section TI missing in
"../../../../MATLAB/SupportPackages/R2016a/toolbox/target/supportpackages/ti
c2000/rtlib/IQmath.lib<IQ29cosPU.obj>": compatibility cannot be determined
warning: build attribute vendor section TI missing in
"../../../../MATLAB/SupportPackages/R2016a/toolbox/target/supportpackages/ti
c2000/rtlib/IQmath.lib<IQ29sinPU.obj>": compatibility cannot be determined
warning: build attribute vendor section TI missing in
"../../../../MATLAB/SupportPackages/R2016a/toolbox/target/supportpackages/ti
c2000/rtlib/IQmath.lib<IQmathTables.obj>": compatibility cannot be
determined
"./BitirmeModelTI.cmd", line 27: error: program will not fit into available
memory. placement with alignment/blocking fails for section ".cinit" size
0x37 page 0. Available memory ranges:
PRAML0 size: 0x1000 unused: 0xb max hole: 0xb
error: errors encountered during linking; "./CustomMW/BitirmeModelTI.out" not
built
>> Compilation failure
gmake: *** [CustomMW/BitirmeModelTI.out] Error 1_
Is there anyone who knows the solution of this error?
Sorry for my bad english.

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by Sumith Sekharan on 25 Jan 2017

Hi,
Error message you are getting is about insufficient memory. On TI C2000 processors, there are two different options:
1) Load program to RAM
2) Load program to FLASH
From the error message it looks like you are using the RAM version. To load the program to FLASH,in Model Configuration Parameters-> Code Generation->Coder Target-> Target Hardware Resources->Board, select TI F28027 (boot from flash) as the target. This will load the program to Flash and .cinit section also will use the Flash memory.
Another option is to modify the memory for each sections for your application. This is possible from the Memory and Section tabs in the Target Hardware Resources pane. Please look at section 8.5 of www.ti.com/lit/ug/spru513l/spru513l.pdf to know more about linker command file settings.
Hope this helps. Let me know.

  1 Comment

Gu Yujun on 27 Mar 2018
I encountered the same problem, and adopted the first one to change my configuration. Luckily, it worked.

Sign in to comment.