This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
Hello,
I use TI Delfino C28346. I was using CCSv3.3 with MATLAB r2015b and had no problem compiling my Simulink model. Now, i want to compile my same model with Matlab r2018b using CCSv8.3. Unfortunately, when i want to build my model, i get an error all the time. Below you can find the Diagnostic Viewer error, .map file and .cmd file.
The linker command file i use is this:
C:\Users\ecetinyol\Desktop\ecetinyol_7579_OSMBM_Copy
The Diagnostic Viewer error is:
<Linking>
"C:/Users/ecetinyol/Desktop/ecetinyol_7579_OSMBM_Copy/v0.1.4_R2018b/YZ_7573_0KKB.cmd", line 28: error:
program will not fit into available memory. placement with
alignment/blocking fails for section ".text" size 0x4053b page 0. Available
memory ranges:
RAMH0H5 size: 0x2d800 unused: 0x2d800 max hole: 0x2d800
"C:/Users/ecetinyol/Desktop/ecetinyol_7579_OSMBM_Copy/v0.1.4_R2018b/YZ_7573_0KKB.cmd", line 33: error:
program will not fit into available memory. placement with
alignment/blocking fails for section ".cinit" size 0x8196 page 0. Available
memory ranges:
RAMH3H5 size: 0x2800 unused: 0x2800 max hole: 0x2800
"C:/Users/ecetinyol/Desktop/ecetinyol_7579_OSMBM_Copy/v0.1.4_R2018b/YZ_7573_0KKB.cmd", line 29: error:
program will not fit into available memory. placement with
alignment/blocking fails for section ".switch" size 0x13dc page 0.
Available memory ranges:
RAML2L7 size: 0xcc00 unused: 0x375 max hole: 0x374
error: errors encountered during linking; "../YZ_7573_0KKB.out" not built
>> Compilation failure
gmake: *** [../YZ_7573_0KKB.out] Error 1
C:\Users\ecetinyol\Desktop\ecetinyol_7579_OSMBM_Copy\v0.1.4_R2018b\YZ_7573_0KKB_ert_rtw>echo The make command returned an error of 2
The make command returned an error of 2
C:\Users\ecetinyol\Desktop\ecetinyol_7579_OSMBM_Copy\v0.1.4_R2018b\YZ_7573_0KKB_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: 'YZ_7573_0KKB' aborted due to an error.
Error(s) encountered while building "YZ_7573_0KKB":
### Failed to generate all binary outputs.
and the .cmd file is this:
MEMORY
{
PAGE 0:
BEGINRAM: origin=0x0, length=0x2
RAMM0M1: origin=0x52, length=0x3ae
ZONE7A: origin=0x200000, length=0xfc00
RAMH0H5: origin=0x300000, length=0x2d800
CSM_RSVD: origin=0x33ff80, length=0x76
CSM_PWL_PROG: origin=0x33fff8, length=0x8
IQTABLES: origin=0x3fe000, length=0xb50
IQTABLES2: origin=0x3feb50, length=0x8c
FPUTABLES: origin=0x3febdc, length=0x6a0
BOOTRAM: origin=0x3ff27c, length=0xd44
RESET: origin=0x3fffc0, length=0x2
RAML2L7: origin=0x9400, length=0xcc00
RAMH3H5: origin=0x32d800, length=0x2800
PAGE 1:
RAML0L7: origin=0x8000, length=0x1000
BOOTRSVD: origin=0x2, length=0x50
ZONE7B: origin=0x20fc00, length=0x400
DEFRAMLOP2: origin=0x9000, length=0x400
DEFRAML7P1: origin=0x16000, length=0x400
DEFRAML7P2: origin=0x16400, length=0x1c00
}
SECTIONS
{
.vectors: load = 0x000000000
.text: > RAMH0H5, PAGE = 0
.switch: > RAML2L7, PAGE = 0
.bss: > DEFRAMLOP2, PAGE = 1
.ebss: > RAML2L7, PAGE = 0
.far: > RAML2L7, PAGE = 0
.cinit: > RAMH3H5, PAGE = 0
.pinit: > RAML2L7, PAGE = 0
.const: > DEFRAMLOP2, PAGE = 1
.econst: > RAML2L7, PAGE = 0
.reset: > RESET, PAGE = 0, TYPE = DSECT
.data: > RAML2L7, PAGE = 0
.cio: > RAML2L7, PAGE = 0
.sysmem: > DEFRAMLOP2, PAGE = 1
.esysmem: > RAML2L7, PAGE = 0
.stack: > RAML0L7, PAGE = 1
.rtdx_text: > RAML2L7, PAGE = 0
.rtdx_data: > RAML2L7, PAGE = 0
IQmath: > IQTABLES, PAGE = 0
codestart: > BEGINRAM, PAGE = 0
csmpasswds: > CSM_PWL_PROG, PAGE = 0
csm_rsvd: > CSM_RSVD, PAGE = 0
ramfuncs: > RAML2L7, PAGE = 0
external_ram: > ZONE7B, PAGE = 1
IQmathTables: > IQTABLES, PAGE = 0 , TYPE = NOLOAD
IQmathTables2: > IQTABLES2, PAGE = 0 , TYPE = NOLOAD
FPUmathTables: > FPUTABLES, PAGE = 0 , TYPE = NOLOAD
}
I also saw some unused fields when i opened the file with .map extension.
******************************************************************************
TMS320C2000 Linker PC v5.2.1
******************************************************************************
>> Linked Mon Feb 10 15:28:12 2020
OUTPUT FILE NAME: <YZ_7573_0KKB.out>
ENTRY POINT SYMBOL: "_c_int00" address: 003238e6
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
PAGE 0:
BEGINRAM 00000000 00000002 00000002 00000000 RWIX
RAMM0M1 00000052 000003ae 00000000 000003ae RWIX
RAML2L7 00009400 0000cc00 000060c6 00006b3a RWIX
ZONE7A 00200000 0000fc00 00000000 0000fc00 RWIX
RAMH0H5 00300000 0002d800 00023b68 00009c98 RWIX
RAMH3H5 0032d800 00002800 00000040 000027c0 RWIX
CSM_RSVD 0033ff80 00000076 00000000 00000076 RWIX
CSM_PWL_PROG 0033fff8 00000008 00000000 00000008 RWIX
IQTABLES 003fe000 00000b50 00000000 00000b50 RWIX
IQTABLES2 003feb50 0000008c 00000000 0000008c RWIX
FPUTABLES 003febdc 000006a0 00000000 000006a0 RWIX
BOOTRAM 003ff27c 00000d44 00000000 00000d44 RWIX
RESET 003fffc0 00000002 00000000 00000002 RWIX
PAGE 1:
BOOTRSVD 00000002 00000050 00000000 00000050 RWIX
DEV_EMU 00000880 00000180 000000d0 000000b0 RWIX
CSM 00000ae0 00000010 00000010 00000000 RWIX
XINTF 00000b20 00000020 0000001e 00000002 RWIX
CPU_TIMER0 00000c00 00000008 00000008 00000000 RWIX
CPU_TIMER1 00000c08 00000008 00000008 00000000 RWIX
CPU_TIMER2 00000c10 00000008 00000008 00000000 RWIX
PIE_CTRL 00000ce0 00000020 0000001a 00000006 RWIX
PIE_VECT 00000d00 00000100 00000100 00000000 RWIX
DMA 00001000 00000200 000000e0 00000120 RWIX
MCBSPA 00005000 00000040 00000025 0000001b RWIX
MCBSPB 00005040 00000040 00000025 0000001b RWIX
ECANA 00006000 00000040 00000034 0000000c RWIX
ECANA_LAM 00006040 00000040 00000040 00000000 RWIX
ECANA_MOTS 00006080 00000040 00000040 00000000 RWIX
ECANA_MOTO 000060c0 00000040 00000040 00000000 RWIX
ECANA_MBOX 00006100 00000100 00000100 00000000 RWIX
ECANB 00006200 00000040 00000034 0000000c RWIX
ECANB_LAM 00006240 00000040 00000040 00000000 RWIX
ECANB_MOTS 00006280 00000040 00000040 00000000 RWIX
ECANB_MOTO 000062c0 00000040 00000040 00000000 RWIX
ECANB_MBOX 00006300 00000100 00000100 00000000 RWIX
EPWM9 00006600 00000022 00000022 00000000 RWIX
EPWM1 00006800 00000022 00000022 00000000 RWIX
EPWM2 00006840 00000022 00000022 00000000 RWIX
EPWM3 00006880 00000022 00000022 00000000 RWIX
EPWM4 000068c0 00000022 00000022 00000000 RWIX
EPWM5 00006900 00000022 00000022 00000000 RWIX
EPWM6 00006940 00000022 00000022 00000000 RWIX
EPWM7 00006980 00000022 00000022 00000000 RWIX
EPWM8 000069c0 00000022 00000022 00000000 RWIX
ECAP1 00006a00 00000020 00000020 00000000 RWIX
ECAP2 00006a20 00000020 00000020 00000000 RWIX
ECAP3 00006a40 00000020 00000020 00000000 RWIX
ECAP4 00006a60 00000020 00000020 00000000 RWIX
ECAP5 00006a80 00000020 00000020 00000000 RWIX
ECAP6 00006aa0 00000020 00000020 00000000 RWIX
EQEP1 00006b00 00000040 00000040 00000000 RWIX
EQEP2 00006b40 00000040 00000040 00000000 RWIX
EQEP3 00006b80 00000040 00000040 00000000 RWIX
GPIOCTRL 00006f80 00000040 0000002e 00000012 RWIX
GPIODAT 00006fc0 00000020 00000020 00000000 RWIX
GPIOINT 00006fe0 00000020 0000000a 00000016 RWIX
SYSTEM 00007010 00000021 00000020 00000001 RWIX
SPIA 00007040 00000010 00000010 00000000 RWIX
SCIA 00007050 00000010 00000010 00000000 RWIX
XINTRUPT 00007070 00000010 00000010 00000000 RWIX
SCIB 00007750 00000010 00000010 00000000 RWIX
SCIC 00007770 00000010 00000010 00000000 RWIX
SPID 00007780 00000010 00000010 00000000 RWIX
I2CA 00007900 00000040 00000022 0000001e RWIX
RAML0L7 00008000 00001000 00000200 00000e00 RWIX
DEFRAMLOP2 00009000 00000400 00000000 00000400 RWIX
DEFRAML7P1 00016000 00000400 00000000 00000400 RWIX
DEFRAML7P2 00016400 00001c00 00000000 00001c00 RWIX
ZONE7B 0020fc00 00000400 00000000 00000400 RWIX
CSM_PWL 0033fff8 00000008 00000008 00000000 RWIX
How can i solve this problem? I think i need to make some changes in memory areas. Can you help me please?
You have run out of memory. By a lot, which is surprising. I'm not sure of the cause. But I can guide you part of the way forward.
It would be good to get a general understanding of linker command files by reading the first part of the article Linker Command File Primer.
Let's focus on just this one diagnostic ...
user6378352 said:"C:/Users/ecetinyol/Desktop/ecetinyol_7579_OSMBM_Copy/v0.1.4_R2018b/YZ_7573_0KKB.cmd", line 28: error:
program will not fit into available memory. placement with
alignment/blocking fails for section ".text" size 0x4053b page 0. Available
memory ranges:
RAMH0H5 size: 0x2d800 unused: 0x2d800 max hole: 0x2d800
It is related to this line in the linker command file ...
user6378352 said:.text: > RAMH0H5, PAGE = 0
That line says to create an output section named .text. It is made up of all the input sections named .text. It is allocated to the memory range RAMH0H5. The size of the .text output section is 0x4053b words, and the size of the RAMH0H5 memory range is 0x2d800 words.
Because you say ...
user6378352 said:I was using CCSv3.3 with MATLAB r2015b and had no problem compiling my Simulink model.
... this must have worked before. Somehow, the size of the .text section grew from about 0x2d800 words to 0x4053b words. That is a very large difference. The .text section, by common convention, contains the program instructions, also called the code. So, you have experienced a large increase in code size.
To help understand what happened, consider performing this experiment. Make a temporary change to the linker command file. Make the memory range for .text much larger. Do the same thing for the other memory ranges that have a similar problem. Keep at it until you get a successful link. The resulting executable will not work, but that's OK, because you don't plan to run it. Now you have a linker map file from the new build, with everything allocated somewhere in memory. Compare this new map file with the old one. That should give you a better understanding of where to focus your investigation into why the code size is so much bigger.
Please let us know what you found, and how you addressed it.
Thanks and regards,
-George