cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

JoNe_4646056
New Contributor II

I have a Linux (Ubuntu) FX3 app running just fine - using the cyusb library (wrapper for libusb-1.0).

What do you suggest to port this app to Windows, more specifically the cyusb library or equivalent?  I don't see an equivalent library in the FX3 Windows folders?!

I'd obviously like to reuse as much of my app as possible

0 Likes
1 Solution
YatheeshD_36
Moderator
Moderator

Hello John,

I have created the required Static Library (CyUSBLib.lib) for both x86 and x64 OS using libusb-1.0 and cyusb_linux_1.0.5  in Visual Studios.

You can now use the CyUSBLib.lib in Visual Studios application along with your Linux files to generate the executable file in Windows.

The CyUSBLib_Linux package contains all the required files and folders to build your application.

I have also included a Test Application which I had used to test a bulk loop operation on FX2LP. Please refer to the testLib.sln for the example.

Note that, in Windows libusb access the devices which are bound only to the WinUSB Driver.

I have attached an INF file (CyWinUSB.inf) which can be used to bind specific cypress devices (with VID 04B4 and respective PIDs that are listed in the inf file) to the WinUSB driver.

This driver is not digitally signed. Hence the PC must be put into test mode or the driver signing enforcement must be disabled to bind to the respective driver.

zip file password: cypress

Thanks,

Yatheesh

View solution in original post

7 Replies
YatheeshD_36
Moderator
Moderator

Hello,

All the features/APIs available for Linux host application is present in windows as well.

We have libraries for both C++ and C#.

Please download the FX3 SDK for windows for FX3 SDK page.

Once the SDK is installed on you windows PC, you can find the libraries for implementing the application under the library folder in the SDK (path: <installation directory>\Cypress\EZ-USB FX3 SDK\1.3\library).

The API documents for each library is present in the respective folders (cpp or c_sharp).

Please let me know if you need more details regarding the host application development for windows.

Thanks,

Yatheesh

0 Likes
JoNe_4646056
New Contributor II

Thanks for that reference which I had compared to the Linux SDK.

I'm wondering if there are any issues (runtime?, support?) with compiling cyusb/libcyusb.cpp and libusb-1.0 on Windows ? This would of course minimize porting the app.


Thanks

0 Likes
YatheeshD_36
Moderator
Moderator

Hello,

If you just want to generate an .exe file in Linux so that you can use the same application in Windows, you can make use of Mingw cross complier to generate the .exe file in linux.

MinGW for First Time Users HOWTO | MinGW

Thanks,

Yatheesh

0 Likes
JoNe_4646056
New Contributor II

Thanks again. I had opted not to use mingw or cygwin, taking into account Posix, threads, and std library issues.

I'm just trying to determine, before I start any work on Windows, whether I will run into any known issues if I simply port the existing Linux App based on Cyusb/libusb-1.0 ? i.e. I'll (aim to) rebuild and link the Linux cyusb lib on Windows with necessary changes.

At this point, I don't need the Windows CyAPI "driver"; unless there is some technical reason to do so.

Cheers

John

Note: I had simplified my initial request about porting an app. In fact, there is more than one Linux app using a few "modules" that depend on the Linux cyusb lib. Hence, I would like to have the equivalent modules on Windows, so they can be linked into appropriate Windows apps (with some Windows specific code, incl GUI).

0 Likes
YatheeshD_36
Moderator
Moderator

Hello John,

I have created the required Static Library (CyUSBLib.lib) for both x86 and x64 OS using libusb-1.0 and cyusb_linux_1.0.5  in Visual Studios.

You can now use the CyUSBLib.lib in Visual Studios application along with your Linux files to generate the executable file in Windows.

The CyUSBLib_Linux package contains all the required files and folders to build your application.

I have also included a Test Application which I had used to test a bulk loop operation on FX2LP. Please refer to the testLib.sln for the example.

Note that, in Windows libusb access the devices which are bound only to the WinUSB Driver.

I have attached an INF file (CyWinUSB.inf) which can be used to bind specific cypress devices (with VID 04B4 and respective PIDs that are listed in the inf file) to the WinUSB driver.

This driver is not digitally signed. Hence the PC must be put into test mode or the driver signing enforcement must be disabled to bind to the respective driver.

zip file password: cypress

Thanks,

Yatheesh

View solution in original post

JoNe_4646056
New Contributor II

Wow. Thanks for all that. I was not expecting you to build the library etc!

I will build and test with those files, over the next week, and will update results here when I can.

In the interim, I will mark this as answered unless I have further issues.

Does it make sense to add this to your official FX3 SDK in some manner ?

Cheers

John

0 Likes
YatheeshD_36
Moderator
Moderator

Hello John,

We will consider it after testing the library thoroughly.

Please let me know if you face any issues while building you application. Note that the library can be used only for libusb-1.0 and cyusb_linux_1.0.5 APIs. QT is not supported. 

Also the cyusb.conf file present in the etc folder needs to be copied to the application output directory containing the .exe , this can be done using the post build events in Visual Studios.

Thanks,

Yatheesh

0 Likes