mirror of
https://github.com/stakwork/sphinx-key.git
synced 2026-02-01 05:44:19 +01:00
fix readme
This commit is contained in:
@@ -1,44 +1,5 @@
|
||||
## Instructions to build and run the Sphinx Key signer
|
||||
|
||||
### Hardware setup
|
||||
|
||||
#### Picture
|
||||
|
||||

|
||||
|
||||
##### Sparkfun Shopping List
|
||||
|
||||
- ESP32-C3 Mini Development Board: https://www.sparkfun.com/products/18036
|
||||
- SparkFun microSD Transflash Breakout: https://www.sparkfun.com/products/544
|
||||
- Breadboard - Self-Adhesive (White): https://www.sparkfun.com/products/12002
|
||||
- Break Away Headers - Straight: https://www.sparkfun.com/products/116
|
||||
- Jumper Wire Kit - 140pcs: https://www.sparkfun.com/products/124
|
||||
|
||||
##### Soldering and SD Card Format
|
||||
|
||||
> **Warning**
|
||||
> This signer currently does not work with SD cards that come with the UHS-I feature.
|
||||
|
||||
- You'll need a microSD card formatted using the FAT32 filesystem.
|
||||
- On MacOS, go to `Disk Utility`.
|
||||
- Click on the SDCard's disk in the left hand pane.
|
||||
- Click on the `Erase` button on the cetner top toolbar.
|
||||
- Then choose `MS-DOS (FAT)` for the format.
|
||||
- Finally click on `Erase`, at the bottom right of the dialogue box.
|
||||
- Also make sure you have a micro-USB cable capable of transferring data.
|
||||
- Once you have the parts, solder the breakaway headers to the microSD card board as shown in the picture above.
|
||||
|
||||
Now follow the table below and the picture above to make all the connections:
|
||||
|
||||
SD card pin | ESP32-C3-DevKitM-1 v1.0 | Notes
|
||||
------------|-------------------------|--------------------
|
||||
DO | GPIO2 | Pin numbered 6 on board, same for the others below
|
||||
CS | GPIO10 | No need for any of the 10kOhm resistors mentioned in docs as of July 2022
|
||||
SCK | GPIO6 |
|
||||
DI | GPIO7 |
|
||||
VCC | 3V3 |
|
||||
GND | GND |
|
||||
|
||||
### Software setup ( MacOS )
|
||||
|
||||
- Make sure you have the Apple Command Line Developer tools installed on your machine. If not, run `xcode-select --install`
|
||||
@@ -50,25 +11,9 @@ SD card pin | ESP32-C3-DevKitM-1 v1.0 | Notes
|
||||
pip install esptool
|
||||
rustup install nightly
|
||||
rustup component add rust-src --toolchain nightly
|
||||
cargo install cargo-generate cargo-espflash ldproxy
|
||||
cargo install cargo-espflash ldproxy
|
||||
```
|
||||
|
||||
### Hello World
|
||||
|
||||
Before we build and run the signer, we'll walk through a generic hello world to make sure the environment is all working:
|
||||
|
||||
- Type `cd ~`. This places you in your home directory. You can also cd into any other directory you want.
|
||||
- Run the command below, and set the following settings when prompted: `Project Name=tiny-esp32, MCU=esp32c3, ESP-IDF native build version=v4.4, STD support=true, Configure project to use Dev Containers=false`
|
||||
```
|
||||
cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cargo
|
||||
```
|
||||
- `cd tiny-esp32`
|
||||
- Plug in the ESP32-C3 dev board to your computer via data-enabled micro-USB.
|
||||
- `cargo espflash --monitor`
|
||||
- Keep iterating through the ports displayed until you find one that works.
|
||||
- This command builds and flashes the program onto the dev board, and then monitors the logs as soon as the program starts to run. By the end of execution, you should see a little `Hello World` log on your screen.
|
||||
- Do a `ctrl-c` to quit the monitor. You are now ready to build, flash, and run the signer 🙂
|
||||
|
||||
### Signer
|
||||
|
||||
- Plug in the ESP32-C3 dev board to your computer via data-enabled micro-USB.
|
||||
@@ -109,3 +54,43 @@ Password: password of the wifi from the previous step
|
||||
- Next, unplug your ESP32 from your computer.
|
||||
- Take out the SD card from its slot, and use your computer to clear all the data on it. Place it back in its slot after you've done so.
|
||||
- You can now go to the section above to get going again.
|
||||
|
||||
|
||||
### Hardware setup
|
||||
|
||||
#### Picture
|
||||
|
||||

|
||||
|
||||
##### Sparkfun Shopping List
|
||||
|
||||
- ESP32-C3 Mini Development Board: https://www.sparkfun.com/products/18036
|
||||
- SparkFun microSD Transflash Breakout: https://www.sparkfun.com/products/544
|
||||
- Breadboard - Self-Adhesive (White): https://www.sparkfun.com/products/12002
|
||||
- Break Away Headers - Straight: https://www.sparkfun.com/products/116
|
||||
- Jumper Wire Kit - 140pcs: https://www.sparkfun.com/products/124
|
||||
|
||||
##### Soldering and SD Card Format
|
||||
|
||||
> **Warning**
|
||||
> This signer currently does not work with SD cards that come with the UHS-I feature.
|
||||
|
||||
- You'll need a microSD card formatted using the FAT32 filesystem.
|
||||
- On MacOS, go to `Disk Utility`.
|
||||
- Click on the SDCard's disk in the left hand pane.
|
||||
- Click on the `Erase` button on the cetner top toolbar.
|
||||
- Then choose `MS-DOS (FAT)` for the format.
|
||||
- Finally click on `Erase`, at the bottom right of the dialogue box.
|
||||
- Also make sure you have a micro-USB cable capable of transferring data.
|
||||
- Once you have the parts, solder the breakaway headers to the microSD card board as shown in the picture above.
|
||||
|
||||
Now follow the table below and the picture above to make all the connections:
|
||||
|
||||
SD card pin | ESP32-C3-DevKitM-1 v1.0 | Notes
|
||||
------------|-------------------------|--------------------
|
||||
DO | GPIO2 | Pin numbered 6 on board, same for the others below
|
||||
CS | GPIO10 | No need for any of the 10kOhm resistors mentioned in docs as of July 2022
|
||||
SCK | GPIO6 |
|
||||
DI | GPIO7 |
|
||||
VCC | 3V3 |
|
||||
GND | GND |
|
||||
|
||||
Reference in New Issue
Block a user