-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for Cypress FX3 device to libsigrok #148
Conversation
Where is the source of the firmware? This is neat! |
Thanks for your comment. The firmware will actually fall under "Getting non-distributable firmware files" section of the firmware wiki (https://sigrok.org/wiki/Firmware). We are planning to release the binary (cypress-fx3.fw) and the firmware example project source through the Cypress webpage as a Knowledge Base Article. We cannot add the source or the binary to the sigrok-firmware project due to licensing issues. |
The firmware source is online at EZ-USB™ FX3 Explorer kit as 16-channel 100 MHz logic analyzer with sigrok PulseView - KBA233652. |
For transparency purposes, here's the email I sent the author of this PR:
For these reasons, as much as I am happy to see Infineon step up and contribute, #154 is currently the preferred way forward. I'd be happy if we could somehow merge these efforts and get something that works better than each individual solution. |
Someone should ask Cypress (Infineon) for permission to use their firmware blob. They've given permission to use other software: In the absence of their permission, here is an open source firmware: https://github.com/zeldin/fx3lafw BTW, here is a KBA from Infineon telling users to use the FX3 with Sigrok: I posted an issue on their forum. I also PM'd rajagopaln and Chelladurai |
Is there any chance we can get a prebuilt installer in the KB article? The compilation process, while doable, is quite time-consuming. |
I see Infineon responded on their forum (per the post above, asking permission to use their firmware blob) but no one has followed up with them. It sounds like they may be amenable to Sigrok distributing their blob. It would be great to be able to use Sigrok with the FX3 firmware provided by the device manufacturer for this specific application, without having to set up a Sigrok build environment. |
Since merging the here described Cypress-FX3 driver into sigrok is not likely to happen I grabbed the bull by the horns and set up a fresh Ubuntu-20.04 system on windows wsl2 to build sigrok-cli and pulseview from scratch. It took me about 2 weeks to get everything up and running, but now it is done and I thought it may be good to share the work to enable others to build this nice little piece of software themselves. You can download the wsl image of Ubuntu-20.04 with all required libraries included, except for the 'cypress-fx3.fw' firmware due to the fact that it is covered by a different licensing scheme. You need to download it separately from infineon's web-site (link was provided by infineon earlier here). You can copy the firmware to '~/sigrok-src/sigrok-firmware-fx3/', from where it will then be included in the windows installer. But you can add it later to the installed software as well like it is described in infineon's blog. These are the links to the image: Image Part 0 Total size of the image is about 11 GB, so I had to split the ".tar" file into 3 parts, since the daily download limit at the hoster is 5 GB on a free plan.
I'm using a static source for compiling sigrok, since I needed to manually integrate the FX3 driver modifications into 'libsigrok'. The build scripts located in '/sigrok-utils/cross-compile/...' directories are modified to copy the source files from '/sigrok-src' rather than "wget" them from git. If you want to use the latest git version, you should either "wget" them into '/sigrok-src' or change the build scripts again, i.e. uncomment the "wget" commands and comment the following "mkdir" and "cp" commands. If you use the git versions, you will, however, lose the modifications required for integration of the FX3 driver! If you are up for cross compiling for mingw, you may want to download the FX3 firmware provided by infineon before compiling. Extract the 'cypress-fx3.fw' file and copy it to '/sigrok-src/sigrok-firmware-fx3' directory. It will then be included in your personal windows installer.
If you cross-compile for windows, please adjust the build script to compile for either 32 or 64 bits. The image's default is 64 bits. Good luck and have fun! |
@LeisureLadi thank you for your work! I've just taken a look to it. I think that it would be great if you create a repository with modified scripts and provide a Dockerfile instead of the WSL image. |
Is the current concern blocking this PR from being merged the issue of permission from Infineon to redistribute the FX3 firmware found in the KBA by the sigrok project? If so, I'm happy to attempt chasing an answer from Infineon on this, I just want to make sure that all is needed is for explicit permission of the sigrok project to redistribute the firmware files found on the KBA, and what form that permission can come in (whether a post on the Infineon forum, or something else). I would love to see this get merged since the process of building from source for a windows installer seems rather arduous, and it will open up a great option for a cheap performant logic analyzer platform. |
I quote Cypress: "We cannot add the source or the binary to the sigrok-firmware project due to licensing issues." This is as big of a showstopper as it gets. Closing the PR as we're not interested in drivers whose firmware we can't redistribute. I suggest further developments happens as part of #154. |
Hello @LeisureLadi |
Hi @shabaz123, I'm too not familiar with the internal details of sigrok, but from recent bug reports I understand, that pulseview currently is broken on Windows due to an issue with libusb (see here: #235). I guess, there is no simple solution for the problem in the near future. |
Hi @shabaz123, a small, but important correction: with the modifications described here: #242 it is possible to record with fx3 at 100MHz and long sampling times. Thanks to @multiplemonomials to provide the fix. I'm not sure, if the timing is always correct, but at least recording is possible. |
Hey guys |
EZ-USB FX3 is a USB 3.0 peripheral controller that comes from the EZ-USB family of products (USB 3.0 version of the FX2 series used in fx2lafw). Addition of FX3 support to sigrok can help developers to use any FX3 kit as a USB 3.0 logic analyzer.