楼主下午打我电话的时候我正在外地出差,电话里问得我稀里糊涂的,从来没注意过map文件里还有“command line”,晚上回来也没有看到楼主发的的邮件,原来在这里。
IAR的手册上是这样解释-D_CSTACK_SIZE的
THE STACK The stack is used by functions to store variables and other information that is used locally by functions, as described in the chapter Data storage. It is a continuous block of memory pointed to by the processor stack pointer register SP. The data segment used for holding the stack is called CSTACK. The cstartup module initializes the stack pointer to the end of the stack segment. The default linker file sets up a constant representing the size of the stack, at the beginning of the linker file: -D_CSTACK_SIZE=2000 Note that the size is written hexadecimally without the 0x notation. Further down in the linker file, the actual segment is defined in the memory area available for the stack: -Z(DATA)CSTACK+_CSTACK_SIZE=RAMSTART-RAMEND
Stack size The compiler uses the internal data stack, CSTACK, for a variety of user program operations, and the required stack size depends heavily on the details of these operations. If the given stack size is too small, the stack will normally overwrite the variable storage, which is likely to result in program failure. If the given stack size is too large, RAM will be wasted.
在IAR的安装文件夹doc目录EWARM_CompilerReference.pdf文档,Page51。
|