fx2lafw is a free/libre/open-source firmware for logic analyzers based on
the Cypress EZ-USB FX2(LP) chip.
-It is licensed under the terms of the GNU GPL (version 2 or later).
+It is licensed under the terms of the GNU GPL (version 2 or later), and uses
+additional helper code licensed under the GNU LGPL (version 2.1 or later).
Requirements
------------
-In order to build fx2lafw you need the 'sdcc' compiler.
+ - In order to build fx2lafw you need the 'sdcc' compiler.
+ On Debian you can install it via:
-On Debian you can install it via:
+ $ apt-get install sdcc
- $ apt-get install sdcc
+ - You need libsigrok >= 0.1.1 in order to make use of fx2lafw. Earlier
+ versions didn't have support for FX2 devices using this firmware.
Building
*
* - We use the FX2 in GPIF mode to sample the data (asynchronously).
* - We use the internal 48MHz clock for GPIF.
- * - The 8 channels/pins we sample (the GPIF data bus) are PB0-PB7.
- * Support for 16 channels is not yet included, but might be added later.
- * - Endpoint 2 is used for data transfers from FX2 to host.
- * - The endpoint is quad-buffered.
+ * - The 8 channels/pins we sample (the GPIF data bus) are PB0-PB7,
+ * or PB0-PB7 + PD0-PD7 for 16-channel sampling.
+ * - Endpoint 2 (quad-buffered) is used for data transfers from FX2 to host.
*
* Documentation:
*
#include <setupdat.h>
#include <eputils.h>
#include <gpif.h>
-
#include <command.h>
#include <fx2lafw.h>
#include <gpif-acquisition.h>
/* We only support interface 0, alternate interface 0. */
if (ifc != 0 || alt_ifc != 0)
return FALSE;
-
+
/* Perform procedure from TRM, section 2.3.7: */
/* (1) TODO. */
/* Contains RDY* pin values. Read-only according to TRM. */
GPIFREADYSTAT = 0;
- /* Make GPIF stop on transcation count not flag */
+ /* Make GPIF stop on transaction count not flag. */
EP2GPIFPFSTOP = (0 << 0);
}
/* Initialize flowstate registers (not used by us). */
gpif_init_flowstates();
- /* Reset the status */
+ /* Reset the status. */
gpif_acquiring = FALSE;
}
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
-SOURCES = \
- ../../fx2lafw.c \
- ../../gpif-acquisition.c
+SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c
A51_SOURCES = dscr.a51
BASENAME = fx2lafw-braintechnology-usb-lps
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
-SOURCES = \
- ../../fx2lafw.c \
- ../../gpif-acquisition.c
+SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c
A51_SOURCES = dscr.a51
BASENAME = fx2lafw-cwav-usbeeax
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
-SOURCES = \
- ../../fx2lafw.c \
- ../../gpif-acquisition.c
+SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c
A51_SOURCES = dscr.a51
BASENAME = fx2lafw-cwav-usbeesx
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
-SOURCES = \
- ../../fx2lafw.c \
- ../../gpif-acquisition.c
+SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c
A51_SOURCES = dscr.a51
BASENAME = fx2lafw-cypress-fx2
;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
;;
-VID = 0xB404 ; Manufacturer ID (0x04B4)
+VID = 0xb404 ; Manufacturer ID (0x04b4)
PID = 0x1386 ; Product ID (0x8613)
.include "../../../include/dscr.inc"
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
-SOURCES = \
- ../../fx2lafw.c \
- ../../gpif-acquisition.c
+SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c
A51_SOURCES = dscr.a51
BASENAME = fx2lafw-saleae-logic
#define SYNCDELAY() SYNCDELAY4
+/*
+ * Major and minor fx2lafw firmware version numbers.
+ * These can be queried by the host via CMD_GET_FW_VERSION.
+ *
+ * The minor version number must be increased every time there are
+ * backwards-compatible changes (which do not change the API).
+ *
+ * The major version number must be increased every time there are API
+ * changes or functional changes which require adaptations in the host
+ * (libsigrok) drivers, i.e. changes where old libsigrok versions would no
+ * longer (properly) work with the new fx2lafw firmware.
+ */
#define FX2LAFW_VERSION_MAJOR 1
#define FX2LAFW_VERSION_MINOR 0
#define FX2LAFW_GPIF_ACQUISITION_H
#include <stdbool.h>
-
#include <command.h>
void gpif_init_la(void);
-
bool gpif_acquisition_start(const struct cmd_start_acquisition *cmd);
-
void gpif_poll(void);
#endif