FX3 application for both Linux and Windows

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello.

   

I was successful in developing my own PC application communicating with the FX3 in Linux, thanks to the cyusb library, which I could use while linking.

   

However I would like to make an application that can also be compiled with mingw and communicate with the Fx3 from Windows  without major changes. Unfortunately the application software demonstration that Cypress gives for Windows is not related to the Linux ones in any way, the library is called CyAPI instead of cyusb, and it is based on Visual Studio instead of mingw, whose I'm more familiar with.

   

Is it thus even possible to use the cyusb library on Windows just as it is used in Linux ? Or if this is not possible, the other way arround, use CyAPI in Linux ? What is the most confusing to me is the library mismach between both platforms.

   

Thanks in advance and best regards.

0 Likes
3 Replies
Anonymous
Not applicable

In my case I use libusb for Linux/Windows/Mac to communicate with device.

0 Likes
Anonymous
Not applicable

OK, so I guess I can do the following and that should work :

   

1) I get the windows version of libusb

   

2) I rebuild the cyusb library, but on windows

   

3) I can use it like we can with the Linux version of the Cypress SDK.

   

Hopefully that will work.

0 Likes
Anonymous
Not applicable

Unfortunately this does not work because libcyusb relies on POSIX, which has major inssues with mingw / windows. My test application crashes after running, even if no libusb call is made.

   

 

   

Also I found 2 issues that could be fixed in a future update :

   

1) libcyusb is written in C++ because the method cyusb_open is overloaded in two different versions, but the files are named "libcyusb.c" and "cyusb.h" instead of ".cpp" and ".hpp" like they should be.

   

2) The line "#include <errno.h>" in "libcyusb.c", as well as the "#include <linux/types.h>" in "cyusb.h", are apparently unneeded.

 

0 Likes