tinyvision-ai-inc / pico-ice

Raspberry Pi PICO board + Lattice iCE40 FPGA's
MIT License
142 stars 26 forks source link

Problems when following the guide: "Programming the iCE40" #50

Open Thomas-514 opened 4 weeks ago

Thomas-514 commented 4 weeks ago

I ran into a few problems when following the guide "Programming the iCE40" more specifically the "Using APIO" section on the website.

Maybe they are because I'm working on a Mac (Intel Version)

After running "apio examples -f iCE40-UP5K/blink" the apio.ini looks like this:

[env]
board = iCE40-UP5K
top-module = rgb_test

Then it changes to this after setting the board to ice-pico "apio init --sayyes --board pico-ice" :

[env]
board = pico-ice
top-module = main

The problem is, that in blink.v the main module is still named rgb_test. Thus, the build fails.

Further when executing "apio upload" the following command is executed.

dfu-util -d 1209:b1c0 -a 0 -D --reset hardware.bin

however, this then fails as the -D is not in front of hardware.bin. The correct command would be:

dfu-util -d 1209:b1c0 -a 0 --reset -D hardware.bin

I presonnally also get this error after the upload:

Resetting USB to switch back to Run-Time mode
dfu-util: error resetting after download: LIBUSB_ERROR_TIMEOUT

Because of this I have to dis- and reconnect the board for each upload.

Not sure if those things could be fixed by you or the guys from Apio. Just wanted to let you know.

Best Thomas

josuah commented 4 weeks ago

Many thanks @Thomas-51! There will be some work coming on the pico-ice, this will be the occasion to review it.