This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Folks
In CCS projects there are CMD files which command the linker where to place sections within RAM and FLASH, but is there a file which controls what goes into the sections?
For non-default sections the user uses a #pragma DATA_SECTION directive to specify this, is there similar for the default "." sections or is this intrinsic to the C/C++ linker?
For example what tells the linker what to put in .ebss?
Hi!
CMD-file is command linker file. ".ebbs" is the command line directly. So... For example:
int a = 10;// command ".ebbs" allocates memory for int a & int b
int b = 8;// command ".cinit" places in memory 10 & 8
void main(void)
{
int y;// command ".stack" allocates memory for int y
y = a+b;// command ".text" places in memory code y = a+b
}
Thus software will be divided into parts, each parts will be placed in its memory section:
[global variables] [the initial values of global variables] [local variables] [executable program code]
Separation of program code and data allows to achieve flexibility in the allocation of memory resources and corresponds to Harvard architecture of these processors.
Regards,
Igor
You may also find this wiki article helpful:
http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/269802.aspx
Thanks Igor, Lori.
Lori, I think you pasted the wrong link, it just links back to this thread again??
Toby Mole said:Lori, I think you pasted the wrong link, it just links back to this thread again??
Woops!
Here it is: http://processors.wiki.ti.com/index.php/C28x_Compiler_-_Understanding_Linking