Hi,
In my code i have an array as below and i want to place the array in flash at location SECT1
#pragma DATA_SECTION(Array,"SECT1");
int16_T Array128] = { -14848, -14848, -14848, -21760, -23040,
-23040, -23040, -23040, -14336, -14336, -14336, -20736, -23040, -23040, -23040,
-23040, -13824, -13824, -13824, -19456, -21760, -23040, -23040, -23040, -13056,
-13056, -13056, -17920, -20992, -21760, -23040, -23040, -12032, -12032, -12032,
-16128, -19456, -21248, -23040, -23040, -10752, -10752, -10752, -13824, -17664,
-20224, -21760, -23040, -8960, -8960, -8960, -8960, -14592, -18688, -20480,
-23040, -5632, -5632, -5632, -5632, -8704, -14336, -18944, -23040, 3840, 3840,
3840, 3840, 3840, 7680, 9216, 23040, 5632, 5632, 5632, 5632, 9472, 11008,
12800, 23040, 7168, 7168, 7168, 9728, 12288, 13056, 14336, 23040, 8960, 8960,
8960, 12288, 13824, 14592, 15616, 23040, 10240, 10240, 10240, 14080, 15360,
15872, 23040, 23040, 10752, 10752, 12288, 15616, 16896, 17664, 23040, 23040,
11520, 11520, 14080, 17152, 18688, 23040, 23040, 23040, 11520, 11520, 15104,
23040, 23040, 23040, 23040, 23040 } ;
SECT1 allocation in my cmd file looks as below
MEM_SECT1 : origin = 0x3D804C, length = 0x80
SECT1 : > MEM_SECT1 ,PAGE = 0
The array size is 128(Hex:80) so i have allocated the section(SECT1) as 0x80 but i am getting following linker error
>> error: can't allocate SECT1, size 00000080 (page 0) in
MEM_SECT1 (avail: 00000080)
It looks like the size required and allocated are same but i am not aware why i am getting this linker error.
Any any one suggest me how to resolve this error