Created
September 29, 2019 09:05
-
-
Save alexhude/150ca8a28a938da7c8ad5a1ad4be9332 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install Homebrew (https://brew.sh) | |
``` | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
``` | |
2. Install python3.7 | |
``` | |
brew install python3 | |
``` | |
3. Install opensource FPGA toolchain | |
``` | |
brew tap ktemkin/oss-fpga | |
brew install --HEAD icestorm yosys nextpnr-ice40 | |
``` | |
4. Install sdcc | |
``` | |
brew install sdcc | |
``` | |
5. Install required python packages | |
``` | |
python3.7 -m pip install setuptools libusb1 aiohttp bitarray crcmod | |
``` | |
6. Obtain the source code: | |
``` | |
git clone https://github.com/GlasgowEmbedded/Glasgow | |
cd Glasgow | |
git submodule update --init vendor/libfx2 | |
``` | |
7. Install the dependencies and the binaries for the current user | |
``` | |
cd software | |
python3.7 setup.py develop --user | |
``` | |
The binaries are placed in $HOME/Library/Python/3.7/bin/glasgow, so be sure to add that directory to the PATH environment variable; after this, you can run glasgow from a terminal. Instead of adjusting PATH it is also possible to use `python3.7 -m glasgow.cli` or create a symlink to `/usr/local/bin/glasgow`. | |
To update the source code, do: | |
``` | |
cd Glasgow | |
git pull | |
cd software | |
python3.7 setup.py build_ext | |
``` | |
Troubleshooting | |
Q: I have an error `E: __main__: device not found` | |
A: This can happen when glasgow is called very first time, just run glasgow one more time and issue will magically dissapear |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment