Ruturaj-
> I tried your suggestion and declared volatile
int x[500], map file
> now shows increase
> in .ebss size as expected.
> You are right that I am using work around for timebeing. It seems
> there is some
> different issue. Your sugestions on debugging the issue are welcome.
If you do this:
volatile int x[500];
volatile int a;
Is there an increase in ebss size due to a? If so then you might try reducing
the size of x until the additional int
no longer makes a difference. It could be the case that there is some "minimum
size" involved for ebss (although I
don't have a guess as to why that would be the case).
-Jeff
> ----- Original Message -----
> From: "Jeff Brower"
> To: "Ruturaj"
> Cc:
> Sent: Saturday, January 30, 2010 11:52 PM
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>> 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.
_____________________________________
Adding global variables not changing size of .ebss
Started by ●January 28, 2010
Reply by ●February 1, 20102010-02-01
Reply by ●February 1, 20102010-02-01
Ruturaj-
> I tried your suggestion and declared volatile int x[500], map file
> now shows increase
> in .ebss size as expected.
> You are right that I am using work around for timebeing. It seems
> there is some
> different issue. Your sugestions on debugging the issue are welcome.
If you do this:
volatile int x[500];
volatile int a;
Is there an increase in ebss size due to a? If so then you might try reducing the size of x until the additional int
no longer makes a difference. It could be the case that there is some "minimum size" involved for ebss (although I
don't have a guess as to why that would be the case).
-Jeff
> ----- Original Message -----
> From: "Jeff Brower"
> To: "Ruturaj"
> Cc:
> Sent: Saturday, January 30, 2010 11:52 PM
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>> 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.
_____________________________________
> I tried your suggestion and declared volatile int x[500], map file
> now shows increase
> in .ebss size as expected.
> You are right that I am using work around for timebeing. It seems
> there is some
> different issue. Your sugestions on debugging the issue are welcome.
If you do this:
volatile int x[500];
volatile int a;
Is there an increase in ebss size due to a? If so then you might try reducing the size of x until the additional int
no longer makes a difference. It could be the case that there is some "minimum size" involved for ebss (although I
don't have a guess as to why that would be the case).
-Jeff
> ----- Original Message -----
> From: "Jeff Brower"
> To: "Ruturaj"
> Cc:
> Sent: Saturday, January 30, 2010 11:52 PM
> Subject: Re: [c6x] Adding global variables not changing size of .ebss
>> 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.
_____________________________________
Reply by ●February 1, 20102010-02-01
Jeff,
I tried your suggestion and declared volatile int x[500], map file
now shows increase
in .ebss size as expected.
You are right that I am using work around for timebeing. It seems
there is some
different issue. Your sugestions on debugging the issue are welcome.
-Ruturaj.
----- Original Message -----
From: "Jeff Brower"
To: "Ruturaj"
Cc:
Sent: Saturday, January 30, 2010 11:52 PM
Subject: Re: [c6x] Adding global variables not changing size of .ebss
> 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.
_____________________________________
I tried your suggestion and declared volatile int x[500], map file
now shows increase
in .ebss size as expected.
You are right that I am using work around for timebeing. It seems
there is some
different issue. Your sugestions on debugging the issue are welcome.
-Ruturaj.
----- Original Message -----
From: "Jeff Brower"
To: "Ruturaj"
Cc:
Sent: Saturday, January 30, 2010 11:52 PM
Subject: Re: [c6x] Adding global variables not changing size of .ebss
> 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.
_____________________________________






