-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add examples on how to use this module yowasp openfpgaloader #32
Comments
For the time being (until bytecodealliance/jco#375 is fixed) you must use a Web Worker to use |
I've been working on integrating the jco updates but it's been a bit complex to test. |
Here's what i did to make it run: Create index.html:
Create main.js:
Create worker.js:
Then serve these files on a webserver: In chrome, install extension CORS Unblock, open a new tab, and enable CORS Unblock option: "Extra Options" -> "Append Headers to Allow Shared Array Buffer" Access http://localhost:8000 You can see the output in the JS console. Not sure how i can now use WebUSB and specify the device to OpenFPGALoader. Hope this helps |
OK, i figured it out. Just ignore the bad coding :) main.js:
worker.js:
|
You can check working example at https://ramalhais.github.io/openfpgaloader-webflash/ |
Hm, I feel like there should be a way to do it without SAB. |
Good news: I've tested the changes there so you should be able to use |
An example of how to use this would be great! Thanks!
I tried this code:
but i get this error from the browser:
The text was updated successfully, but these errors were encountered: