microblaze: initiate the systemace device

Hi,

I have a simple program which reads a file from the systemace CF device on vertex II board.

#include "xparameters.h" #include "xutil.h" #include "sysace_stdio.h"

char *Filename = "winter.jpg"; int main (void) { FILE *fp; printf("starting....\r\n"); if ((fp = fopen(Filename, "r")) == NULL) { printf("\r\nCan't open file: %s \r\n", Filename); return 0; } }

Everything goes fine except the program freezes at the "fopen...." line. I use XMD software debugger to trace into the code, and found actually it runs into indefinitely loop at the following line in the driver "sysace.c":

while ((Result = XSysAce_Lock(&Ace, XFALSE)) != XST_SUCCESS);

That means the systemace device is always busy and can't be locked for exclusively reading. That's why it keeps running the "while" loop there.

Anybody could help me to figure out the reason why the device is always busy? Or am I missing some pre-configurations or parameters to the device?

Thanks in advance.

-Yongjie

Reply to
Yongjie Liu
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.