-
Notifications
You must be signed in to change notification settings - Fork 397
Adding support for Cypress FX3 device to libsigrok #148
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
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 |
|
I don't think this is the right place to put this, but if the blocker of upstreaming FX3 is non-free ThreadX RTOS that makes Cypress not allowing us to redistribute firmware, then ThreadX is open source now: https://github.com/eclipse-threadx/threadx EDIT: Infineon doesn't plan to update their ThreadX version to open source one: https://community.infineon.com/t5/USB-superspeed-peripherals/Update-ThreadX-in-FX3/m-p/368568#M32026 |
So if somebody rewrites the firmware without using the OS can this pull request be done? |
Hi, i am trying to build the pulseview from the source in rpi 4 i built the pulseview it is working but in that libsigrok git i got from internet doen't have cypress-fx3 then i found out ur git have that code which i needed so i just removed that libsigrok and cloned urs and did this cmd for the make process: make clean
and again re-built the pulseview still im not seeing the cypress-fx3 in the about of the pulseview, can anyone give some solutions for this? |
|
These were the steps I had followed to generate Pulseview with cypress-fx3 support. The only reliably working option at that time to build for Windows was to cross-compile on Linux environment using MXE mingw binaries. I am not sure if this is still the case.
Hope this helps. |
"The only reliably working option at that time to build for Windows was to cross-compile on Linux environment using MXE mingw binaries. I am not sure if this is still the case." Even today, I think the only variant to build for windows is mingw cross compile on Linux environment. I used Virtualbox and Ubuntu to build, I had no idea it works with Windows WSL 1. Also a patch needs to be applied to MXE, in order to build a patched variant of libusb. @ashwinnaircy do you have any idea how to make the cypress-fx3 to work with newer libusb versions? |
thank you for this clarification but i'm doing the build in ubuntu so can u please tell that part so now instead of that libsigrok from main repo i found this repo so tell me the process how to build this libsigrok and the pulseview like which cmd's i need to use. |
|
thank u so much for this link i will look into it. |
i tried the same method in video also but i can't interlink this libsigrok folder instead of the one you are using in the video do u have idea for this issue, or i need to edit any CMakeLists.txt file for this, also why we need libsigrokcxx-dev for? or anyone who know this. |
|
Hi Praveen, The build script you're using to build Sigrok and its utilities will, by default, perform a git clone from the default Sigrok repository during the build process. You can observe this behavior in the sigrok-cross-mingw script, for example. This might explain why your build isn't reflecting the changes you've made in your local Sigrok repository. To resolve this, you need to point the build script to the Git paths of your git repository so that it clones and builds from there. A good approach would be to add log messages to the build process. This can help you verify what is being fetched and built to ensure the changes from your repository are included. |
Yeah thx for the reply, but the thing is im trying it in linux-22.04 so im not doing any cross compile thing here, and the good thing is i compiled your libsigrok git repo to pulseview instead of the libsigrok which doesn't have fx3, and i did it manually by making the pulseview choose this new libsigrok which in the /usr/local dir. so my doubt is before cross-compiling the windows thing will it have the cypress-fx3 driver in the pulseview windows version? when i use sigrok-cross-mingw, and mainly will i be able to edit the source code of pulseview thing like the clr and UI thing coz i think i will only get the .exe file by cross compiling which i can't manually edit after the build of pulseview @ashwinnaircy |
No, it will not have support for cypress-fx3 by default till you point the build script to build from the modified libsigrok sources in this PR.
Sorry, I am not sure I understand this correctly. From my understanding you have a linux native build that has cypress-fx3 already. Please confirm. |
i also got the reference view from @alexpopa87 https://youtu.be/ZttRQppxUME?si=QP2RXYMgeu8nJWrS |
You need to modify the sigrok-cross-mingw file to specify the path to the libsigrok repo with the modified code. where Hope this is what you are looking for. |
Yes this is what im looking for thankyou. But the thing is if i cross-compile this i will only get the executable file right not the (pulseview dir with codes and make files and UI files)?? |
|
The sigrok-cross-mingw script will fetch and build all the sigrok projects (which includes pulseview, libsigrok etc) and generate the corresponding .exe's or libraries in each project's folder. If you plan/want to modify Pulseview also, you should change the corresponding source files in your pulseview repo and point to the repo with the changed files during cross-compile (same as how you included the custom libsigrok). Pulseview will generate other directories like share/sigrok-firmware etc on installation of the .exe. |
Ok, thank you for the detailed clarification. |
|
@ashwinnaircy do you know if the RAW_IO patch for libusb1 is needed for cypress-fx3? |

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.