diff --git a/alchitry-loader/Makefile b/alchitry-loader/Makefile index ddf375d..a984e98 100644 --- a/alchitry-loader/Makefile +++ b/alchitry-loader/Makefile @@ -1,8 +1,16 @@ export DOCKER_BUILDKIT=1 +.PHONY: loader loader: ## build the loader in docker (linux) docker build -o . . +.PHONY: ftdi-unbind +ftdi-unbind: ## unbind the ftdi-sio devices on linux (uses sudo) + sh -c "cd /sys/bus/usb/drivers/ftdi_sio && \ + for dev in *:*; do \ + echo \$$dev | sudo tee unbind ; \ + done" + .PHONY: clean clean: rm -rf loader $(objects) diff --git a/alchitry-loader/README.md b/alchitry-loader/README.md index afd5f2a..add67cd 100644 --- a/alchitry-loader/README.md +++ b/alchitry-loader/README.md @@ -28,6 +28,17 @@ Test it out `./alchitry_loader` + +## Linux and macOS and libftd2xx + +On Linux (and macOS?) the default kernel drivers prevent libftd2xx from working properly. +On Linux, you can use this to de-register all ftdi-sio devices (until plugged again): + +``` +make ftdi-unbind +``` + + ## Usage ``` @@ -60,4 +71,4 @@ flash memory. It acts as a bridge from the JTAG port to the SPI of the flash mem The source for the bridge files can be found here https://github.com/alchitry/au-bridge -This isn't needed for the Cu which has direct access to the flash over the SPI protocol. \ No newline at end of file +This isn't needed for the Cu which has direct access to the flash over the SPI protocol.