0. Environment
EZ-USB FX2LP CY7C68013A USB core board
ubuntu16
1. Download FX3_SDK_1.3.4_linux
EZ-USB™ FX3 Software Development Kit
https://www.infineon.com/cms/en/design-support/tools/sdk/usb-controllers-sdk/ez-usb-fx3-software-development-kit
2. Unzip
Put the compressed file into
/home/xxjianvm/work/FX3_SDK_1.3.4_Linux.tar.gz
Unzip
tar -zvxf FX3_SDK_1.3.4_Linux.tar.gz
Got
fx3_firmware_linux.tar.gz
ARM_GCC.tar.gz # Cross-compilation tool
eclipse_x64.tar.gz # IDE
eclipse_x86.tar.gz
cyusb_linux_1.0.5.tar.gz # cyusb driver
Continue to unzip
tar -zvxf fx3_firmware_linux.tar.gz && \
tar -zvxf ARM_GCC.tar.gz && \
tar -zvxf eclipse_x64.tar.gz && \
tar -zvxf cyusb_linux_1.0.5.tar.gz
3. Test cyusb_linux
This software is open source, compile and install
cd cyusb_linux_1.0.5
make
sudo ./install.sh
Problem: An error occurred when compiling ubuntu18: main.cpp:133:62: error: invalid conversion from 'int' to 'int* (*)()' [-fpermissive] libusb_error(r, "Error in 'get_active_config_descriptor' ")
;
No solution found. Ubuntu16 compiles smoothly. It doesn’t matter, the example on ubuntu18 without a graphical interface can be compiled and executed smoothly.
cd cyusb_linux_1.0.5/bin
chmod +x cyusb_linux
export LD_LIBRARY_PATH=/home/xxjianvm/work/cyusb_linux_1.0.5/lib:$LD_LIBRARY_PATH && \
./cyusb_linux
4. Eclipse builds the environment (skip, FX2LP has a 51 core and requires keil, and eclipse is suitable for FX3LP with an arm core)
Try running
cd eclipse
./ezUsbSuite
Failed, prompting that there is no java environment
Download Java version 1.6.0_41
mirror site:
https://repo.huaweicloud.com/java/jdk/
http://www.codebaoku.com/jdk/jdk-index.html
Download to
/home/xxjianvm/work/java/jdk-6u45-linux-x64.bin
Install to the current directory
chmod 777 jdk-6u45-linux-x64.bin
./jdk-6u45-linux-x64.bin
Copy
/home/xxjianvm/work/java/jdk1.6.0_45/jre
to
/home/xxjianvm/work/eclipse/jre
You can run eclipse
cd /home/xxjianvm/work/eclipse
./ezUsbSuite
Set the workspace:
/home/xxjianvm/work/Workspace
5.cyusb demo
cd cyusb_linux_1.0.5/src
make
./01_getdesc
6. Create your own main.c
cd cyusb_linux_1.0.5/src
cp 01_getdesc.cpp ex1.cpp
export LD_LIBRARY_PATH=/home/xxjianvm/work/cyusb_linux_1.0.5/lib:$LD_LIBRARY_PATH
Modify the Makefile and add a line of
gcc -o ex1 ex1.cpp -L ../lib - lcyusb
7. bolkloop test
7.1 Program bolkloop
Open the host computer program
cd cyusb_linux_1.0.5/bin
chmod +x cyusb_linux
export LD_LIBRARY_PATH=/home/xxjianvm/work/cyusb_linux_1.0.5/lib:$LD_LIBRARY_PATH && \
./cyusb_linux
Download the program
Select device -> Program -> Select file ->
-> Select /home/xxjianvm/work/cyusb_linux_1.0.5/fx2_images/bulkloop.hex
-> Start Download
7.2 Testing
7.2.1 cyusb_linux graphical interface test
Select the device -> Data Transfers ->
-> Data-Out input 12345678 -> click SEND
and then click RECEIVE to receive the data just sent
7.2.2 Command line testing
cd /home/xxjianvm/work/zhyb/cyusb_linux_1.0.5/src
export LD_LIBRARY_PATH=/home/xxjianvm/work/cyusb_linux_1.0.5/lib:$LD_LIBRARY_PATH
./08_cybulk
Reference: https://github.com/nickdademo/cypress-fx3-sdk-linux