From 0dc15017a89c1ff61f4aabecaa8946739c33f9cb Mon Sep 17 00:00:00 2001 From: Douglas Reis Date: Wed, 8 Apr 2026 12:48:56 +0100 Subject: [PATCH] [doc] Improve documentation Signed-off-by: Douglas Reis --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 175acbc..405f98b 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,58 @@ -# Ftditool is a C++ implementation for SPI/I2C Flash memory communication leveraging FTDI MPSSE-enabled chips. +# ftditool: A C++ implementation for SPI Flash and GPIO leveraging FTDI MPSSE-enabled chips. -The FT4222 is supported for fast qSPI transactions. +`ftditool` supports **SPI** and **GPIO** over **FT4222** and **FT2232** chips. The FT4222 specifically supports fast **QSPI** transactions. -## Getting started -Build: +## Getting Started + +Install the dependencies using Nix or any other method: + +```sh +nix develop ``` + +### Build: +```bash cmake -B build -S ./ && cmake --build build ``` -Run with --help argument for more information: + +### Usage: + +Run with the `--help` argument for more information: + ```sh build/ftditool --help ``` -Read jedec: + +**Read JEDEC ID:** + ```sh build/ftditool jedec ``` -Read page 0x800: + +**Read page 0x8000:** + ```sh build/ftditool read-page --addr 0x8000 ``` -## Dependency graph +For a full list of commands: + +```sh +build/ftditool --help +``` + +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. + +## Nix + +`ftditool` can be easily installed using **Nix**: + +```sh +nix shell github:lowrisc/ftditool +``` +---- + +## Development +### Dependency graph ![Dependency graph](doc/img/deps.png)