Skip to content

Instantly share code, notes, and snippets.

@natevw
Created September 15, 2021 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natevw/20def32e66f4ee95f92d37c2966f80f7 to your computer and use it in GitHub Desktop.
Save natevw/20def32e66f4ee95f92d37c2966f80f7 to your computer and use it in GitHub Desktop.
UPduino 3.0 programming failures
wget -O fpga-toolchain.tar.xz https://github.com/YosysHQ/fpga-toolchain/releases/download/nightly-20210817/fpga-toolchain-linux_x86_64-nightly-20210817.tar.xz
docker build . -t fpga-toolchain
FROM alpine:3.14
ADD fpga-toolchain.tar.xz /opt/
ENV PATH="/opt/fpga-toolchain/bin:${PATH}"
$ docker run --device=/dev/bus/usb/003/010 -v "$(pwd)":/data -it fpga-toolchain
/ # iceprog -v -s -p /data/rgb_blink.bin
init..
cdone: low
reset..
cdone: low
read flash ID..
flash ID: 0xEF 0x70 0x16 0x00
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
disable flash protection...
waiting..rrR
file size: 104090
status before enable:
^C
/ # iceprog -v -p /data/rgb_blink.bin
init..
cdone: low
reset..
cdone: low
read flash ID..
flash ID: 0xEF 0x70 0x16 0x00
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
disable flash protection...
waiting..rrR
file size: 104090
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
erase 64kB sector at 0x000000..
Status after block erase:
SR1: 0x03
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Busy
waiting.....rrR
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
erase 64kB sector at 0x010000..
Status after block erase:
SR1: 0x03
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Busy
waiting....rrR
programming..
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
prog 0x000000 +0x100..
ff 00 00 ff 7e aa 99 7e 51 00 01 05 92 00 20 62 02 b3 82 00 00 72 01 50 11 00 01 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
waiting..rrR
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
prog 0x000100 +0x100..
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
waiting..rrR
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
prog 0x000200 +0x100..
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
waiting..rrR
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
prog 0x000300 +0x100..
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
waiting..rrR
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
prog 0x000400 +0x100..
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
waiting..r
$ docker run --device=/dev/bus/usb/003/008 -v "$(pwd)":/data -it fpga-toolchain
/ # iceprog -v -p /data/
Makefile rgb_blink.bin rgb_blink.hex rgb_blink.v
/ # iceprog -v -p /data/rgb_blink.bin
init..
cdone: low
reset..
cdone: low
read flash ID..
flash ID: 0xEF 0x70 0x16 0x00
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
^C
/ # iceprog -v -p /data/rgb_blink.bin
init..
cdone: low
reset..
cdone: low
read flash ID..
flash ID: 0xEF 0x70 0x16 0x00
status before enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
disable flash protection...
waiting..rrR
file size: 104090
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
erase 64kB sector at 0x000000..
Status after block erase:
SR1: 0x03
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Busy
waiting.....rrR
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
erase 64kB sector at 0x010000..
Status after block erase:
SR1: 0x03
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Busy
waiting...
# iceprog -v /data/rgb_blink.bin
init..
cdone: low
reset..
cdone: low
read flash ID..
flash ID: 0xEF 0x70 0x16 0x00
file size: 104090
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
erase 64kB sector at 0x000000..
Status after block erase:
SR1: 0x03
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Busy
waiting..
$ docker run --device=/dev/bus/usb/003/004 -v "$(pwd)":/data -it fpga-toolchain iceprog -v /data/rgb_blink.bin
init..
cdone: low
reset..
cdone: low
read flash ID..
flash ID: 0xEF 0x70 0x16 0x00
file size: 104090
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
erase 64kB sector at 0x000000..
Status after block erase:
SR1: 0x03
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Busy
waiting........rrR
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
erase 64kB sector at 0x010000..
Status after block erase:
SR1: 0x03
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Busy
waiting......rrR
programming..
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
prog 0x000000 +0x100..
ff 00 00 ff 7e aa 99 7e 51 00 01 05 92 00 20 62 02 b3 82 00 00 72 01 50 11 00 01 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
waiting..rrR
status before enable:
SR1: 0x00
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Not write enabled
- ~RDY: Ready
write enable..
status after enable:
SR1: 0x02
- SPRL: unlocked
- SPM: Byte/Page Prog Mode
- EPE: Erase/Prog success
- SPM: ~WP asserted
- SWP: All sectors unprotected
- WEL: Write enabled
- ~RDY: Ready
prog 0x000100 +0x100..
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
waiting..r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment