You are here

FX3 application for both Linux and Windows | Cypress Semiconductor

FX3 application for both Linux and Windows

Summary: 3 Replies, Latest post by Bregalad on 06 Jan 2015 10:52 AM PST
Verified Answers: 1
Last post
Log in to post new comments.
Bregalad's picture
8 posts


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.

user_401386419's picture
23 posts

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

Stub for 455832585's picture
1 post

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.

Bregalad's picture
8 posts

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.


Log in to post new comments.