Uint32 meminvaddr32( Uint32 start, Uint32 len );
Uint32 meminvaddr32( 0x80000000, 0x400 )
{
register Uint32 *pdata, *end;
/* Write Pattern */
pdata = (Uint32 *)start;
end = (Uint32 *)(start + len);
while(pdata < end)
*pdata++ = ~(Uint32)pdata; //为什么程序总是在这里死机????????????求解答
/* Read Pattern */
pdata = (Uint32 *)start;
while(pdata < end)
{
if (*pdata != ~(Uint32)pdata)
{
printf("Error at %08x\n", (Uint32)pdata);
return (Uint32)pdata;
}
pdata++;
}
return 0;
}
Sheng Liu1:
建议单步调试下,看下每一步变量的值如何发生变化,就知道到底是什么问题了。