Rowley project stack size = 0 ?

martinpb wrote on Monday, February 19, 2007:

Hi all,

I am working on a project using the Rowley compiler, and i saw that the
declaration of the stack size in the lwip demo for sam7x in the file flash_placement.xml is set to 0.

My question is, is this the correct setting ?
Does this not pose a problem at start up (creating tasks and starting the scheduler)?

What do other users of the rowley compiler set there stack sizes to ?


martinpb wrote on Monday, February 19, 2007:

Just to clarify. I am referring to the stack sizes, which are setup from
whitin the Rowley IDE.


embeddedc wrote on Monday, February 19, 2007:

I would expect the users/system mode stack to be set to 0 as the stacks used by the tasks are allocated when the task is created.

The IRQ stack should be configured.

The FIQ stack may or may not be configured.

The System mode stack should be configured, but may just be set to the bottom of the other stacks so it can use any space left.

It might be that the stacks are configured in the start up assembler file, and that the settings in the project are ignored.  Can you check the map file and see if this is the case?

nobody wrote on Monday, February 19, 2007:

Just checked the demo and it seems that the svc stack starts at 0x20f7ac and uses 400 bytes before it hits the irq stack at 0x20f16c.  I dont know where it gets the 400 from.

nobody wrote on Monday, February 19, 2007:

In the project there is flash_placement.xml.  Open this, double click on External SRAM, then look at the section properties.  This is where the 400 (0x190) size is setup.  I don’t know how this relates to the settings for stack sizes in the project.  Can somebody from Rowley comment?

martinpb wrote on Tuesday, February 20, 2007:

The values in flash_placement.xml corresponds to the value set from within Rowley.
But is it necessary to setup stacks there, to make sure the application runs with
a correctly setup stack ?

rtel wrote on Tuesday, February 20, 2007:

I just looked at one of the sample applications that comes with CrossWorks and it does not used the xml file directly, it just uses the IDE settings.  To be honest I’m not sure why I set up the stacks this way.  It might be a legacy thing from CrossWorks V1.5, or it might be that this was the first project I did in CrossWorks and did not make full use of the IDE as it is intended to be used.