Skip to content

Commit beed80d

Browse files
committed
[ot] scripts/opentitan: spidevflash.py: only emit powerdown command when requested.
The power down command is not supported by the regular BootROM Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
1 parent 2c4df6e commit beed80d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/opentitan/spidevflash.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ def main():
142142
help=f'synchronization max time (default: '
143143
f'{SpiDeviceFlasher.DEFAULT_SYNC_TIME:.1f}'
144144
f's)')
145+
argparser.add_argument('-t', '--terminate', action='store_true',
146+
help='terminate QEMU VM on completion')
145147
argparser.add_argument('-r', '--host',
146148
help='remote host name (default: localhost)')
147149
argparser.add_argument('-p', '--port', type=int,
@@ -174,7 +176,8 @@ def main():
174176
data = args.file.read()
175177
args.file.close()
176178
flasher.program(data, args.address)
177-
flasher.disconnect()
179+
if args.terminate:
180+
flasher.disconnect()
178181

179182
sys.exit(0)
180183
# pylint: disable=broad-except

0 commit comments

Comments
 (0)