code warrior hc08 C语言的两个小问题请教[讨论]
- UID
- 105422
- 性别
- 男
|
code warrior hc08 C语言的两个小问题请教[讨论]
看例程在PRM文件中经常有STACKSIZE 0x30,这个堆栈尺寸是怎样计算出来的,一定要用户指定嘛?
#pragma DATA_SEG BUFFER
unsigned char near VarA;
near在这里是什么意思? |
liu1234就是我,欢迎访问我的博客http://www.mcublog.com/blog.asp?name=liu1234 |
|
|
|
|
|
- UID
- 105422
- 性别
- 男
|
liu1234就是我,欢迎访问我的博客http://www.mcublog.com/blog.asp?name=liu1234 |
|
|
|
|
|
harbin 该用户已被删除
|
堆栈是临时变量、中断、函数调用时用的,根据你的程序自己确定,太少的话会引起程序跑飞。太多的话浪费。 |
|
|
|
|
|
- UID
- 104380
- 性别
- 男
|
可以到这里下载资料,有用户手册,教程和技术笔记(Technical Notes):
http://www.metrowerks.com/MW/Support/dev_resources/Documentation_for_HC08_3.0.htm |
|
|
|
|
|
- UID
- 105422
- 性别
- 男
|
我指导了
L1201: No stack defined
[DISABLE, INFORMATION, WARNING, ERROR]
Description
The PRM file does not contains any stack definition. In that case it is the programmer responsibility to initialize the stack pointer inside of his application code. The stack can be defined in the PRM file in one of the following way: Trough the STACKTOP command in the PRM file. Trough the STACKSIZE command in the PRM file. Trough the specification of the section .stack in the PLACEMENT block.
Example
^
WARNING: No stack defined
LINK fibo.abs
NAMES fibo.o startup.o END
SEGMENTS
MY_RAM = READ_WRITE 0x800 TO 0x80F;
MY_ROM = READ_ONLY 0x810 TO 0xAFF;
END
PLACEMENT
.text INTO MY_ROM;
.data INTO MY_RAM;
END
/* Set reset vector on _Startup */
VECTOR ADDRESS 0xFFFE _Startup
Tips
Define the stack in one of the three way specified above. Note: If the customer initializes the stack pointer inside of his source code, the initialization from the linker will be overwritten. |
liu1234就是我,欢迎访问我的博客http://www.mcublog.com/blog.asp?name=liu1234 |
|
|
|
|
|