I got a glasgow revC1 board a while ago, but never had the time and/or motivation to actually try it out until now.
With help from the 1BitSquared discord/irc I got far enough that the glasgow CLI runs on my windows system and the board is recognized.
Steps:
(note: these are after the fact from memory, I hope they are mostly correct)
- cloned https://github.com/GlasgowEmbedded/glasgow into C:\glasgow\repo\glasgow
- installed python 3.8 from the windows store
- executed
python setup.py develop --user
insideC:\glasgow\repo\glasgow\software
- added
C:\Users\lr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts
to the path (there should be a glasgow.exe in this folder) - downloaded libusb windows dll from https://libusb.info/
- (didn't work, DLL not loaded by python) copied libusb-1.0.dll into
C:\Users\lr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts
next to python.exe - (didn't work, DLL not loaded by python) copied libusb-1.0.dll into
C:\Users\lr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts
next to glasgow.exe - (worked) copied libusb-1.0.dll into
C:\Windows\System32
(not advisable for general users, I got impatient) - at this point I could run the
glasgow
CLI, but it didn't detect the board. When plugging in the board, windows showed an error "usb device not recognized" - after switching port and cable, using Zadig to change the driver to
libusb-win32
(I think), and unplugging and replugging it once more, it worked! Note that during the installation of the driver I got another "device not recognized" error, but it did work after re-plugging it. - at this point
glasgow list
shows the board.
Thank you!
Can't wait to actually use it, probably next weekend
Additional notes:
Windows 10 x64 2004
(Not sure if it is relevant, but at first I plugged it into a USB3 port, then later the working configuration was with a USB2 port.)
I thought I had connected glasgow with a known-working cable to a known-working port, but when I tested it with a different device, I also got an error.
I think in some cases, if there is an issue with a device, Windows will just stop recognizing the whole port until a restart.
After changing port and cable the device was recognized by device manager as Glasgow Debug Tool, though with a yellow triangle, and glasgow list
failed with usb1.USBErrorNotSupported: LIBUSB_ERROR_NOT_SUPPORTED [-12]
.
Then I used Zadig to replace the driver. As mentioned above, windows did show an error during the installation, but it worked after a re-plug.
More Notes
pip install -e glasgow/software
pip install -e ./software[toolchain]