Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cpboyd committed Aug 12, 2019
0 parents commit 1f5af7e
Show file tree
Hide file tree
Showing 68 changed files with 14,267 additions and 0 deletions.
95 changes: 95 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@

# Created by https://www.gitignore.io/api/qt,c++,visualstudiocode
# Edit at https://www.gitignore.io/?templates=qt,c++,visualstudiocode

### C++ ###
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

### Qt ###
# C++ objects and libs

# Qt-es
object_script.*.Release
object_script.*.Debug
*_plugin_import.cpp
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
*.qmlc
*.jsc
gui_src/Makefile*
*build-*

# Qt unit tests
target_wrapper.*

# QtCreator
*.autosave

# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*

# QtCreator CMake
CMakeLists.txt.user*

# QtCreator 4.8< compilation database
compile_commands.json

# QtCreator local machine specific files for imported projects
*creator.user*

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### VisualStudioCode Patch ###
# Ignore all local history of files
.history

# End of https://www.gitignore.io/api/qt,c++,visualstudiocode

bin/*
install
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all:
g++ -fPIC -o lib/libcyusb.o -c lib/libcyusb.cpp
g++ -shared -Wl,-soname,libcyusb.so -o lib/libcyusb.so.1 lib/libcyusb.o -l usb-1.0 -l rt
cd lib; ln -sf libcyusb.so.1 libcyusb.so
rm -f lib/libcyusb.o
clean:
rm -f lib/libcyusb.so lib/libcyusb.so.1
help:
@echo 'make would compile and create the library and create a link'
@echo 'make clean would remove the library and the soft link to the library (soname)'
39 changes: 39 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

Cypress Semiconductor Corporation
CyUSB Suite For Linux, version 1.0.5
====================================

Pre-requisites:
1. libusb-1.0.x is required for compilation and functioning of the API
library.
2. Native gcc/g++ tool-chain and the GNU make utility are required for
compiling the library and application.
2. qt4 is required for building the cyusb_linux GUI application.
3. The pidof command is used by the cyusb_linux application to handle
hot-plug of USB devices.

Installation Steps:

1. cd to the main directory where files where extracted and execute 'make'.
This will compile the libcyusb library and create a static library.

For example, if the archive is extracted to /home/user/cyusb_linux_1.0.5; then
e.g.: user@desktop:/home/user/cyusb_linux_1.0.5 $ make

2. Make sure that the install.sh script is executable by changing the mode
of install.sh file.
e.g.: user@desktop:/home/user/cyusb_linux_1.0.5 $ chmod +x install.sh

3. The install.sh script compiles the cyusb_linux GUI application, and installs
the libcyusb library and the application in the system directories (/usr/local/).
It also sets up a set of UDEV rules and updates the environment variables under
the /etc directory.

As these changes require root (super user) permissions, the install.sh script
needs to be executed from a root login.

e.g.: root@desktop:/home/user/cyusb_linux_1.0.5 $ ./install.sh

4. The GUI application can now be launched using the 'cyusb_linux' command.


5 changes: 5 additions & 0 deletions configs/88-cyusb.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Cypress USB driver for FX2 and FX3 (C) Cypress Semiconductor Corporation / ATR-LABS
# Rules written by V. Radhakrishnan ( [email protected] )
# Cypress USB vendor ID = 0x04b4
KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", ATTR{idVendor}=="04b4", MODE="666", TAG="cyusb_dev", RUN+="/usr/local/bin/cy_renumerate.sh A"
KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="remove", TAG=="cyusb_dev", RUN+="/usr/local/bin/cy_renumerate.sh R"
7 changes: 7 additions & 0 deletions configs/cy_renumerate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
pid=`pidof cyusb_linux`

if [ "$pid" ]; then
kill -s SIGUSR1 $pid
fi

35 changes: 35 additions & 0 deletions configs/cyusb.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This is the main configuration file for Cypress USB FX2 and FX3 devices
# All lines beginning with a # in the first column is treated as a comment
# Blank lines are ignored
# Author - V. Radhakrishnan ( www.atr-labs.com )
# Copyright - ATR Educational Devices (P) Ltd and Cypress Semiconductors Inc.
# Date - March 7, 2012
# License - GNU Lesser General Public License (LGPL) 2.1
#---------------------------------------------------------------------------

# Location of logfile for the Cypress USB daemon process 'cyusbd'
# Ensure that you have write permission in that directory, if you are non-root.

LogFile=cyusbd.log

# Location of PID file for the Cypress USB daemon process 'cyusbd'
# Ensure that you have write permission in that directory, if you are non-root.

PIDFile=cyusbd.pid

# Vital Product Data : Vendor/Device IDs - one per line.
# Format - vendorID DeviceID FriendlyName (Max 30 chars or end of line)

<VPD>
04b4 8613 Default Cypress USB device
04b4 4717 Default Cypress USB device
04b4 0082 FX2 Device: Custom PID from EEPROM
04b4 1004 FX2LP Bulk Device
04b4 1003 FX2LP CY-Stream Device
04b4 00BC Cypress Benicia device
04b4 00F0 FX3 Example Application
04b4 00F1 FX3 Streamer Example
04b4 00F3 FX3 Boot-loader
04b4 4720 FX3 I2C/SPI Programmer
04b4 1005 FX3 2nd stage boot-loader
</VPD>
Binary file added docs/cyusb_linux_programmers_guide.pdf
Binary file not shown.
Binary file added docs/cyusb_linux_user_guide.pdf
Binary file not shown.
Loading

0 comments on commit 1f5af7e

Please sign in to comment.