FPGAwars / icestudio

:snowflake: Visual editor for open FPGA boards
https://icestudio.io
GNU General Public License v2.0
1.67k stars 242 forks source link

Unable to upload to TinyFPGA BX on macOS #753

Open Bexin3 opened 1 week ago

Bexin3 commented 1 week ago

Hello, I tried to upload a totally basic schematic with one input one output and some others, but I keep getting an error. With all other boards it just says the board isn't connected, but with BX I get the following error; I tried using both the 0.9.5 and 0.9.6 toolchains but the result is the same. Info: No apio.ini file Info: No apio.ini file [Mon Jun 24 10:14:47 2024] Processing TinyFPGA-BX

tinyprog --libusb --program hardware.bin Traceback (most recent call last): File "/Users/redacted/.icestudio/venv/bin/tinyprog", line 8, in sys.exit(main()) File "/Users/redacted/.icestudio/venv/lib/python3.9/site-packages/tinyprog/main.py", line 249, in main active_boards = get_ports(device) + get_ports("1209:2100") File "/Users/redacted/.icestudio/venv/lib/python3.9/site-packages/tinyprog/init.py", line 39, in get_ports for d in usb.core.find(idVendor=vid, idProduct=pid, find_all=True) File "/Users/redacted/.icestudio/venv/lib/python3.9/site-packages/usb/core.py", line 1309, in find raise NoBackendError('No backend available') usb.core.NoBackendError: No backend available scons: *** [upload] Error 1

Bexin3 commented 1 week ago

I tried file in https://groups.google.com/g/fpga-wars-explorando-el-lado-libre/c/hbWVxvIWU_E/m/V2itMDZpAAAJ?pli=1 but no luck

Bexin3 commented 1 week ago

For further information this happens no matter if the board is connected and I press the button or even if its fully disconnected

cavearr commented 1 week ago

hi! when do you buy your board? the month and year is important to check what firmware is in it.

your machine is intel or arm based?

Bexin3 commented 1 week ago

hi! when do you buy your board? the month and year is important to check what firmware is in it.

your machine is intel or arm based?

Hello, the machine is arm based. In terms of when it was in October of 2023 so one of the new batches.

cavearr commented 1 week ago

Thanks , could you help me to try to fix it? my tiny is prior to this and works fine, if you could give me feedback , we could find a solution.

You tried the last _init.py in the thread? (you mention it, but i don't understand if you overwrite with the last init.py) https://groups.google.com/g/fpga-wars-explorando-el-lado-libre/c/hbWVxvIWU_E/m/V2itMDZpAAAJ?utm_medium=email&utm_source=footer

Bexin3 commented 1 week ago

Thanks , could you help me to try to fix it? my tiny is prior to this and works fine, if you could give me feedback , we could find a solution.

You tried the last _init.py in the thread? (you mention it, but i don't understand if you overwrite with the last init.py) https://groups.google.com/g/fpga-wars-explorando-el-lado-libre/c/hbWVxvIWU_E/m/V2itMDZpAAAJ?utm_medium=email&utm_source=footer

Ofcourse, I'd be willing to help, I can't help with coding much but I can try to test anything if you have any ideas. Yes I have tried it but unfortunately it didn't work and had no effect overall.

cavearr commented 1 week ago

Ok! give me some time to prepare the new fix and tell you to try it.

cavearr commented 16 hours ago

Hi @Bexin3 !

Ill put you three files here https://mega.nz/folder/jM9DlZhQ#7f9N9uniTnS3MHvS5mF3HQ

remember first do in your shell:

chmod 755 tinyprog

i need you do this steps in a shell to know if it works:

tinyprog --atb --security page1.txt -a 2 tinyprog --atb --security page2.txt -a 3

And then try to upload some bitstream:

tinyprog --atb -p hardware.bin

hardware.bin is your test bitstream

Tell me if it works!

Bexin3 commented 11 minutes ago

Hi @Bexin3 !

Ill put you three files here https://mega.nz/folder/jM9DlZhQ#7f9N9uniTnS3MHvS5mF3HQ

  • page1.txt and page2.txt are the missing metada in your fpgatiny.
  • tinyprog a patched version of tinyprog for osx arm -test-tiny.bin a blinking light test if you dont have a test bitstream.

remember first do in your shell:

chmod 755 tinyprog

i need you do this steps in a shell to know if it works:

tinyprog --atb --security page1.txt -a 2 tinyprog --atb --security page2.txt -a 3

And then try to upload some bitstream:

tinyprog --atb -p hardware.bin

hardware.bin is your test bitstream

Tell me if it works!

Hello, so far no luck. Not sure if I am doing this correctly but I downloaded the folder, changed to the folder, ran the first command. Then trying to run the second it said zsh: command not found: tinyprog, so I instead tried to run it as ./tinyprog, in which case it seems to just run the executable and it doesn't change, and neither after running these order does the outcome, saying TinyProg CLI

Using device id 1d50:6130
No port was specified and no active bootloaders found.
Activate bootloader by pressing the reset button.

Which to clarify I did press the button