- UID
- 122318
- 性别
- 男
|
各位大虾,近来刚刚开始接触codewarrior,我编了一段小程序试试这个东东的用法。程序如下:#include /* for EnableInterrupts macro */
#include /* include peripheral declarations */
uchar test_data[17];//@ 0X0040;
void main(void) {
uchar a;
uchar data[17];
EnableInterrupts; /* enable interrupts */
/* include your code here */
for(;;) {
__RESET_WATCHDOG(); /* feeds the dog */
// a = *buffer;
for(a = 0;a < 17; a++)
{
test_data[a] = a;
}
for(a = 0;a < 17; a++)
{
data[a] = test_data[a];
}
for(a = 0;a < 17; a++)
{
test_data[a] = 0;
}
} /* loop forever */
/* please make sure that you never leave this function */
}
老是编译不成功,提示说: Link Error : L1102: Out of allocation space in segment RAM at address 0x111
Link Error : Link failed
JB8不是有256的RAM吗,我什么我定义了几十个字节它就提示我空间溢出了。我用@ 0X0040强制定位后,编译能过,但是用它的软件仿真时无法对指定的RAM空间进行有效的赋值。不知为何,请各位指导??
谢谢 |
|