Discussion Forum

Memory model

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Rajeswara Rao Pasupuleti
Posted
13-Jul-2005 10:32 GMT
Toolset
C51
New! Memory model
Hi,
We are working on one project using TDK6511 microcontroller. Microcontroller RAM size is 256 bytes, on chip XRAM is 2K. Expected code size is arround 32k. For our firmware arcitecture, nearly 150 bytes of stack size is required. Please guide me which memory model and ROM model is suitable for our project.

thanks in advance
Rajesh
Read-Only
Author
Reinhard Keil
Posted
13-Jul-2005 13:15 GMT
Toolset
C51
New! RE: Memory model
See: http://www.keil.com/support/man/docs/c51/c51_le_memmodels.htm

Reinhard
Read-Only
Author
erik malund
Posted
13-Jul-2005 13:31 GMT
Toolset
C51
New! RE: Memory model
nearly 150 bytes of stack size is required
That is waaay off anything I have ever seen with Keil C51, how do you get to this enormous number.

You can, of course go for the LARGE model, but I have found that going for LARGE and defining what need to be internal for reasons of speed is way more erroneous than going for samll and defining what can be slow (in XDATA).

Erik
Read-Only
Author
Rajeswara Rao Pasupuleti
Posted
13-Jul-2005 14:52 GMT
Toolset
C51
New! RE: Memory model
Erik,
thanks for ur information. This stack size is expected requirement. If we use SMALL model, 128 bytes of IDATA can be used for stack. But, if my project requires morethan 128 bytes?.
I think u got why I have mensioned that number.

Thanks in advance..
Rajesh
Read-Only
Author
Reinhard Keil
Posted
13-Jul-2005 14:55 GMT
Toolset
C51
New! RE: Memory model
For a way to calculate stack size, see: http://www.keil.com/support/docs/192.htm

Typical stack requirements of complex applications are 50 bytes.

Reinhard
Read-Only
Author
erik malund
Posted
13-Jul-2005 15:45 GMT
Toolset
C51
New! RE: Memory model
I think u got why I have mensioned that number.
I have no idea if micro got it, but I did not. in a typical C51 application a stack size of 150 would imply subrounting about 60 deep and interrupts.

Are you under the misconception that C51 uses the stack to transfer function parametres?

Erik

Next Thread | Thread List | Previous Thread Start a Thread | Settings