DSPRelated.com
Forums

stack problem

Started by waji...@hotmail.com February 25, 2007
Hi I am new to dsp programming.the following error occurs when I run the program in ccs v2.

warning: creating .stack section with default size of 400 (hex) words.
Use -stack option to change the default size.

What is this error??????
Any response in this regard would be helpful.
Thanks wajahat.
Wajih,

That is not an error.

It is a warning.

All it is doing is telling you that since you did not specify a stack size, it
is going to default to a stack size of 1K (400H).

If you have the build options in the code composer project set to "treat
warnings as errors" then it will be a problem.
A simple fix is to modify the build options to NOT treat warnings as errors.

-or-

add a -stack@0h to your linker command file

-or-

in the build options for the link step, set a stack size of 400h

R. Williams

---------- Original Message -----------
From: w...@hotmail.com
To: c...
Sent: Sat, 24 Feb 2007 02:33:17 -0500
Subject: [c6x] stack problem

> Hi I am new to dsp programming.the following error occurs when I run
> the program in ccs v2.
>
> warning: creating .stack section with default size of 400 (hex)
> words. Use -stack option to change the default size.
>
> What is this error??????
> Any response in this regard would be helpful.
> Thanks wajahat.
------- End of Original Message -------
Wajahat,

Try going to build options and in the link tab (if I recall correctly)
there is two empty fields, stack and heap. Enter something larger than 0x400
in the blank stack field (e.g 0x1000 or 0x2000) and revuild your project to
see what happens. If this desnt work let me know
:)
----- Original Message -----
From: w...@hotmail.com
To: c...
Sent: Saturday, February 24, 2007 9:33 AM
Subject: [c6x] stack problem

Hi I am new to dsp programming.the following error occurs when I run the program in ccs v2.

warning: creating .stack section with default size of 400 (hex) words.
Use -stack option to change the default size.

What is this error??????
Any response in this regard would be helpful.
Thanks wajahat.
Wajahat-

> Hi I am new to dsp programming.the following error occurs when I run the program in ccs v2.
>
> warning: creating .stack section with default size of 400 (hex) words.
> Use -stack option to change the default size.
>
> What is this error??????

It just means that you didn't fill in stack size field in Build Options dialog. It's not an error. After your
program runs successfully and is fully reliable, you can measure the amount of stack space used, and if it's
significantly less than 0x400 (4096 bytes), then you can reduce it.

-Jeff
It's not an error, it's a warning. The environment is creating a
default stack size for you which may or may not be a reasonable size
depending on how you are using the stack in your program. It's telling
you at least one way you can override the stack size setting. I have
the stack set in my current program rather large. 0x400 = 1024. I am
using a stack defined as 0xA000 which works out to 40k, but my
programming style is to use lots of temporary variables as automatic
stack variables instead of using dynamicly allocated heap variables or
static allocated global variables. (I use some global variables as
well, but I'm not using any heap variables in my DSP programming)

Working on a constrained system like a DSP based system means that you
need to be much more careful with memory use than on a machine with
plenty of extra ram. I've not found an easy stack check routine in the
DSP, and so my method has been to over allocate stack space, and then
I've written some tools to test how much of the stack has been used by
initializing the ram to a known pattern, then running the routines, and
then checking to see how much of the stack was left untouched. Then I
can reduce the allocation of stack to a number that more closely matches
my usage.

Since the memory architecture (is it a Harvard architecture?) of the
67xx family of dsps has mixed code and data in the same memory, with no
protection, stack overflows are especially easy and dangerous.

Wim.

w...@hotmail.com wrote:
> Hi I am new to dsp programming.the following error occurs when I run the program in ccs v2.
>
> warning: creating .stack section with default size of 400 (hex) words.
> Use -stack option to change the default size.
>
> What is this error??????
> Any response in this regard would be helpful.
> Thanks wajahat.
>
>
Wajahat--

On 2/24/07, w...@hotmail.com wrote:
>
> Hi I am new to dsp programming.the following error occurs when I run the program in ccs v2.
>
> warning: creating .stack section with default size of 400 (hex) words.
> Use -stack option to change the default size.
>
> What is this error??????
> Any response in this regard would be helpful.
> Thanks wajahat.

As many have already have already pointed out that this message is not
a error message. But is is good that you are *alarmed* by messages;
that means you are paying attention! My advice is as you go along
continue to treat warning messages with the same degree of respect as
error messages, ie eliminate them before moving on. If a warning
message wouldnt go away, then there is possibly a case for TI to
relook at the message.

Good luck! Let those warning messages flow unto you!
--Bhooshan

--
-------------------------------
"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
--------------------------------
William--

On 2/25/07, William C Bonner wrote:
...
...
> Since the memory architecture (is it a Harvard architecture?) of the
> 67xx family of dsps has mixed code and data in the same memory,

C67/C64x processors are Von neumann(unified memory) at L2 and Harvard
at L1(seperate).

--Bhooshan