Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 36 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
# ftditool: A C++ implementation for SPI Flash and GPIO leveraging FTDI MPSSE-enabled chips.
# FTDI Tool
> A C++ implementation for SPI Flash and GPIO leveraging MPSSE-enabled FTDI chips.

`ftditool` supports **SPI** and **GPIO** over **FT4222** and **FT2232** chips. The FT4222 specifically supports fast **QSPI** transactions.
`ftditool` is a utility for interfacing with hardware via FTDI chips.

## Getting Started
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.

Install the dependencies using Nix or any other method:
## Usage guide

`ftditool` can be easily installed using [Nix](https://nix.dev/install-nix.html):

```sh
nix develop
nix shell github:lowrisc/ftditool
```

### Build:
```bash
cmake -B build -S ./ && cmake --build build
```
Alternatively you can build the tool from yourself by following the developer guide below.

### Usage:
### Arguments

Run with the `--help` argument for more information:
Once built, you can run the tool with the `--help` argument for more information:

```sh
build/ftditool --help
Expand All @@ -35,24 +38,38 @@ build/ftditool jedec
build/ftditool read-page --addr 0x8000
```

For a full list of commands:
For an example of a real-world application of `ftditool`, check out the [mocha](https://github.com/lowRISC/mocha/blob/main/util/fpga_runner.py) repository.

## Developer guide

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:

```sh
build/ftditool --help
nix develop
```

For an example of a real-world application of `ftditool`, check out the [mocha](https://github.com/lowRISC/mocha/blob/main/util/fpga_runner.py) repository.
You can manually install the dependencies by looking in the "flake.nix" file.

## Nix

`ftditool` can be easily installed using **Nix**:
### Build manually

Compiling from source:

```sh
nix shell github:lowrisc/ftditool
cmake -B build -S ./
cmake --build build
```
----

## Development
### Dependency graph

![Dependency graph](doc/img/deps.png)

## Contributing

Feel 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.

## License

Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0.