直接贴代码,程序就死在下面我注释的那句了,求解
[mw_shl_code=applescript,true]
m_p = mymalloc(SRAMEX,2048); //申请2KB外部RAM
printf("sizeof(m_p)=%d
",sizeof(m_p));
for(i=0;i<2048;i++)
{
*(m_p+i) = i%256; //赋初值
printf("%d",*(m_p+i));
if(i%256==0)
printf("
");
}
m_res=f_open(&m_file,"0:/testt.txt", FA_CREATE_ALWAYS|FA_WRITE); //create a new file
if(m_res==FR_OK)
{
printf("create OK!!!
");
m_res=f_write(&m_file,m_p,2048,&m_bw); //程序尼玛死这儿了
if(m_res==FR_OK)
printf("write OK
");
else
printf("write error
");
myfree(SRAMEX,m_p); //释放内存
f_close(&m_file); //关闭
}[/mw_shl_code]
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>