Add wrapper script that runs reset.py using virtualenv

This commit is contained in:
Daniel Lublin 2022-10-25 15:14:45 +02:00
parent 7af0fc6777
commit fdda69745e
No known key found for this signature in database
GPG Key ID: 75BD0FEB8D3E7830
3 changed files with 21 additions and 1 deletions

2
.gitignore vendored
View File

@ -64,3 +64,5 @@ fp-info-cache
*.net
*.dsn
*.ses
__pycache__

View File

@ -35,7 +35,10 @@ the touch sensor is located (next to the LED). Note that connecting
the USB stick to the computer is not required for programming it. Note
also that with this setup, to reset the USB stick back to firmware
mode after loading an app, you need to unplug both the USB cable to
the stick and the one to the programmer.
the stick and the one to the programmer. Alternatively, you can try
the script in `../hw/application_fpga/tools/reset-tk1` which pokes at
the TK1 that's sitting in the jig, leaving it in firmware mode so that
a new app can be loaded.
On Linux, `lsusb` should list the connected programmer as `cafe:4004
Blinkinlabs ICE40 programmer`. If the USB stick is also connected it

View File

@ -0,0 +1,15 @@
#!/bin/sh
set -eu
cd "${0%/*}"
cd ../../boards/mta1-usb-v1/test
if [ ! -e venv ]; then
python3 -m venv venv
. ./venv/bin/activate
pip3 install -r requirements.txt
else
. ./venv/bin/activate
fi
./reset.py