SDK for ZTEX USB-FPGA-Modules
ZTEX provides a Open Source SDK which is especially designed for the ZTEX modules, but also works with other EZ-USB based hardware.
The package is Open Source and distributed under the GPLv3.
The package is known to work under Linux and Windows, but should work on every operating system which supports libusb and Java. The Java API allows the development of platform-independent host software.
Features
The main features are:
- Firmware Kit (for EZ-USB Microcontrollers) is written in C (requires SDCC compiler).
- Firmware is assembled using a powerful macro processor which allows to specify
all required settings by a few macros. The necessary USB descriptors and
the descriptor handling routines are generated automatically.
- Host software API is written in Java and allows platform independent host software. It is possible to pack all necessary files (libusb libraries, firmware, bitstream) into
one single jar archive which runs on both, Linux and Windows (and other OS's that support libusb and Java)
- Licensed as Open Source under GPLv3
- Main functions of the Firmware Kit / Java API are:
- Firmware upload directly into the EZ-USB Microcontroller
- Access to EEPROM memory
- Firmware upload to EEPROM
- Access to microSD/*SD/MMC Flash cards in SPI mode
- Bitstream upload directly to the FPGA
- Bitstream upload to Flash memory and autonomous FPGA configuration using Bitstream from Flash memory
- Support of the Configuration-Booster-CPLD of Spartan 6 LX45 to LX150 USB-FPGA Modules 1.15 (up to 24MByte/s via USB, up to 2.5MByte/s from microSD
- MAC-EEPROM support
SDK overview
The following diagram gives an overview about the usage of the different parts of the ZTEX EZ-USB SDK.
The firmware of the EZ-USB device is developed using the Firmware Development Kit. It can be uploaded either
by a utility which is a part of the SDK or by the host software itself using the Java API.
The host software usually consists of a single jar archive which contains
- all necessary Java bytecode;
- the libusb Java wrapper libraries for Linux (libusbJava.so) and Windows (libusbJava.dll), which are statically linked against libusb (no libusb installation required);
- the firmware for the EZ-USB device (unless not installed in EEPROM);
- Bitstream for the FPGA (if required).
This single jar archive runs on both, Linux and Windows (or other OS's that support libusb and Java).
On Linux this jar archive has no additional software requirements. The libusb(Java) library communicates directly with the EZ-USB device using kernel routines.
On Windows a libusb driver is required. (This driver is a part of the ZTEX SDK package). The libusb(Java) library communicates with the EZ-USB device using that driver.
Other programming languages
Devices with ZTEX firmware can be accessed easily with all programming languages for which a libusb port exists.
But unlike Java, then there are no routines for uploading the firmware and the bitstream available so that
the
FWLoader included in the SDK has to be used.
Examples
An up-to-date list of the examples contained in the SDK can be found at
ZTEX Wiki::Contents of the FPGA additional exaples (includung implementations of soft CPU's> cab be fount at
ZTEX Wiki::Projects and examples
Additional resources