Other Parts Discussed in Thread: C2000WARE
Tool/software: TI C/C++ Compiler
For my application, I have numerous (like >50) RAM variables I want to put at specific addresses which are defined in some header file. I'm aware of the method of defining sections in the linker command file, but this requires a separate section to be declared for each independent address. With so many variables, this becomes incredibly tedious, since we have to manually enforce agreement between the .cmd file, the .c file where the variable is declared/defined, and the .h file where the memory locations are kept.
Numerous people have asked this same question, but it seems like the only answer that comes back is to use the above approach. Is there really no method that can be implemented purely in the .c and .h files? I'm using CCS 9.2, btw.
If the answer is no, is there any way to ensure that a set of variables which are put in the same .section are given addresses in a deterministic manner? It would make things a bit easier if I could declare them a specific order using DATA_SECTION(), and assume they are placed in memory in the same order with predictable alignment.