From 4798d6b75084b7a9b304497952edacd48694e4f0 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 11 Nov 2019 18:38:10 +0100 Subject: [PATCH] tools/litex_term: remove automatic reboot when flashing and clear mem_regions to avoid re-flashing on next reboot(s) --- litex/tools/litex_term.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/litex/tools/litex_term.py b/litex/tools/litex_term.py index 68a4dff77..a71245d4c 100755 --- a/litex/tools/litex_term.py +++ b/litex/tools/litex_term.py @@ -143,7 +143,6 @@ class LiteXTerm: f.close() self.no_crc = no_crc self.flash = flash - self.ignore_download = False self.reader_alive = False self.writer_alive = False @@ -263,18 +262,14 @@ class LiteXTerm: return False def answer_magic(self): - if self.ignore_download: - self.ignore_download = False - return print("[LXTERM] Received firmware download request from the device.") if(len(self.mem_regions)): self.port.write(sfl_magic_ack) for filename, base in self.mem_regions.items(): self.upload(filename, int(base, 16)) if self.flash: - # ignore next download request to do a reboot to the flashed image - self.ignore_download = True - self.reboot() + # clear mem_regions to avoid re-flashing on next reboot(s) + self.mem_regions = {} else: self.boot() print("[LXTERM] Done.");