static void rece_frame (U8 *pbuf, U16 length) {
OS_FRAME *frame;
U32 *sp,*dp;
/* Flag 0x80000000 to skip sys_error() call when out of memory. */
frame = alloc_mem ((length + 8) | 0x80000000);
/* if 'alloc_mem()' has failed, ignore this packet. */
if (frame != NULL)
{
printf("frame != NULL\r\n");
frame->length = length;
printf("sp=%x\r\n",*sp);
sp = (U32 *)(pbuf);
dp = (U32 *)&frame->data[0];
for (length = (length + 3) >> 2; length; length--)
{
printf("length=%d\r\n",length);
printf("sp=%x\r\n",*sp);
*dp++ = *sp++;
}
printf("start to put in queue\r\n");
put_in_queue (frame);
}
}
为什么执行到 *dp++ = *sp++;时就挂了呢?
|