|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
When I define more and more data and idata variables in my application, the available stack space decreases. By default, only one byte is reserved for the stack which is not enough for my application. I want to make sure that the remaining stack space is at least 20 bytes. If I define too many data and idata variables, the linker should report an error message.
This is possible. The stack size is defined in the STARTUP code. You may copy the STARTUP.A51 file from the KeilC51LIB folder to your project folder and add this file to your uVision project. Then, the stack size can be modified in this file.
?C_C51STARTUP SEGMENT CODE ?STACK SEGMENT IDATA RSEG ?STACK DS 1
The line DS 1 specifies the stack size. You may change this value according to your needs.
Article last edited on: 2004-05-01 15:11:32
Did you find this article helpful? Yes No
How can we improve this article?