
GRMON3-UM
June 2019, Version 3.1.0
127
www.cobham.com/gaisler
35. flash - syntax
NAME
flash - Write, erase or show information about the flash
SYNOPSIS
flash
flash blank all
flash blank
start
?
stop
?
flash burst ?
boolean
?
flash erase all
flash erase
start
?
stop
?
flash load ?
options...
?
filename
?
address
? ?
cpu#
?
flash verify ?
options...
?
filename
?
address
?
flash lock all
flash lock
start
?
stop
?
flash lockdown all
flash lockdown
start
?
stop
?
flash query
flash scan ?
addr
?
flash status
flash unlock all
flash unlock
start
?
stop
?
flash wbuf
length
flash write
address
data
DESCRIPTION
GRMON supports programming of CFI compatible flash PROM attached to the external memory bus of LEON2
and LEON3 systems. Flash programming is only supported if the target system contains one of the following
memory controllers MCTRL, FTMCTRL, FTSRCTRL or SSRCTRL. The PROM bus width can be 8-, 16- or 32-
bit. It is imperative that the prom width in the MCFG1 register correctly reflects the width of the external prom. To
program 8-bit and 16-bit PROMs, the target system must also have at least one working SRAM or SDRAM bank.
When one of the flash commands are issued GRMON will probe for a CFI compatible memory at the beginning
of the PROM area. GRMON will only control one flash memory at the time. If there are multiple CFI compatible
flash memories connected to the PROM area, then it is possible to switch device using the command flash scan
addr
. If the PROM width or bank size is changed in the memory controller registers are changed, then GRMON
will discard any probed CFI information, and a new flash scan command have to be issued.
There are many different suppliers of CFI devices, and some implements their own command set. The command
set is specified by the CFI query register 14 (MSB) and 13 (LSB). The value for these register can in most cases
be found in the datasheet of the CFI device. GRMON supports the command sets that are listed in Table 3.4,
“Supported CFI command set” in section Section 3.11.1, “CFI compatible Flash PROM”.
The sub commands erase, lock, lockdown and unlock works on memory blocks (the subcommand blank have
the same parameters, but operates on addresses). These commands operate on the block that the
start
address
belong. If the
stop
parameter is also given the commands will operate on all the blocks between and including
the blocks that the
start
and
stop
belongs to. I.a the keyword 'all' can be given instead of the start address,
then the command will operate on the whole memory.
flash
Print the flash memory configuration.
flash blank all
flash blank
start
?
stop
?
Check that the flash memory is blank, i.e. can be re-programmed. See description above about the param-
eters.