Skip to content
Draft
Show file tree
Hide file tree
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
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,44 @@ configured in the bios, the default is 115200 8N1.
Normal boot keys like F2 and F12 should also work to interrupt the boot process.


## Dependencies
## Scripts

Note that on Fedora installing libftdi is not enough to satisfy the library dependencies
One has to install libftdi-devel
See [./scripts](./scripts) folder for scripts to capture logs, flash EC, ...

## Buspirate

A convenient tool for accessing EC and SOC UART is using the [Buspirate 5](https://buspirate.com/).

To control it, use `./scripts/buspirate_ctrl.py`.

### First time setup

```
# Clone the submodules
git submodule update --init

# Install libftdi library and header (Example for Fedora)
sudo dnf install libfdti-devel

# Suggested to use venv
# Create the venv
python3 -m venv .venv
# Enter the venv
source .venv/bin/activate

# Install python dependencies
pip install -r BusPirate-BPIO2-flatbuffer-interface/python/requirements.txt

# Add yourself to the dialout group to avoid sudo (Need to log in again)
sudo usermod -a -G dialout $(whoami)
```

### Usage

```
# Enter venv (if created above)
source .venv/bin/activate

# Example: Reset the EC and print the log
./buspirate_ctrl.py --reset --log
```
4 changes: 4 additions & 0 deletions scripts/buspirate_ctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
process can use it at a time. To control GPIO while a PTY bridge is
running, use signals (see below) or combinable flags.

Initial setup:
Comment thread
JohnAZoidberg marked this conversation as resolved.
git submodule update --init
pip install -r BusPirate-BPIO2-flatbuffer-interface/python/requirements.txt

Wiring:
BP5 IO3 --> EC VCC1_RST (reset, active low)
BP5 IO4 (TX) --> EC CR_SIN1 (UART RX)
Expand Down