Cygwin streamwrite "Failed to open devfile: Is a directory

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: Cygwin streamwrite "Failed to open devfile: Is a directory

Re: Cygwin streamwrite "Failed to open devfile: Is a directo

Post by stdoubleu »

Thanks,
I also think it is rather a Cygwin caused issue because with visual c++ it seems to work flawless.

I will try some things out and report when I figured out the reason.

BTW:
Changing from Cygwin64 to the 32-Version did not help.

Re: Cygwin streamwrite "Failed to open devfile: Is a directo

Post by support »

Hello,

I think it's quite clear that something rather weird is going on, if cat opens the device file but dd refuses to, in particular with that error message. Please go on experimenting in that direction. For example, how about redirecting to the device file. Say, date > \\\\.\\xillybus_whatever ?

I would suggest thinking about this as a quirk not related to Xillybus directly. I believe that random experimentation of anything that comes to mind with these device files is the quickest way to find out.

Regards,
Eli

Re: Cygwin streamwrite "Failed to open devfile: Is a directo

Post by stdoubleu »

Thanks for your reply.

I typed several times and intensively checked for typos before writting here.
However, using the Visual c++ compiler from Visual Studio 2010 seems to result in working binaries. But not a satisfying solution for me.

If the path would be wrong wont it say "no such file or directory" and not "Is a directory".

dd tells me same
cat works as expected

Additional note:
I generate an own custom core with two streams, async and sync, each with own channel for up and down link.

\\.\xillybus_async_stream_fpga2host
\\.\xillybus_async_stream_host2fpga

\\.\xillybus_sync_stream_fpga2host
\\.\xillybus_sync_stream_host2fpga

Could I have done any mistake there? Which would not explain that it works with Visual Studio.

Re: Cygwin streamwrite "Failed to open devfile: Is a directo

Post by support »

Hello,

The choice of Cygwin's gcc compiler is legitimate and is known to work. I'd just point out for the record that Microsoft's command-line compiler, which can be downloaded at no cost, is the common way to go.

The fact that streamread works but streamwrite fails with that specific error is quite peculiar. It sounds like a typo in the command line more than anything else. Maybe a missing backslash? Or an excessive one?

Among the things that are also known to work with Cygwin are the UNIX-like utilities such as cat and dd. Would you check with these?

Regards,
Eli

Cygwin streamwrite "Failed to open devfile: Is a directory

Post by stdoubleu »

Hey,

I successfully implemented the xillybus on my FPGA and tried the precomiled demoapps. Everything works nice.
However, as I don't want to use Visual C++, I choose the combination of cygwin on windows and source code of the demoapps for linux (as recommended in the provided docs).
Compilation succeeds, streamread runs great, but streamwrite fails with "Failed to open devfile: Is a directory".

Any glue?

Thanks in advance

Top