program-ice40-flash
¶
glasgow run program-ice40-flash¶
Program the 25-series Flash memories found on many boards with iCE40 FPGAs. This applet is based on the memory-25x applet; in addition, it asserts the FPGA reset while programming the memory, and checks the CDONE pin to determine whether the FPGA has successfully read the configuration after the applet finishes.
See the description of the memory-25x applet for details.
usage: glasgow run program-ice40-flash [-h] [-V SPEC] [--cs PIN] [--io PINS]
[--sck PIN] [--reset PIN] [--done PIN]
[-f FREQ]
OPERATION ...
- -h, --help¶
show this help message and exit
- -V <spec>, --voltage <spec>¶
configure I/O port voltage to SPEC (e.g.: ‘3.3’, ‘A=5.0,B=3.3’, ‘A=SA’)
- --cs <pin>¶
bind the applet I/O line ‘cs’ to PIN (default: A5)
- --io <pins>¶
bind the applet I/O lines ‘copi’, ‘cipo’, ‘wp’, ‘hold’ to PINS (default: A2,A4,A3,A0)
- --sck <pin>¶
bind the applet I/O line ‘sck’ to PIN (default: A1)
- --reset <pin>¶
bind the applet I/O line ‘reset’ to PIN
- --done <pin>¶
bind the applet I/O line ‘done’ to PIN
- -f <freq>, --frequency <freq>¶
set SCK frequency to FREQ kHz (default: 12000)
glasgow run program-ice40-flash erase-block¶
usage: glasgow run program-ice40-flash erase-block [-h] ADDRESS [ADDRESS ...]
- address¶
erase block(s) starting at address ADDRESS
- -h, --help¶
show this help message and exit
glasgow run program-ice40-flash erase-chip¶
usage: glasgow run program-ice40-flash erase-chip [-h]
- -h, --help¶
show this help message and exit
glasgow run program-ice40-flash erase-program¶
usage: glasgow run program-ice40-flash erase-program [-h] -S SIZE -P SIZE
(-d DATA | -f FILENAME)
ADDRESS
- address¶
program memory starting at address ADDRESS
- -h, --help¶
show this help message and exit
- -S <size>, --sector-size <size>¶
erase memory in SIZE byte sectors
- -P <size>, --page-size <size>¶
program memory region using SIZE byte pages
- -d <data>, --data <data>¶
program memory with DATA as hex bytes
- -f <filename>, --file <filename>¶
program memory with contents of FILENAME
glasgow run program-ice40-flash erase-sector¶
usage: glasgow run program-ice40-flash erase-sector [-h] ADDRESS [ADDRESS ...]
- address¶
erase sector(s) starting at address ADDRESS
- -h, --help¶
show this help message and exit
glasgow run program-ice40-flash fast-read¶
usage: glasgow run program-ice40-flash fast-read [-h] [-f FILENAME]
ADDRESS LENGTH
- address¶
read memory starting at address ADDRESS, with wraparound
- length¶
read LENGTH bytes from memory
- -h, --help¶
show this help message and exit
- -f <filename>, --file <filename>¶
write memory contents to FILENAME
glasgow run program-ice40-flash identify¶
usage: glasgow run program-ice40-flash identify [-h]
- -h, --help¶
show this help message and exit
glasgow run program-ice40-flash program¶
usage: glasgow run program-ice40-flash program [-h] -P SIZE (-d DATA |
-f FILENAME)
ADDRESS
- address¶
program memory starting at address ADDRESS
- -h, --help¶
show this help message and exit
- -P <size>, --page-size <size>¶
program memory region using SIZE byte pages
- -d <data>, --data <data>¶
program memory with DATA as hex bytes
- -f <filename>, --file <filename>¶
program memory with contents of FILENAME
glasgow run program-ice40-flash program-page¶
usage: glasgow run program-ice40-flash program-page [-h] (-d DATA |
-f FILENAME)
ADDRESS
- address¶
program memory starting at address ADDRESS
- -h, --help¶
show this help message and exit
- -d <data>, --data <data>¶
program memory with DATA as hex bytes
- -f <filename>, --file <filename>¶
program memory with contents of FILENAME
glasgow run program-ice40-flash protect¶
usage: glasgow run program-ice40-flash protect [-h] [BITS]
- bits¶
set SR.BP[3:0] to BITS
- -h, --help¶
show this help message and exit
glasgow run program-ice40-flash read¶
usage: glasgow run program-ice40-flash read [-h] [-f FILENAME] ADDRESS LENGTH
- address¶
read memory starting at address ADDRESS, with wraparound
- length¶
read LENGTH bytes from memory
- -h, --help¶
show this help message and exit
- -f <filename>, --file <filename>¶
write memory contents to FILENAME
glasgow run program-ice40-flash verify¶
usage: glasgow run program-ice40-flash verify [-h] (-d DATA | -f FILENAME)
ADDRESS
- address¶
program memory starting at address ADDRESS
- -h, --help¶
show this help message and exit
- -d <data>, --data <data>¶
program memory with DATA as hex bytes
- -f <filename>, --file <filename>¶
program memory with contents of FILENAME