Issues downloading bit file.Getting okFILE_ERROR

Hi,

Problem: When I call the “ConfigureFPGA()”, it returns me the error code 5, which means okFILE_ERROR.
Code:

int value = 0;
// Download the configuration file.
if (okNO_ERROR != (value = xem->ConfigureFPGA(“destop-xem3010-1000.bit”)))
{
printf(“FPGA configuration failed with value:%d\n”,value);
delete dev;
}

I tried with other .bit files: destop-xem3010-1500.bit & counters-xem3010-1000.bit &
counters-xem3010-1500 and the ConfigureFPGA still returns 5 as error code.

Would you know the reason why OK is finding errors in those files?

I thank you for your help.

Regards,

Fabini

Does the file exist in the executable’s working directory? Can it be opened for read access?

FileError generally just means that there was a problem opening and reading the file.

Yes I followed your advise and it works now. Thanks much.

Regards,

Fabini

What was the problem?

Hi,

The problem was that I was pressing F5 from the the VS2005 IDE. I should have opened a command prompt and gone to path where the .exe & the .bit files were located.

Regards,

Fabini

Yes, VisualStudio generally puts the CWD as the project directory – not the build directory. Of course, this is configurable.