Dear Forum members:
I am attempting to allocate a large number of multidimential arrays. These arrays need to be located in identical places among several different programs running at different times.
I am using CCS DSK 2.12.00 and the F2407 uController.
I have used pragma directives to attempt to locate an array thus:
#pragma DATA_SECTION(cursor_positions,".mysect1")
unsigned int cursor_positions[2][40];
then in my linker command file:
MEMORY { page 1 : my_area : origin = 0300h , length = 80 } SECTIONS { .mysect1 : load = my_area page 1 }
This works as long as the last few bits of the address are zero. If I attempt to allocate at 0301h for example, I get a "cannot alloocate" error message from the linker.
I assume this has something to do with the method the compiler uses to access the array and needs the array to start on some kind of even boundry.
Is there a way of telling the compiler to use a different method to access the array, and also to force the linker to comply with my odd request.
I have thought of rewriting the program to calculate offsets of pointers to access the array, then it is only a matter of reserving the space, but I would rather not do that.
Thanks for any help,
Mark Morenz