2008-07-23 16:23:24 Data access misaligned address violation
pengcheng liu (UNITED STATES)
Message: 59291
hi ,guys
I keeping geting this error when I run my program on bf537
Data access misaligned address violation
- Attempted misaligned data memory or data cache access.
the program where it crushed:
while(n<40){
getImage(buffer,width,height);----function get a char buffer
grad(gra,buffer,width,height);---calculate gra based on buffer
sumvalue_small(gra,width,height,&number);----calculate number;
printf("number is %d\n",n); ---printf out loop number;
-----crushed here when n=39;
sprintf(str, "%f", number);
fprintf(pFile,"%d %s\n",n+1,str);
n++;
}
fclose(pFile);
Does anyone know what might happened?
Thanks
Pengcheng
QuoteReplyEditDelete
2008-07-23 17:27:13 Re: Data access misaligned address violation
Robin Getz (UNITED STATES)
Message: 59293
Pengcheng:
You should be able to track down exactly what line of source is causing the problem.
https://docs.blackfin.uclinux.org/doku.php?id=debuging_applications#unaligned_data_access
-Robin