You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# ftditool: A C++ implementation for SPI Flash and GPIO leveraging FTDI MPSSE-enabled chips.
1
+
# FTDI Tool
2
+
> A C++ implementation for SPI Flash and GPIO leveraging MPSSE-enabled FTDI chips.
2
3
3
-
`ftditool`supports **SPI** and **GPIO** over **FT4222** and **FT2232** chips. The FT4222 specifically supports fast **QSPI** transactions.
4
+
`ftditool`is a utility for interfacing with hardware via FTDI chips.
4
5
5
-
## Getting Started
6
+
Key featuers:
7
+
- Supports **SPI** (serial peripheral interface) and **GPIO** (general-purpose input and output) transactions.
8
+
- Compatible with **FT4222** and **FT2232** chips.
9
+
- Fast **QuadSPI** support for FT4222 chips.
6
10
7
-
Install the dependencies using Nix or any other method:
11
+
## Usage guide
12
+
13
+
`ftditool` can be easily installed using [Nix](https://nix.dev/install-nix.html):
8
14
9
15
```sh
10
-
nix develop
16
+
nix shell github:lowrisc/ftditool
11
17
```
12
18
13
-
### Build:
14
-
```bash
15
-
cmake -B build -S ./ && cmake --build build
16
-
```
19
+
Alternatively you can build the tool from yourself by following the developer guide below.
17
20
18
-
### Usage:
21
+
### Arguments
19
22
20
-
Run with the `--help` argument for more information:
23
+
Once built, you can run the tool with the `--help` argument for more information:
21
24
22
25
```sh
23
26
build/ftditool --help
@@ -35,24 +38,38 @@ build/ftditool jedec
35
38
build/ftditool read-page --addr 0x8000
36
39
```
37
40
38
-
For a full list of commands:
41
+
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.
42
+
43
+
## Developer guide
44
+
45
+
To automatically get an environment where you can build the tool from source you can use Nix.
46
+
Run the following command in the root of the repository:
39
47
40
48
```sh
41
-
build/ftditool --help
49
+
nix develop
42
50
```
43
51
44
-
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.
52
+
You can manually install the dependencies by looking in the "flake.nix" file.
45
53
46
-
## Nix
47
54
48
-
`ftditool` can be easily installed using **Nix**:
55
+
### Build manually
56
+
57
+
Compiling from source:
49
58
50
59
```sh
51
-
nix shell github:lowrisc/ftditool
60
+
cmake -B build -S ./
61
+
cmake --build build
52
62
```
53
-
----
54
63
55
-
## Development
56
64
### Dependency graph
65
+
57
66

58
67
68
+
## Contributing
69
+
70
+
Feel free to open issues if you have any questions or would like to contribute.
71
+
We recommend opening an issue to discuss a contribution before preparing a pull request.
72
+
73
+
## License
74
+
75
+
Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0.
0 commit comments