Crate x7dap

Crate x7dap 

Source
Expand description

§X7DAP

crates.io docs.rs CI

X7DAP allows you to program Xilinx 7-series FPGAs and SoCs using CMSIS-DAP probes in JTAG mode.

This crate uses jtagdap to handle CMSIS-DAP and JTAG. Currently (Q)SPI flash programming is not supported though it may be added at a future date.

For programming SPI flashes directly, for example when using iCE40 FPGAs, check out spidap, which uses the same libraries. For Lattice ECP5 FPGAs and attached SPI flash, see ecpdap.

§JTAG Clock Frequency

The default clock frequency is 1MHz, but in many situations higher frequencies are possible and reduce operation time. It is also possible to require lower speeds in situations with poor signal integrity.

Use -f or --freq to change, for example -f 10M.

§JTAG Scan Chains

FPGAs can be programmed on arbitrary length JTAG scan chains; you may need to specify --ir-lengths and possibly specify a higher --scan-chain-length depending on the other devices on your scan chain. Where possible the scan chain is automatically detected.

§Pre-built Binaries

Pre-built binaries are available for Windows and Linux on the Releases page. You must have libusb installed or available on your system, and you must have permissions or drivers set up to access your CMSIS-DAP probe. See the drivers page for information on setup.

§Building

  • You must have a working Rust compiler installed. Visit rustup.rs to install Rust.
  • libusb is required to use the higher-speed CMSIS-DAPv2 protocol, where supported by your probe.
  • You may need to set up drivers or permissions to access the USB device, see drivers/ for details

To build and install for your user, without checking out the repository:

cargo install x7dap

Or, building locally after checking out this repository:

cargo build --release

You can either run the ecpdap executable directly from target/release/x7dap, or you can install it for your user using cargo install --path ..

§Usage

Run x7dap help for detailed usage. Commonly used commands:

  • ecpdap probes: List all detected CMSIS-DAP probes
  • ecpdap scan: Scan the JTAG chain to detect ECP5 devices
  • ecpdap program bitstream.bit -f10M: Program bitstream.bit to the ECP5 at 10MHz

§Licence

x7dap is licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Re-exports§

pub use jtagdap;

Structs§

Bitstream
Status
Configuration status register.
X7

Enums§

Error
X7IDCODE
IDCODEs for all X7 device types.

Functions§

auto_tap_idx
Attempt to discover a unique TAP index for a 7-series device in a JTAGChain.
check_tap_idx

Type Aliases§

Result