Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 64e8f43790da
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 36dacc937910
Choose a head ref
  • 1 commit
  • 7 files changed
  • 1 contributor

Commits on Jul 22, 2020

  1. software: include FX2 firmware in the repository.

    This has several significant benefits:
      * End users no longer have to install sdcc, which can be difficult
        on Windows, and still adds complexity elsewhere.
      * Updating a source checkout is simplified, and firmware/software
        mismatch is no longer possible.
      * setup.py is simplified, and the odd breakage we had in the past
        is no longer possible. It will also be easier to convert it to
        the declarative format in the future.
    whitequark committed Jul 22, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    36dacc9 View commit details
Showing with 505 additions and 60 deletions.
  1. +0 −1 .gitignore
  2. +5 −8 README.md
  3. +1 −0 firmware/.gitignore
  4. +11 −0 software/Makefile
  5. +1 −1 software/glasgow/cli.py
  6. +486 −0 software/glasgow/firmware.ihex
  7. +1 −50 software/setup.py
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ build/
*.v
*.vcd
*.gtkw
*.ihex
*.log
*.*b[ac]k
_autosave-*
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -80,36 +80,33 @@ Debugging new applets can be hard, especially if bidirectional buses are involve

**Multiple people have reported various issues with the installation instructions below. If any part of these does not work, please file it as a bug, so that the experience can be made more smooth for everyone.**

You will need git, build tools, sdcc, Python 3.7 (or a newer version, in which case replace `3.7` with that version below). On a Debian or Ubuntu system these can be installed with:
You will need git and Python 3.7 (or a newer version, in which case replace `3.7` with that version below). On a Debian or Ubuntu system these can be installed with:

apt-get install --no-install-recommends git build-essential sdcc \
python3.7 python3-setuptools python3-libusb1 python3-aiohttp python3-bitarray python3-crcmod
apt-get install --no-install-recommends git python3.7 python3-setuptools \
python3-libusb1 python3-aiohttp python3-bitarray python3-crcmod

You will also need Yosys and nextpnr-ice40, both from the master branch. Follow the setup instructions for [Yosys](https://github.com/yosysHQ/yosys/#setup) and [nextpnr](https://github.com/YosysHQ/nextpnr/#nextpnr-ice40).

Obtain the source code:

git clone https://github.com/GlasgowEmbedded/glasgow
cd glasgow
git submodule update --init vendor/libfx2

Configure your system to allow unprivileged access (for anyone in the `plugdev` group) to the Glasgow hardware:

sudo cp config/99-glasgow.rules /etc/udev/rules.d

Install the dependencies and the binaries for the current user:
Install the dependencies and the scripts for the current user:

cd software
python3.7 setup.py develop --user

The binaries are placed in `$HOME/.local/bin`, 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`.
The scripts are placed in `$HOME/.local/bin`, 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`.

To update the source code, do:

cd glasgow
git pull
cd software
python3.7 setup.py build_ext

### ... with Windows?

1 change: 1 addition & 0 deletions firmware/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.ihex
11 changes: 11 additions & 0 deletions software/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
all:
$(MAKE) -C ../vendor/libfx2/firmware/library all
$(MAKE) -C ../firmware all
cp ../firmware/glasgow.ihex glasgow/firmware.ihex

clean:
$(MAKE) -C ../vendor/libfx2/firmware/library clean
$(MAKE) -C ../firmware clean
rm glasgow/firmware.ihex

.PHONY: all clean
2 changes: 1 addition & 1 deletion software/glasgow/cli.py
Original file line number Diff line number Diff line change
@@ -425,7 +425,7 @@ async def _main():

device = None
try:
with importlib.resources.path(__package__, "glasgow.ihex") as firmware_filename:
with importlib.resources.path(__package__, "firmware.ihex") as firmware_filename:
if args.action in ("build", "test", "tool"):
pass
elif args.action == "factory":
Loading