wasm-openFPGALoader-port/README.md

35 lines
963 B
Markdown
Raw Permalink Normal View History

2025-02-14 17:18:49 +00:00
Originally developed by Yimin Gu under contract for JOH.
2024-01-27 07:34:41 +00:00
## wasmFPGALoader
[openFPGALoader](https://github.com/trabucayre/openFPGALoader) ported to WebAssembly, using WebUSB backend. Program all your FPGA boards from the browser!
Reference article: [here](https://web.dev/articles/porting-libusb-to-webusb)
#### Build
```
git submodule update --init
make build_libusb
make build_libftdi
make
```
#### Host
HTTPS must be used for WebUSB, and two add_headers as in Nginx conf file are necessary for SharedArrayBuffer.
```
mkdir certs
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./certs/nginx.key -out ./certs/nginx.crt
docker run --rm -p 443:443 -p 80:80 \
-v $(pwd):/usr/share/nginx/html:ro \
-v $(pwd)/certs:/etc/nginx/ssl \
-v $(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf:ro \
-d nginx
```
#### WebUSB
Only Chromium-based browsers are supported. On Windows, .... can be used to replace/install required FTDI drivers.