@@ -23,9 +23,7 @@ You can skip step 1 if this is the case.
2323
24243 . Convert the binary bitstream ` rgb_blink.bin ` into an UF2 ` rgb_blink.uf2 ` with the UF2 Utils:
2525
26- ``` shell
27- $ bin2uf2 -o rgb_blink.uf2 rgb_blink.bin
28- ```
26+ $ bin2uf2 -o rgb_blink.uf2 rgb_blink.bin
2927
30284 . Connect the pico-ice via USB and lookup the USB drive named ` pico-ice ` . Open it.
3129
@@ -48,17 +46,15 @@ You can skip step 1 if this is the case.
48463 . Check whether the Pico is recognized as a DFU device: ` dfu-util -l ` .
4947 This should list the pico-ice as a DFU device:
5048
51- ```
52- Found DFU: [1209:b1c0] ver=0100, devnum=105, cfg=1, intf=0, path=" 1-4.4" , alt=0, name=" iCE40 DFU (flash)" , serial=" DE62A435436F5939"
53- Found DFU: [1209:b1c0] ver=0100, devnum=105, cfg=1, intf=0, path=" 1-4.4" , alt=1, name=" iCE40 DFU (CRAM)" , serial=" DE62A435436F5939"
54- ```
49+ Found DFU: [1209:b1c0] ver=0100, devnum=105, cfg=1, intf=0, path="1-4.4", alt=0, name="iCE40 DFU (flash)", serial="DE62A435436F5939"
50+ Found DFU: [1209:b1c0] ver=0100, devnum=105, cfg=1, intf=0, path="1-4.4", alt=1, name="iCE40 DFU (CRAM)", serial="DE62A435436F5939"
5551
56524 . Download the FPGA bin file to the pico-ice.
5753 The Pico can be rebooted as soon as the download succeeds with the ` -R ` flag.
5854
59- ```
60- $ dfu-util -R -a 0 -D rgb_blink.bin
61- ```
55+ $ dfu-util --alt 0 --download rgb_blink.bin --reset # to flash
56+ $ dfu-util --alt 1 --download rgb_blink.bin # to volatile memory
57+
6258
6359## Using APIO
6460
@@ -72,26 +68,24 @@ On Windows, you will first need to setup the `libusbK` driver for `pico-ice DFU
7268[ with Zadig] ( https://zadig.akeo.ie/ ) or [ with UsbDriverTool] ( https://visualgdb.com/UsbDriverTool/ )
7369([ doc] ( https://github.com/FPGAwars/apio/wiki/Quick-start ) ).
7470
75- ```
76- # Download the latest APIO dev version (with pico-ice support):
77- pip3 install git+https://github.com/FPGAwars/apio
78-
79- # Download and install oss-cad-suite
80- apio install -a
71+ # Download the latest APIO dev version (with pico-ice support):
72+ pip3 install git+https://github.com/FPGAwars/apio
8173
82- # Build a new directory with a "blinky" example project inside
83- mkdir pico-ice-blinky; cd pico-ice-blinky
84- apio examples -f iCE40-UP5K/blink
74+ # Download and install oss-cad-suite
75+ apio install -a
76+
77+ # Build a new directory with a "blinky" example project inside
78+ mkdir pico-ice-blinky; cd pico-ice-blinky
79+ apio examples -f iCE40-UP5K/blink
8580
86- # Set the board to "pico-ice"
87- apio init --sayyes --board pico-ice
81+ # Set the board to "pico-ice"
82+ apio init --sayyes --board pico-ice
8883
89- # Build the project using yosys/nextpnr
90- apio build
84+ # Build the project using yosys/nextpnr
85+ apio build
9186
92- # Plug your pico-ice board and upload the blinky project to it
93- apio upload
94- ```
87+ # Plug your pico-ice board and upload the blinky project to it
88+ apio upload
9589
9690If ` apio upload ` fails, it is also possible to convert the ` .bin ` file to ` .uf2 `
9791with [ uf2-utils] ( https://github.com/tinyvision-ai-inc/uf2-utils/ )
@@ -114,39 +108,36 @@ Several pico-ice-sdk [examples](https://github.com/tinyvision-ai-inc/pico-ice-sd
114108On Windows, you can run these examples from the cygwin environment,
115109under which you can navigate to the example repositories and try them.
116110
117-
118-
119111You can access the utilities directly from a shell environment after adding the
120112` $OSS_CAD_SUITE ` to the ` $PATH ` .
121113
122114If you used ` apio ` to install OSS CAD Suite:
123115
124- ```
125- export OSS_CAD_SUITE="$HOME/.apio/packages/tools-oss-cad-suite"
126- export PATH="$PATH:$OSS_CAD_SUITE/bin"
127- ```
116+ export OSS_CAD_SUITE="$HOME/.apio/packages/tools-oss-cad-suite"
117+ export PATH="$PATH:$OSS_CAD_SUITE/bin"
128118
129119
130120## Troubleshooting
131121
122+
132123### Checking the CDONE pin
133124
134125Once the FPGA bitfile transfers over using the DFU protocol,
135126the Pico will check for whether the DONE pin goes high indicating a successful boot.
136127This would make the CDONE green LED bright.
137-
138128If this doesnt happen for whatever reason,
139129the DFU utility will throw an error indicating that this did not succeed.
140130
131+
141132### Booting the FPGA with custom firmware
142133
143134The user writing a custom firmware with the pico-ice-sdk should take care of starting the FPGA from the MCU.
144135Review the [ pico_fpga] ( https://github.com/tinyvision-ai-inc/pico-ice-sdk/tree/main/examples/pico_fpga ) example
145136for how this can be done, as well as the [ ice_fpga] ( group__ice__fpga.html ) library documentation.
146-
147137The USB DFU provided as part of the pico-ice-sdk must also be enabled for the DFU interface to show-up.
148138The [ pico_usb_uart example] ( https://github.com/tinyvision-ai-inc/pico-ice-sdk/tree/main/examples/pico_usb_uart ) project have it enabled by default.
149139
140+
150141### Cannot open DFU device 1209: b1c0 found on devnum 61 (LIBUSB_ERROR_NOT_FOUND)
151142
152143This error might occur when a communication error occurs.
@@ -159,37 +150,31 @@ This error might occur when a communication error occurs.
159150
160151To create an udev rule, add a file named ` /etc/udev/rules.d/99-pico-ice.rules ` with this content:
161152
162- ```
163- SUBSYSTEM=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="b1c0", MODE="0666"
164- ```
153+ SUBSYSTEM=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="b1c0", MODE="0666"
165154
166155Then reboot or run the following commands:
167156
168- ```
169- sudo udevadm control --reload-rules
170- sudo udevadm trigger
171- ```
157+ sudo udevadm control --reload-rules
158+ sudo udevadm trigger
159+
172160
173161### dfu-util has multiple devices
174162
175163For devices with multiple DFU devices connected, the ` --device 1209:b1c0 ` flag is needed:
176164
177- ```
178- dfu-util --reset --alt 0 --download rgb_blink.bin --device 1209: b1c0
179- ```
165+ dfu-util --alt 0 --download rgb_blink.bin --reset --device 1209:b1c0
180166
181167Alternatively, the ` dfu-util --list ` result will allow selecting a device per number:
182168
183- ```
184- dfu-util --reset --alt 0 --download rgb_blink.bin --devnum 0
185- ```
169+ dfu-util --alt 0 --download rgb_blink.bin --reset --devnum 0
170+
186171
187172### dfu-util is stuck while uploading before anything could be sent
188173
189174This could be due that there was no response from the flash chip, and the RP2040 is endlessy waiting the write confirmation.
190-
191175If you had an earlier board, it could be due to the fact the TX and RX pins were swapped, and do not work for the old board anymore.
192176
177+
193178### Flashing an UF2 file does not change the memory neither restart the board
194179
195180The UF2 file format contains the destination addresses of each block.
@@ -199,6 +184,7 @@ Try to copy the CURRENT.UF2 to NEW.UF2 upon that same directory, and unmount the
199184This should trigger a restart of the device.
200185This restart device should appear from the debug UART: ` board_dfu_complete: rebooting ` .
201186
187+
202188### Device's firmware is corrupt. It cannot return to run-time (non-DFU) operations.
203189
204190This message sometimes comes from ` dfu-util ` when the ` -R ` flag is not used.
0 commit comments