|ARM Technical Support Knowledge Articles|
In ADS 1.1 and earlier, there is a limit of 8MB on the maximum size of objects, due to internal compiler implementation limits. If this is exceeded, the compilers will report "Error: C2429E: structure or array too large", as the following example shows:
armcc -c test.c
"test.c", line 1: Error: C2429E: structure or array too large
To create larger arrays, you can use
malloc() instead. If you cannot use
malloc(), then you can define the array as a
ZI area in an assembler file using
SPACE, for example:
AREA mymem, DATA, NOINIT, ALIGN=2 array SPACE 100000000 ; define 100000000 bytes zeroed store END
Then declare the array in a header file like:
extern int array;
SPACE directive reserves a zeroed block of memory.
% is a synonym for
This limit is raised to 256MB in ADS 1.2, and to 4GB in RVCT 2.x and later, which is due to the maximum value of an integer. In RVCT 2.x and later, the equivalent error message is: "
Error: #95: array is too large".
Article last edited on: 2011-08-22 11:25:40
Did you find this article helpful? Yes No
How can we improve this article?