Other Parts Discussed in Thread: TMS320F28335
Hello!
I have faced a strange problem with my project that was ported to CCS 5.2 from CCS 3.3. In CCS 3.3 everything was good and the problem didn't show up.
Here is memory area definition in my .cmd file:
MEMORY
{
...
PAGE 1:
TEST_MEM: origin = 0x200000, length = 0x101
...
}
And here is section definition in .cmd file
SECTIONS
{
...
test_mem :> TEST_MEM, PAGE = 1
...
}
Then I defined 2 variables in .c file and placed them into a section test_mem:
unsigned int var1=0;
int var2[0x100];
#pragma DATA_SECTION(var1,"test_mem")
#pragma DATA_SECTION(var2,"test_mem")
Variables var1 and var2 are the only variables in this memory area. I am getting a compilation error:"error #10099-D: program will not fit into available memory. run placement with aligment/blocking fails for section "test_mem" size 0x140 page 1"
I can't understand why is the size of test_mem section 0x140? There are only two variables: var1 - 1 word and var2 - 0x100 words(0x1+0x100=0x101 but not 0x140). And the second question is how can I switch off this compiler option "aligment/blocking" for I think the problem is in this option?
In CCS 3.3 this code was compiled without errors and in .map file I saw such a memory allocation:
00200000 _var1
00200001 _var2
I'm using TMS320F28335 controller if this matters.