
GRMON3-UM
June 2019, Version 3.1.0
194
www.cobham.com/gaisler
spi flash help
Displays command list or additional information about a specific command.
spi flash detect
Try to detect type of memory device
spi flash dump
address
length
?
filename
?
Dumps
length
bytes, starting at
address
of the SPI-device (i.e. not AMBA address), to a file. The
default name of the file is "grmon-spiflash-dump.srec"
spi flash erase
spi flash erase
start
?
stop
?
Erase performs a bulk erase clearing the whole device or the blocks from address
start
to address
stop
.
spi flash fast
Enables or disables FAST READ command (memory device may not support this).
spi flash load ?
options...
?
filename
?
address
? ?
cpu#
?
Loads the contents in the file
filename
to the memory device. If the
address
is present, then binary files
will be stored at the
address
of the SPI-device (i.e. not AMBA address), otherwise binary files will be
written to the beginning of the device. The
cpu#
argument can be used to specify which CPU it belongs to.
The only available option is '-binary', which forces GRMON to interpret the file as binary file.
spi flash select ?
index
?
Select memory device. If
index
is not specified, a list of the supported devices is displayed.
spi flash set
pagesize
address_bytes
wren
wrdi
rdsr
wrsr
read
fast_read
pp
se
be
be-
bytes
Sets a custom memory device configuration. Issue spi flash show to see a list of the available parameters.
spi flash show
Shows current memory device configuration
spi flash ssval ?
value
?
Sets slave value to be used with the SPICTRL core. When GRMON wants to select the memory device
it will write this value to the slave select register. When the device is deselected, GRMON will write all
ones to the slave select register. Example: Set slave select line 0 to low, all other lines high when selecting
a device
grmon3> spi flash ssval 0xfffffffe
Note: This value is not used when communicating via the SPIMCTRL core, i.e. it is only valid for spi flash.
spi flash status
Displays device specific information
spi flash strict ?
boolean
?
Enable/Disable strict communication mode. Enable if programming fails. Strict communication mode may
be necessary when using very fast debug links or for SPI implementations with a slow SPI clock
spi flash verify ?
options...
?
filename
?
address
?
Verifies that data in the file
filename
matches data in memory device. If the
address
is present, then
binary files will be compared with data at the
address
of the SPI-device (i.e. not AMBA address), oth-
erwise binary files will be compared against data at the beginning of the device.
The
-binary
option forces GRMON to interpret the file as binary file.
The
-erase
option to automatically erase the flash before writing. It will only erase the sectors where
data will be written.
The
-max
option can be used to force GRMON to stop verifying when num errors have been found.
When the
-errors
option is specified, the verify returns a list of all errors instead of number of errors.
Each element of the list is a sublist whose format depends on the first item if the sublist. Possible errors
can be detected are memory verify error (MEM), read error (READ) or an unknown error (UNKNOWN).
The formats of the sublists are: MEM
address
read-value
expected-value
, READ
address
num-failed-addresses
, UNKNOWN
address
Upon successful completion spi flash verify returns the number of error detected. If the
-errors
has
been given, it returns a list of errors instead.