DSPRelated.com
Forums

Adding global variables not changing size of .ebss

Started by rutu...@dbups.co.in January 28, 2010
Hi,
I am testing my code on C2810 DSP. Right now I am noticing strange behavior, when I add global variables to the file map file does show
its location in global symbol list but size of the .ebss section is
unchanged. Adding or removing the variables is not affecting the
.ebss section size. I am not using any optimization level.
What could be the possible reason? There is enough space
allocated for .ebss section [size-> 8192].

Thanks and Regards,
Ruturaj Devkar.

_____________________________________
Richard,
Below are the details:
1. I am using large memory model.
2. I am using L0 and L1 combined for .ebss section
RAML0L1 : origin = 0x008000, length = 0x002000
-------------
.ebss : > RAML0L1 PAGE = 1

3.I am not using #pragma DATA_SECTION() to force variables to .ebss.
I tried it after your suggestion but still .ebss does not show increase in size.
4. The added variable are array of unsigned int of 8 elements.

As a work around I have created a section called Mydata and array is placed in Mydata
by using #pragma DATA_SECTION().
But I am still using the L0L1 RAM for Mydata section
Mydata : > RAML0L1 PAGE = 1
----- Original Message -----
From: Richard Williams
To: r...@dbups.co.in ; c...
Sent: Thursday, January 28, 2010 2:42 PM
Subject: Re: [c6x] Adding global variables not changing size of .ebss
ruturaj,

I do not have the details of the linker placement details infront of me at the moment. You could check each of the following:

Do any of the other sections .data, .bss, etc change size with the addition of global variables?

Are you saying the allocated area does not change size or are you saying the amount of area actually loaded does not change size?

Since the various sections are rounded up to the next (usually word) size, perhaps the global variables you are adding are not large enough to force the loaded size over the next alignment boundary.

Those added global variables could be getting placed in (previously) unassigned areas within the .ebss section.

What is the relationship between the address of the global variables you added, compared with the loaded .ebss section? I.E. at the beginning, the end, or somewhere in the middle.

Also, if those variables are never referenced, then they may be non-existent in the loaded .ebss section (although I think that actually takes a certain optimization parameter)

I think the .ebss section means in the extended memory (addresses >64k)
what about the .bss section in the first 64k of memory? I.E. M0, M1, L0, L1, H0 ram.

Are you using the 'large memory model' or something else? This can make a significant difference in the actual placement of the global variables.

Also, if those added global variables are given an initial value, then they may be in the .init section rather than the .ebss section

Are you using any #pragma DataSection(...); to force the global variables to be in the .ebss section?

R. Williams

---------- Original Message -----------
From: r...@dbups.co.in
To: c...
Sent: Wed, 27 Jan 2010 23:30:35 -0500
Subject: [c6x] Adding global variables not changing size of .ebss

>
>
> Hi,
> I am testing my code on C2810 DSP. Right now I am noticing strange behavior, when I add global variables to the file map file does show
> its location in global symbol list but size of the .ebss section is
> unchanged. Adding or removing the variables is not affecting the
> .ebss section size. I am not using any optimization level.
> What could be the possible reason? There is enough space
> allocated for .ebss section [size-> 8192].
>
> Thanks and Regards,
> Ruturaj Devkar.

_____________________________________
ruturaj,

I do not have the details of the linker placement details infront of me at the moment. You could check each of the following:

Do any of the other sections .data, .bss, etc change size with the addition of global variables?

Are you saying the allocated area does not change size or are you saying the amount of area actually loaded does not change size?

Since the various sections are rounded up to the next (usually word) size, perhaps the global variables you are adding are not large enough to force the loaded size over the next alignment boundary.

Those added global variables could be getting placed in (previously) unassigned areas within the .ebss section.

What is the relationship between the address of the global variables you added, compared with the loaded .ebss section? I.E. at the beginning, the end, or somewhere in the middle.

Also, if those variables are never referenced, then they may be non-existent in the loaded .ebss section (although I think that actually takes a certain optimization parameter)

I think the .ebss section means in the extended memory (addresses >64k)
what about the .bss section in the first 64k of memory? I.E. M0, M1, L0, L1, H0 ram.

Are you using the 'large memory model' or something else? This can make a significant difference in the actual placement of the global variables.

Also, if those added global variables are given an initial value, then they may be in the .init section rather than the .ebss section

Are you using any #pragma DataSection(...); to force the global variables to be in the .ebss section?

R. Williams

---------- Original Message -----------
From: r...@dbups.co.in
To: c...
Sent: Wed, 27 Jan 2010 23:30:35 -0500
Subject: [c6x] Adding global variables not changing size of .ebss

>
>
> Hi,
> I am testing my code on C2810 DSP. Right now I am noticing strange behavior, when I add global variables to the file map file does show
> its location in global symbol list but size of the .ebss section is
> unchanged. Adding or removing the variables is not affecting the
> .ebss section size. I am not using any optimization level.
> What could be the possible reason? There is enough space
> allocated for .ebss section [size-> 8192].
>
> Thanks and Regards,
> Ruturaj Devkar.
Ruturaj,

Since the size of the global variables is 32 bytes(16 addresses) and the size of the receiving area is 8k addresses, you cannot expect the allocation in the .cmd file to increase.

Does the size of the .ebss change with the addition of the global variables?

when using the #pragma, what is the size of the 'MyData' section?

R. Williams

---------- Original Message -----------
From: "Ruturaj"
To: "Richard Williams" ,
Sent: Thu, 28 Jan 2010 15:48:14 +0530
Subject: Re: [c6x] Adding global variables not changing size of .ebss

>
>
> Richard,
> Below are the details:
> 1. I am using large memory model.
> 2. I am using L0 and L1 combined for .ebss section
> RAML0L1 : origin = 0x008000, length = 0x002000
> ----------------------
> .ebss : > RAML0L1 PAGE = 1
>
> 3.I am not using #pragma DATA_SECTION() to force variables to .ebss.
> I tried it after your suggestion but still .ebss does not show increase in size.
> 4. The added variable are array of unsigned int of 8 elements.
>
> As a work around I have created a section called Mydata and array is placed in Mydata
> by using #pragma DATA_SECTION().
> But I am still using the L0L1 RAM for Mydata section
> Mydata : > RAML0L1 PAGE = 1
>
> ----- Original Message -----
> From: Richard Williams
> To: r...@dbups.co.in ; c...
> Sent: Thursday, January 28, 2010 2:42 PM
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>
> ruturaj,
>
> I do not have the details of the linker placement details infront of me at the moment. You could check each of the following:
>
> Do any of the other sections .data, .bss, etc change size with the addition of global variables?
>
> Are you saying the allocated area does not change size or are you saying the amount of area actually loaded does not change size?
>
> Since the various sections are rounded up to the next (usually word) size, perhaps the global variables you are adding are not large enough to force the loaded size over the next alignment boundary.
>
> Those added global variables could be getting placed in (previously) unassigned areas within the .ebss section.
>
> What is the relationship between the address of the global variables you added, compared with the loaded .ebss section? I.E. at the beginning, the end, or somewhere in the middle.
>
> Also, if those variables are never referenced, then they may be non-existent in the loaded .ebss section (although I think that actually takes a certain optimization parameter)
>
> I think the .ebss section means in the extended memory (addresses >64k)
> what about the .bss section in the first 64k of memory? I.E. M0, M1, L0, L1, H0 ram.
>
> Are you using the 'large memory model' or something else? This can make a significant difference in the actual placement of the global variables.
>
> Also, if those added global variables are given an initial value, then they may be in the .init section rather than the .ebss section
>
> Are you using any #pragma DataSection(...); to force the global variables to be in the .ebss section?
>
> R. Williams
>
> ---------- Original Message -----------
> From: r...@dbups.co.in
> To: c...
> Sent: Wed, 27 Jan 2010 23:30:35 -0500
> Subject: [c6x] Adding global variables not changing size of .ebss
>
> >
> >
> > Hi,
> > I am testing my code on C2810 DSP. Right now I am noticing strange behavior, when I add global variables to the file map file does show
> > its location in global symbol list but size of the .ebss section is
> > unchanged. Adding or removing the variables is not affecting the
> > .ebss section size. I am not using any optimization level.
> > What could be the possible reason? There is enough space
> > allocated for .ebss section [size-> 8192].
> >
> > Thanks and Regards,
> > Ruturaj Devkar.
>
Richard,
I think the problem is not illustrated by me wel. I am having working project
and when I look at the map file generated by CCS 3.1 for this project; the section
allocation map shows section, page, origin and length. This length is 0x12bc.
When ever I add new variables obviously this length should increase but this
is not changing.
I have not cross checked whether size 0x12bc is correct according to number of
global variables defined.

In linker file Mydata section is assigned same memory space of 8k which
is also allocated for .ebss section.

-Ruturaj.
----- Original Message -----
From: Richard Williams
To: Ruturaj ; c...
Sent: Thursday, January 28, 2010 9:40 PM
Subject: Re: [c6x] Adding global variables not changing size of .ebss
Ruturaj,

Since the size of the global variables is 32 bytes(16 addresses) and the size of the receiving area is 8k addresses, you cannot expect the allocation in the .cmd file to increase.

Does the size of the .ebss change with the addition of the global variables?

when using the #pragma, what is the size of the 'MyData' section?

R. Williams

---------- Original Message -----------
From: "Ruturaj"
To: "Richard Williams" ,
Sent: Thu, 28 Jan 2010 15:48:14 +0530
Subject: Re: [c6x] Adding global variables not changing size of .ebss

>
>
> Richard,
> Below are the details:
> 1. I am using large memory model.
> 2. I am using L0 and L1 combined for .ebss section
> RAML0L1 : origin = 0x008000, length = 0x002000
> ----------------------
> .ebss : > RAML0L1 PAGE = 1
>
> 3.I am not using #pragma DATA_SECTION() to force variables to .ebss.
> I tried it after your suggestion but still .ebss does not show increase in size.
> 4. The added variable are array of unsigned int of 8 elements.
>
> As a work around I have created a section called Mydata and array is placed in Mydata
> by using #pragma DATA_SECTION().
> But I am still using the L0L1 RAM for Mydata section
> Mydata : > RAML0L1 PAGE = 1
>
> ----- Original Message -----
> From: Richard Williams
> To: r...@dbups.co.in ; c...
> Sent: Thursday, January 28, 2010 2:42 PM
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>
> ruturaj,
>
> I do not have the details of the linker placement details infront of me at the moment. You could check each of the following:
>
> Do any of the other sections .data, .bss, etc change size with the addition of global variables?
>
> Are you saying the allocated area does not change size or are you saying the amount of area actually loaded does not change size?
>
> Since the various sections are rounded up to the next (usually word) size, perhaps the global variables you are adding are not large enough to force the loaded size over the next alignment boundary.
>
> Those added global variables could be getting placed in (previously) unassigned areas within the .ebss section.
>
> What is the relationship between the address of the global variables you added, compared with the loaded .ebss section? I.E. at the beginning, the end, or somewhere in the middle.
>
> Also, if those variables are never referenced, then they may be non-existent in the loaded .ebss section (although I think that actually takes a certain optimization parameter)
>
> I think the .ebss section means in the extended memory (addresses >64k)
> what about the .bss section in the first 64k of memory? I.E. M0, M1, L0, L1, H0 ram.
>
> Are you using the 'large memory model' or something else? This can make a significant difference in the actual placement of the global variables.
>
> Also, if those added global variables are given an initial value, then they may be in the .init section rather than the .ebss section
>
> Are you using any #pragma DataSection(...); to force the global variables to be in the .ebss section?
>
> R. Williams
>
> ---------- Original Message -----------
> From: r...@dbups.co.in
> To: c...
> Sent: Wed, 27 Jan 2010 23:30:35 -0500
> Subject: [c6x] Adding global variables not changing size of .ebss
>
> >
> >
> > Hi,
> > I am testing my code on C2810 DSP. Right now I am noticing strange behavior, when I add global variables to the file map file does show
> > its location in global symbol list but size of the .ebss section is
> > unchanged. Adding or removing the variables is not affecting the
> > .ebss section size. I am not using any optimization level.
> > What could be the possible reason? There is enough space
> > allocated for .ebss section [size-> 8192].
> >
> > Thanks and Regards,
> > Ruturaj Devkar.
>
____________________________________________________________________________________________

Disclaimer: This E-Mail (including attached documents) may contain proprietary and / or confidential and/or legally privileged Information and is meant for the intended recipient(s) only. If you have received this e-mail in error and are not the intended recipient/s, kindly notify us at a...@dbups.co.in and then delete this e-mail immediately from your system. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail, its contents or its attachment/s other than by its intended recipient/s is strictly prohibited and may be unlawful. Internet Communications cannot be guaranteed to be secure or error-free as information could be delayed, intercepted, corrupted, lost, or contain viruses. DB Power Electronics (P) Ltd. does not accept any liability for any errors, omissions, viruses or computer problems experienced by any recipient as a result of this e-mail.
DB Power Electronics (P) Ltd.
120/37, Ramtekdi Industrial Area, Hadapsar, Pune 411013. (INDIA)
Ruturaj-

> I think the problem is not illustrated by me wel. I am having working project
> and when I look at the map file generated by CCS 3.1 for this project; the section
> allocation map shows section, page, origin and length. This length is 0x12bc.
> When ever I add new variables obviously this length should increase but this
> is not changing.
> I have not cross checked whether size 0x12bc is correct according to number of
> global variables defined.
>
> In linker file Mydata section is assigned same memory space of 8k which
> is also allocated for .ebss section.

Ruturaj, this doesn't make sense. Suppose you create a global array, immediately after your "new variables":

int x[5000];

What happens in your .map file? Some new mem space has to be allocated -- where? Possibly if your code doesn't
actually use "x" then no new space is created, but in that case, "x" won't show in the .map file. You can avoid that
possibility by declaring:

volatile int x[5000];

-Jeff

> ----- Original Message -----
> From: Richard Williams
> To: Ruturaj ; c...
> Sent: Thursday, January 28, 2010 9:40 PM
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
> Ruturaj,
>
> Since the size of the global variables is 32 bytes(16 addresses) and the size of the receiving area is 8k
> addresses, you cannot expect the allocation in the .cmd file to increase.
>
> Does the size of the .ebss change with the addition of the global variables?
>
> when using the #pragma, what is the size of the 'MyData' section?
>
> R. Williams
>
> ---------- Original Message -----------
> From: "Ruturaj"
> To: "Richard Williams" ,
> Sent: Thu, 28 Jan 2010 15:48:14 +0530
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>
> >
> >
> > Richard,
> > Below are the details:
> > 1. I am using large memory model.
> > 2. I am using L0 and L1 combined for .ebss section
> > RAML0L1 : origin = 0x008000, length = 0x002000
> > ----------------------
> > .ebss : > RAML0L1 PAGE = 1
> >
> > 3.I am not using #pragma DATA_SECTION() to force variables to .ebss.
> > I tried it after your suggestion but still .ebss does not show increase in size.
> > 4. The added variable are array of unsigned int of 8 elements.
> >
> > As a work around I have created a section called Mydata and array is placed in Mydata
> > by using #pragma DATA_SECTION().
> > But I am still using the L0L1 RAM for Mydata section
> > Mydata : > RAML0L1 PAGE = 1
> >
> > ----- Original Message -----
> > From: Richard Williams
> > To: r...@dbups.co.in ; c...
> > Sent: Thursday, January 28, 2010 2:42 PM
> > Subject: Re: [c6x] Adding global variables not changing size of .ebss
> >
> > ruturaj,
> >
> > I do not have the details of the linker placement details infront of me at the moment. You could check each of the
> following:
> >
> > Do any of the other sections .data, .bss, etc change size with the addition of global variables?
> >
> > Are you saying the allocated area does not change size or are you saying the amount of area actually loaded does
> not change size?
> >
> > Since the various sections are rounded up to the next (usually word) size, perhaps the global variables you are
> adding are not large enough to force the loaded size over the next alignment boundary.
> >
> > Those added global variables could be getting placed in (previously) unassigned areas within the .ebss section.
> >
> > What is the relationship between the address of the global variables you added, compared with the loaded .ebss
> section? I.E. at the beginning, the end, or somewhere in the middle.
> >
> > Also, if those variables are never referenced, then they may be non-existent in the loaded .ebss section (although
> I think that actually takes a certain optimization parameter)
> >
> > I think the .ebss section means in the extended memory (addresses >64k)
> > what about the .bss section in the first 64k of memory? I.E. M0, M1, L0, L1, H0 ram.
> >
> > Are you using the 'large memory model' or something else? This can make a significant difference in the actual
> placement of the global variables.
> >
> > Also, if those added global variables are given an initial value, then they may be in the .init section rather
> than the .ebss section
> >
> > Are you using any #pragma DataSection(...); to force the global variables to be in the .ebss section?
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: r...@dbups.co.in
> > To: c...
> > Sent: Wed, 27 Jan 2010 23:30:35 -0500
> > Subject: [c6x] Adding global variables not changing size of .ebss
> >
> > >
> > >
> > > Hi,
> > > I am testing my code on C2810 DSP. Right now I am noticing strange behavior, when I add global variables to the
> file map file does show
> > > its location in global symbol list but size of the .ebss section is
> > > unchanged. Adding or removing the variables is not affecting the
> > > .ebss section size. I am not using any optimization level.
> > > What could be the possible reason? There is enough space
> > > allocated for .ebss section [size-> 8192].
> > >
> > > Thanks and Regards,
> > > Ruturaj Devkar.
> >
> ____________________________________________________________________________________________
>
> Disclaimer: This E-Mail (including attached documents) may contain proprietary and / or confidential and/or legally
> privileged Information and is meant for the intended recipient(s) only. If you have received this e-mail in error and
> are not the intended recipient/s, kindly notify us at a...@dbups.co.in and then delete this e-mail immediately from
> your system. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure,
> modification, distribution and/or publication of this e-mail, its contents or its attachment/s other than by its
> intended recipient/s is strictly prohibited and may be unlawful. Internet Communications cannot be guaranteed to be
> secure or error-free as information could be delayed, intercepted, corrupted, lost, or contain viruses. DB Power
> Electronics (P) Ltd. does not accept any liability for any errors, omissions, viruses or computer problems experienced
> by any recipient as a result of this e-mail.
> DB Power Electronics (P) Ltd.
> 120/37, Ramtekdi Industrial Area, Hadapsar, Pune 411013. (INDIA)

_____________________________________
Ruturaj,

The two memory sections .ebss and Mydata will not overlap.
Since you have the link map, what is the address listed for the global variables for which you have a question?

Is it within the .ebss or Mydata sections?

R. Williams

---------- Original Message -----------
From: "Ruturaj"
To: "Richard Williams" ,
Sent: Fri, 29 Jan 2010 08:50:14 +0530
Subject: Re: [c6x] Adding global variables not changing size of .ebss

>
> Richard,
> I think the problem is not illustrated by me wel. I am having working project
> and when I look at the map file generated by CCS 3.1 for this project; the section
> allocation map shows section, page, origin and length. This length is 0x12bc.
> When ever I add new variables obviously this length should increase but this
> is not changing.
> I have not cross checked whether size 0x12bc is correct according to number of
> global variables defined.
>
> In linker file Mydata section is assigned same memory space of 8k which
> is also allocated for .ebss section.
>
> -Ruturaj.
> ----- Original Message -----
> From: Richard Williams
> To: Ruturaj ; c...
> Sent: Thursday, January 28, 2010 9:40 PM
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>
> Ruturaj,
>
> Since the size of the global variables is 32 bytes(16 addresses) and the size of the receiving area is 8k addresses, you cannot expect the allocation in the .cmd file to increase.
>
> Does the size of the .ebss change with the addition of the global variables?
>
> when using the #pragma, what is the size of the 'MyData' section?
>
> R. Williams
>
> ---------- Original Message -----------
> From: "Ruturaj"
> To: "Richard Williams" ,
> Sent: Thu, 28 Jan 2010 15:48:14 +0530
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>
> >
> >
> > Richard,
> > Below are the details:
> > 1. I am using large memory model.
> > 2. I am using L0 and L1 combined for .ebss section
> > RAML0L1 : origin = 0x008000, length = 0x002000
> > ----------------------
> > .ebss : > RAML0L1 PAGE = 1
> >
> > 3.I am not using #pragma DATA_SECTION() to force variables to .ebss.
> > I tried it after your suggestion but still .ebss does not show increase in size.
> > 4. The added variable are array of unsigned int of 8 elements.
> >
> > As a work around I have created a section called Mydata and array is placed in Mydata
> > by using #pragma DATA_SECTION().
> > But I am still using the L0L1 RAM for Mydata section
> > Mydata : > RAML0L1 PAGE = 1
> >
> > ----- Original Message -----
> > From: Richard Williams
> > To: r...@dbups.co.in ; c...
> > Sent: Thursday, January 28, 2010 2:42 PM
> > Subject: Re: [c6x] Adding global variables not changing size of .ebss
> >
> > ruturaj,
> >
> > I do not have the details of the linker placement details infront of me at the moment. You could check each of the following:
> >
> > Do any of the other sections .data, .bss, etc change size with the addition of global variables?
> >
> > Are you saying the allocated area does not change size or are you saying the amount of area actually loaded does not change size?
> >
> > Since the various sections are rounded up to the next (usually word) size, perhaps the global variables you are adding are not large enough to force the loaded size over the next alignment boundary.
> >
> > Those added global variables could be getting placed in (previously) unassigned areas within the .ebss section.
> >
> > What is the relationship between the address of the global variables you added, compared with the loaded .ebss section? I.E. at the beginning, the end, or somewhere in the middle.
> >
> > Also, if those variables are never referenced, then they may be non-existent in the loaded .ebss section (although I think that actually takes a certain optimization parameter)
> >
> > I think the .ebss section means in the extended memory (addresses >64k)
> > what about the .bss section in the first 64k of memory? I.E. M0, M1, L0, L1, H0 ram.
> >
> > Are you using the 'large memory model' or something else? This can make a significant difference in the actual placement of the global variables.
> >
> > Also, if those added global variables are given an initial value, then they may be in the .init section rather than the .ebss section
> >
> > Are you using any #pragma DataSection(...); to force the global variables to be in the .ebss section?
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: r...@dbups.co.in
> > To: c...
> > Sent: Wed, 27 Jan 2010 23:30:35 -0500
> > Subject: [c6x] Adding global variables not changing size of .ebss
> >
> > >
> > >
> > > Hi,
> > > I am testing my code on C2810 DSP. Right now I am noticing strange behavior, when I add global variables to the file map file does show
> > > its location in global symbol list but size of the .ebss section is
> > > unchanged. Adding or removing the variables is not affecting the
> > > .ebss section size. I am not using any optimization level.
> > > What could be the possible reason? There is enough space
> > > allocated for .ebss section [size-> 8192].
> > >
> > > Thanks and Regards,
> > > Ruturaj Devkar.
> >
Jeff,
What ever variables I am defining I am using them.
When ever I add new variables it must increase the size used by .ebss
section as there is enough
space allocated but this is not happening.
Hope from the posts written to R. Williams things will be clear.

-Ruturaj.

----- Original Message -----
From: "Jeff Brower"
To: "Ruturaj"
Cc:
Sent: Friday, January 29, 2010 12:02 PM
Subject: Re: [c6x] Adding global variables not changing size of .ebss
> Ruturaj-
>
>> I think the problem is not illustrated by me wel. I am having working
>> project
>> and when I look at the map file generated by CCS 3.1 for this project;
>> the section
>> allocation map shows section, page, origin and length. This length is
>> 0x12bc.
>> When ever I add new variables obviously this length should increase but
>> this
>> is not changing.
>> I have not cross checked whether size 0x12bc is correct according to
>> number of
>> global variables defined.
>>
>> In linker file Mydata section is assigned same memory space of 8k which
>> is also allocated for .ebss section.
>
> Ruturaj, this doesn't make sense. Suppose you create a global array,
> immediately after your "new variables":
>
> int x[5000];
>
> What happens in your .map file? Some new mem space has to be allocated --
> where? Possibly if your code doesn't
> actually use "x" then no new space is created, but in that case, "x" won't
> show in the .map file. You can avoid that
> possibility by declaring:
>
> volatile int x[5000];
>
> -Jeff
>
>> ----- Original Message -----
>> From: Richard Williams
>> To: Ruturaj ; c...
>> Sent: Thursday, January 28, 2010 9:40 PM
>> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>> Ruturaj,
>>
>> Since the size of the global variables is 32 bytes(16 addresses) and
>> the size of the receiving area is 8k
>> addresses, you cannot expect the allocation in the .cmd file to increase.
>>
>> Does the size of the .ebss change with the addition of the global
>> variables?
>>
>> when using the #pragma, what is the size of the 'MyData' section?
>>
>> R. Williams
>>
>> ---------- Original Message -----------
>> From: "Ruturaj"
>> To: "Richard Williams" ,
>> Sent: Thu, 28 Jan 2010 15:48:14 +0530
>> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>>
>> >
>> >
>> > Richard,
>> > Below are the details:
>> > 1. I am using large memory model.
>> > 2. I am using L0 and L1 combined for .ebss section
>> > RAML0L1 : origin = 0x008000, length = 0x002000
>> > ----------------------
>> > .ebss : > RAML0L1 PAGE = 1
>> >
>> > 3.I am not using #pragma DATA_SECTION() to force variables to .ebss.
>> > I tried it after your suggestion but still .ebss does not show
>> increase in size.
>> > 4. The added variable are array of unsigned int of 8 elements.
>> >
>> > As a work around I have created a section called Mydata and array is
>> placed in Mydata
>> > by using #pragma DATA_SECTION().
>> > But I am still using the L0L1 RAM for Mydata section
>> > Mydata : > RAML0L1 PAGE = 1
>> >
>> > ----- Original Message -----
>> > From: Richard Williams
>> > To: r...@dbups.co.in ; c...
>> > Sent: Thursday, January 28, 2010 2:42 PM
>> > Subject: Re: [c6x] Adding global variables not changing size of .ebss
>> >
>> > ruturaj,
>> >
>> > I do not have the details of the linker placement details infront of
>> me at the moment. You could check each of the
>> following:
>> >
>> > Do any of the other sections .data, .bss, etc change size with the
>> addition of global variables?
>> >
>> > Are you saying the allocated area does not change size or are you
>> saying the amount of area actually loaded does
>> not change size?
>> >
>> > Since the various sections are rounded up to the next (usually word)
>> size, perhaps the global variables you are
>> adding are not large enough to force the loaded size over the next
>> alignment boundary.
>> >
>> > Those added global variables could be getting placed in (previously)
>> unassigned areas within the .ebss section.
>> >
>> > What is the relationship between the address of the global variables
>> you added, compared with the loaded .ebss
>> section? I.E. at the beginning, the end, or somewhere in the middle.
>> >
>> > Also, if those variables are never referenced, then they may be
>> non-existent in the loaded .ebss section (although
>> I think that actually takes a certain optimization parameter)
>> >
>> > I think the .ebss section means in the extended memory (addresses
>> >64k)
>> > what about the .bss section in the first 64k of memory? I.E. M0, M1,
>> L0, L1, H0 ram.
>> >
>> > Are you using the 'large memory model' or something else? This can
>> make a significant difference in the actual
>> placement of the global variables.
>> >
>> > Also, if those added global variables are given an initial value,
>> then they may be in the .init section rather
>> than the .ebss section
>> >
>> > Are you using any #pragma DataSection(...); to force the global
>> variables to be in the .ebss section?
>> >
>> > R. Williams
>> >
>> > ---------- Original Message -----------
>> > From: r...@dbups.co.in
>> > To: c...
>> > Sent: Wed, 27 Jan 2010 23:30:35 -0500
>> > Subject: [c6x] Adding global variables not changing size of .ebss
>> >
>> > >
>> > >
>> > > Hi,
>> > > I am testing my code on C2810 DSP. Right now I am noticing strange
>> behavior, when I add global variables to the
>> file map file does show
>> > > its location in global symbol list but size of the .ebss section is
>> > > unchanged. Adding or removing the variables is not affecting the
>> > > .ebss section size. I am not using any optimization level.
>> > > What could be the possible reason? There is enough space
>> > > allocated for .ebss section [size-> 8192].
>> > >
>> > > Thanks and Regards,
>> > > Ruturaj Devkar.
>> >
>> ____________________________________________________________________________________________
>>
>> Disclaimer: This E-Mail (including attached documents) may contain
>> proprietary and / or confidential and/or legally
>> privileged Information and is meant for the intended recipient(s) only.
>> If you have received this e-mail in error and
>> are not the intended recipient/s, kindly notify us at a...@dbups.co.in
>> and then delete this e-mail immediately from
>> your system. You are also hereby notified that any use, any form of
>> reproduction, dissemination, copying, disclosure,
>> modification, distribution and/or publication of this e-mail, its
>> contents or its attachment/s other than by its
>> intended recipient/s is strictly prohibited and may be unlawful. Internet
>> Communications cannot be guaranteed to be
>> secure or error-free as information could be delayed, intercepted,
>> corrupted, lost, or contain viruses. DB Power
>> Electronics (P) Ltd. does not accept any liability for any errors,
>> omissions, viruses or computer problems experienced
>> by any recipient as a result of this e-mail.
>> DB Power Electronics (P) Ltd.
>> 120/37, Ramtekdi Industrial Area, Hadapsar, Pune 411013. (INDIA)
>>
>
____________________________________________________________________________________________

Disclaimer: This E-Mail (including attached documents) may contain proprietary and / or confidential and/or legally privileged Information and is meant for the intended recipient(s) only. If you have received this e-mail in error and are not the intended recipient/s, kindly notify us at a...@dbups.co.in and then delete this e-mail immediately from your system. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail, its contents or its attachment/s other than by its intended recipient/s is strictly prohibited and may be unlawful. Internet Communications cannot be guaranteed to be secure or error-free as information could be delayed, intercepted, corrupted, lost, or contain viruses. DB Power Electronics (P) Ltd. does not accept any liability for any errors, omissions, viruses or computer problems experienced by any recipient as a result of this e-mail.
DB Power Electronics (P) Ltd.
120/37, Ramtekdi Industrial Area, Hadapsar, Pune 411013. (INDIA)

_____________________________________
Richard,
Whenever we assign same memory space in link file, linker assigns one of
the section from starting address and after that in the remaining space it assigns next section.
I am assigning .ebss section and Mydata section in to memory address starting from 0x8000 with
size limit of 8k.
I used Mydata section purposely to locate new variable in this section. Mydata section is added as
workaround to the problem that .ebss was not showing any change in size used by it.
When I am adding Mydata section new variables defioned are getting assigned after .ebss
section.
I know that the problem is strange but I couldn't figure out the cause.

-Ruturaj.

----- Original Message -----
From: Richard Williams
To: Ruturaj ; c...
Sent: Friday, January 29, 2010 10:49 AM
Subject: Re: [c6x] Adding global variables not changing size of .ebss

Ruturaj,

The two memory sections .ebss and Mydata will not overlap.
Since you have the link map, what is the address listed for the global variables for which you have a question?

Is it within the .ebss or Mydata sections?

R. Williams

---------- Original Message -----------
From: "Ruturaj"
To: "Richard Williams" ,
Sent: Fri, 29 Jan 2010 08:50:14 +0530
Subject: Re: [c6x] Adding global variables not changing size of .ebss

>
>
>
> Richard,
> I think the problem is not illustrated by me wel. I am having working project
> and when I look at the map file generated by CCS 3.1 for this project; the section
> allocation map shows section, page, origin and length. This length is 0x12bc.
> When ever I add new variables obviously this length should increase but this
> is not changing.
> I have not cross checked whether size 0x12bc is correct according to number of
> global variables defined.
>
> In linker file Mydata section is assigned same memory space of 8k which
> is also allocated for .ebss section.
>
> -Ruturaj.
> ----- Original Message -----
> From: Richard Williams
> To: Ruturaj ; c...
> Sent: Thursday, January 28, 2010 9:40 PM
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>
> Ruturaj,
>
> Since the size of the global variables is 32 bytes(16 addresses) and the size of the receiving area is 8k addresses, you cannot expect the allocation in the .cmd file to increase.
>
> Does the size of the .ebss change with the addition of the global variables?
>
> when using the #pragma, what is the size of the 'MyData' section?
>
> R. Williams
>
>
>
> ---------- Original Message -----------
> From: "Ruturaj"
> To: "Richard Williams" ,
> Sent: Thu, 28 Jan 2010 15:48:14 +0530
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>
> >
> >
> > Richard,
> > Below are the details:
> > 1. I am using large memory model.
> > 2. I am using L0 and L1 combined for .ebss section
> > RAML0L1 : origin = 0x008000, length = 0x002000
> > ----------------------
> > .ebss : > RAML0L1 PAGE = 1
> >
> > 3.I am not using #pragma DATA_SECTION() to force variables to .ebss.
> > I tried it after your suggestion but still .ebss does not show increase in size.
> > 4. The added variable are array of unsigned int of 8 elements.
> >
> > As a work around I have created a section called Mydata and array is placed in Mydata
> > by using #pragma DATA_SECTION().
> > But I am still using the L0L1 RAM for Mydata section
> > Mydata : > RAML0L1 PAGE = 1
> >
> > ----- Original Message -----
> > From: Richard Williams
> > To: r...@dbups.co.in ; c...
> > Sent: Thursday, January 28, 2010 2:42 PM
> > Subject: Re: [c6x] Adding global variables not changing size of .ebss
> >
> > ruturaj,
> >
> > I do not have the details of the linker placement details infront of me at the moment. You could check each of the following:
> >
> > Do any of the other sections .data, .bss, etc change size with the addition of global variables?
> >
> > Are you saying the allocated area does not change size or are you saying the amount of area actually loaded does not change size?
> >
> > Since the various sections are rounded up to the next (usually word) size, perhaps the global variables you are adding are not large enough to force the loaded size over the next alignment boundary.
> >
> > Those added global variables could be getting placed in (previously) unassigned areas within the .ebss section.
> >
> > What is the relationship between the address of the global variables you added, compared with the loaded .ebss section? I.E. at the beginning, the end, or somewhere in the middle.
> >
> > Also, if those variables are never referenced, then they may be non-existent in the loaded .ebss section (although I think that actually takes a certain optimization parameter)
> >
> > I think the .ebss section means in the extended memory (addresses >64k)
> > what about the .bss section in the first 64k of memory? I.E. M0, M1, L0, L1, H0 ram.
> >
> > Are you using the 'large memory model' or something else? This can make a significant difference in the actual placement of the global variables.
> >
> > Also, if those added global variables are given an initial value, then they may be in the .init section rather than the .ebss section
> >
> > Are you using any #pragma DataSection(...); to force the global variables to be in the .ebss section?
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: r...@dbups.co.in
> > To: c...
> > Sent: Wed, 27 Jan 2010 23:30:35 -0500
> > Subject: [c6x] Adding global variables not changing size of .ebss
> >
> > >
> > >
> > > Hi,
> > > I am testing my code on C2810 DSP. Right now I am noticing strange behavior, when I add global variables to the file map file does show
> > > its location in global symbol list but size of the .ebss section is
> > > unchanged. Adding or removing the variables is not affecting the
> > > .ebss section size. I am not using any optimization level.
> > > What could be the possible reason? There is enough space
> > > allocated for .ebss section [size-> 8192].
> > >
> > > Thanks and Regards,
> > > Ruturaj Devkar.
> >
>
>

____________________________________________________________________________________________

Disclaimer: This E-Mail (including attached documents) may contain proprietary and / or confidential and/or legally privileged Information and is meant for the intended recipient(s) only. If you have received this e-mail in error and are not the intended recipient/s, kindly notify us at a...@dbups.co.in and then delete this e-mail immediately from your system. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail, its contents or its attachment/s other than by its intended recipient/s is strictly prohibited and may be unlawful. Internet Communications cannot be guaranteed to be secure or error-free as information could be delayed, intercepted, corrupted, lost, or contain viruses. DB Power Electronics (P) Ltd. does not accept any liability for any errors, omissions, viruses or computer problems experienced by any recipient as a result of this e-mail.
DB Power Electronics (P) Ltd.
120/37, Ramtekdi Industrial Area, Hadapsar, Pune 411013. (INDIA)
Ruturaj-

> What ever variables I am defining I am using them.
> When ever I add new variables it must increase the size used by .ebss
> section as there is enough
> space allocated but this is not happening.
> Hope from the posts written to R. Williams things will be clear.

No it's not clear, and it seems to me you're not actually attempting to debug the issue. You found a work-around
(MyData), which is Ok for the time being -- until the problem comes up again when your code is more complex and the
next time the situation is worse.

Suggest to try my experiment. The purpose is to debug and find the answer.

-Jeff

> ----- Original Message -----
> From: "Jeff Brower"
> To: "Ruturaj"
> Cc:
> Sent: Friday, January 29, 2010 12:02 PM
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>> Ruturaj-
>>
>>> I think the problem is not illustrated by me wel. I am having working
>>> project
>>> and when I look at the map file generated by CCS 3.1 for this project;
>>> the section
>>> allocation map shows section, page, origin and length. This length is
>>> 0x12bc.
>>> When ever I add new variables obviously this length should increase but
>>> this
>>> is not changing.
>>> I have not cross checked whether size 0x12bc is correct according to
>>> number of
>>> global variables defined.
>>>
>>> In linker file Mydata section is assigned same memory space of 8k which
>>> is also allocated for .ebss section.
>>
>> Ruturaj, this doesn't make sense. Suppose you create a global array,
>> immediately after your "new variables":
>>
>> int x[5000];
>>
>> What happens in your .map file? Some new mem space has to be allocated --
>> where? Possibly if your code doesn't
>> actually use "x" then no new space is created, but in that case, "x" won't
>> show in the .map file. You can avoid that
>> possibility by declaring:
>>
>> volatile int x[5000];
>>
>> -Jeff
>>
>>> ----- Original Message -----
>>> From: Richard Williams
>>> To: Ruturaj ; c...
>>> Sent: Thursday, January 28, 2010 9:40 PM
>>> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>>>
>>>
>>> Ruturaj,
>>>
>>> Since the size of the global variables is 32 bytes(16 addresses) and
>>> the size of the receiving area is 8k
>>> addresses, you cannot expect the allocation in the .cmd file to increase.
>>>
>>> Does the size of the .ebss change with the addition of the global
>>> variables?
>>>
>>> when using the #pragma, what is the size of the 'MyData' section?
>>>
>>> R. Williams
>>>
>>>
>>>
>>> ---------- Original Message -----------
>>> From: "Ruturaj"
>>> To: "Richard Williams" ,
>>> Sent: Thu, 28 Jan 2010 15:48:14 +0530
>>> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>>>
>>> >
>>> >
>>> > Richard,
>>> > Below are the details:
>>> > 1. I am using large memory model.
>>> > 2. I am using L0 and L1 combined for .ebss section
>>> > RAML0L1 : origin = 0x008000, length = 0x002000
>>> > ----------------------
>>> > .ebss : > RAML0L1 PAGE = 1
>>> >
>>> > 3.I am not using #pragma DATA_SECTION() to force variables to .ebss.
>>> > I tried it after your suggestion but still .ebss does not show
>>> increase in size.
>>> > 4. The added variable are array of unsigned int of 8 elements.
>>> >
>>> > As a work around I have created a section called Mydata and array is
>>> placed in Mydata
>>> > by using #pragma DATA_SECTION().
>>> > But I am still using the L0L1 RAM for Mydata section
>>> > Mydata : > RAML0L1 PAGE = 1
>>> >
>>> > ----- Original Message -----
>>> > From: Richard Williams
>>> > To: r...@dbups.co.in ; c...
>>> > Sent: Thursday, January 28, 2010 2:42 PM
>>> > Subject: Re: [c6x] Adding global variables not changing size of .ebss
>>> >
>>> > ruturaj,
>>> >
>>> > I do not have the details of the linker placement details infront of
>>> me at the moment. You could check each of the
>>> following:
>>> >
>>> > Do any of the other sections .data, .bss, etc change size with the
>>> addition of global variables?
>>> >
>>> > Are you saying the allocated area does not change size or are you
>>> saying the amount of area actually loaded does
>>> not change size?
>>> >
>>> > Since the various sections are rounded up to the next (usually word)
>>> size, perhaps the global variables you are
>>> adding are not large enough to force the loaded size over the next
>>> alignment boundary.
>>> >
>>> > Those added global variables could be getting placed in (previously)
>>> unassigned areas within the .ebss section.
>>> >
>>> > What is the relationship between the address of the global variables
>>> you added, compared with the loaded .ebss
>>> section? I.E. at the beginning, the end, or somewhere in the middle.
>>> >
>>> > Also, if those variables are never referenced, then they may be
>>> non-existent in the loaded .ebss section (although
>>> I think that actually takes a certain optimization parameter)
>>> >
>>> > I think the .ebss section means in the extended memory (addresses
>>> >64k)
>>> > what about the .bss section in the first 64k of memory? I.E. M0, M1,
>>> L0, L1, H0 ram.
>>> >
>>> > Are you using the 'large memory model' or something else? This can
>>> make a significant difference in the actual
>>> placement of the global variables.
>>> >
>>> > Also, if those added global variables are given an initial value,
>>> then they may be in the .init section rather
>>> than the .ebss section
>>> >
>>> > Are you using any #pragma DataSection(...); to force the global
>>> variables to be in the .ebss section?
>>> >
>>> > R. Williams
>>> >
>>> > ---------- Original Message -----------
>>> > From: r...@dbups.co.in
>>> > To: c...
>>> > Sent: Wed, 27 Jan 2010 23:30:35 -0500
>>> > Subject: [c6x] Adding global variables not changing size of .ebss
>>> >
>>> > >
>>> > >
>>> > > Hi,
>>> > > I am testing my code on C2810 DSP. Right now I am noticing strange
>>> behavior, when I add global variables to the
>>> file map file does show
>>> > > its location in global symbol list but size of the .ebss section is
>>> > > unchanged. Adding or removing the variables is not affecting the
>>> > > .ebss section size. I am not using any optimization level.
>>> > > What could be the possible reason? There is enough space
>>> > > allocated for .ebss section [size-> 8192].
>>> > >
>>> > > Thanks and Regards,
>>> > > Ruturaj Devkar.

_____________________________________