A C++ implementation for SPI Flash and GPIO leveraging MPSSE-enabled FTDI chips.
ftditool is a utility for interfacing with hardware via FTDI chips.
Key featuers:
- Supports SPI (serial peripheral interface) and GPIO (general-purpose input and output) transactions.
- Compatible with FT4222 and FT2232 chips.
- Fast QuadSPI support for FT4222 chips.
ftditool can be easily installed using Nix:
nix shell github:lowrisc/ftditoolAlternatively you can build the tool from yourself by following the developer guide below.
Once built, you can run the tool with the --help argument for more information:
build/ftditool --helpRead JEDEC ID:
build/ftditool jedecRead page 0x8000:
build/ftditool read-page --addr 0x8000For an example of a real-world application of ftditool, check out the mocha repository.
To automatically get an environment where you can build the tool from source you can use Nix. Run the following command in the root of the repository:
nix developYou can manually install the dependencies by looking in the "flake.nix" file.
Compiling from source:
cmake -B build -S ./
cmake --build buildFeel free to open issues if you have any questions or would like to contribute. We recommend opening an issue to discuss a contribution before preparing a pull request.
Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0.
