Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
Post a new Thread
a basic doubt in boot-loading - bvg_...@yahoo.com - Jul 13 10:08:00 2005
hi all,
i've a basic doubt related to global data initialization.
why two sections viz BSS & CINIT are needed to store global variables and
their initialization values respectively?
BSS is said to be uninitialized where as CINIT is initialized.
As BSS is uninitialized, we are giving any space for it in flash. then how the
variable details are mapped correctly during booting? and where this mapping
details are loaded/
it would be of great help if anyone can clear my doubt.
regards,
venu
______________________________
New Code Sharing Section now Live on DSPRelated.com.
Learn about the Reward
Program for Contributors here. 
(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )
Re: a basic doubt in boot-loading - Bhooshan Iyer - Jul 13 14:31:00 2005
I dont know if it is the way you put it or is it that you have
understood it wrongly.Either which ways, here is a simplified answer
which may give you a clue:
.bss: Section where global and static variables are stored
.cinit: Section where initialization values for global and static
variables are stored
...
int x=5;
main()
...
x-> goes to .bss section (created by compiler)
5-> goes to .cinit section (created by compiler)
The reason why the manual says that the cinit section has to go into
the flash memory is because on reset in a bootable/standalone system
you require the global and static variables to be initialized on code
entry.
--Bhooshan
On 7/13/05, bvg_1@bvg_... <bvg_1@bvg_...> wrote:
> hi all,
> i've a basic doubt related to global data initialization.
> why two sections viz BSS & CINIT are needed to store global variables
and their initialization values respectively?
> BSS is said to be uninitialized where as CINIT is initialized.
> As BSS is uninitialized, we are giving any space for it in flash. then how
the variable details are mapped correctly during booting? and where this mapping
details are loaded/
> it would be of great help if anyone can clear my doubt.
> regards,
> venu
--
-------------------------------------------------------------------
"I've missed more than 9000 shots in my career.
I've lost almost 300 games. 26 times I've been trusted to take the
game winning shot and missed.
I've failed over and over again in my life.
And that is why I succeed."
-- Michael Jordan
--------------------------------------------------------------------
______________________________
Start your
Android Ice Cream Sandwich development on TI's
AM35x Sitara ARM Cortex-A8 processor today.
(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )