diff --git a/helpAbout.py b/helpAbout.py index 8a73383..e89f404 100644 --- a/helpAbout.py +++ b/helpAbout.py @@ -5,7 +5,7 @@ versionMajor = 1 versionMinor = 1 -versionDev = 0 +versionDev = 1 date = "2019.5.10" def strAbout(): diff --git a/kflash_gui.py b/kflash_gui.py index 2497982..de8bd5c 100644 --- a/kflash_gui.py +++ b/kflash_gui.py @@ -140,10 +140,13 @@ def initWindow(self): self.boardCombobox = ComboBox() self.boardCombobox.addItem(parameters.SipeedMaixDock) self.boardCombobox.addItem(parameters.SipeedMaixBit) + self.boardCombobox.addItem(parameters.SipeedMaixBitMic) self.boardCombobox.addItem(parameters.SipeedMaixduino) self.boardCombobox.addItem(parameters.SipeedMaixGo) self.boardCombobox.addItem(parameters.SipeedMaixGoD) - self.boardCombobox.addItem(parameters.KendriteKd233) + self.boardCombobox.addItem(parameters.KendryteKd233) + self.boardCombobox.addItem(parameters.kendryteTrainer) + self.boardCombobox.addItem(parameters.Auto) self.burnPositionLabel = QLabel(tr("BurnTo")) self.burnPositionCombobox = ComboBox() self.burnPositionCombobox.addItem(tr("Flash")) @@ -439,8 +442,14 @@ def download(self): board = "maixduino" elif boardText == parameters.SipeedMaixBit: board = "bit" - elif boardText == parameters.KendriteKd233: + elif boardText == parameters.SipeedMaixBitMic: + board = "bit_mic" + elif boardText == parameters.KendryteKd233: board = "kd233" + elif boardText == parameters.kendryteTrainer: + board = "trainer" + elif boardText == parameters.Auto: + board = None sram = False if self.burnPositionCombobox.currentText()==tr("SRAM") or \ @@ -480,7 +489,10 @@ def flashBurnProcess(self, dev, baud, board, sram, filename, callback, color): success = True errMsg = "" try: - self.kflash.process(terminal=False, dev=dev, baudrate=baud, board=board, sram = sram, file=filename, callback=callback, noansi=not color) + if board: + self.kflash.process(terminal=False, dev=dev, baudrate=baud, board=board, sram = sram, file=filename, callback=callback, noansi=not color) + else: + self.kflash.process(terminal=False, dev=dev, baudrate=baud, sram = sram, file=filename, callback=callback, noansi=not color) except Exception as e: errMsg = str(e) if str(e) != "Burn SRAM OK": diff --git a/kflash_py b/kflash_py index 60b9cb6..4352cb7 160000 --- a/kflash_py +++ b/kflash_py @@ -1 +1 @@ -Subproject commit 60b9cb6fbe149ae182e2e89680df43d093fae908 +Subproject commit 4352cb756e676bf1729e5b14604b908692bcebae diff --git a/parameters.py b/parameters.py index 732c315..1069707 100644 --- a/parameters.py +++ b/parameters.py @@ -10,12 +10,15 @@ translationPath = "assets/translation" configFilePath = "kflash_gui.conf" -SipeedMaixDock = "Sipeed Maix Dock" -SipeedMaixBit = "Sipeed Maix Bit" -SipeedMaixGo = "Sipeed Maix Go" -SipeedMaixGoD = "Sipeed Maix Go( Old CMSIS-DAP )" -SipeedMaixduino= "Sipeed Maixduino" -KendriteKd233 = "Kendryte KD233" +SipeedMaixDock = "Sipeed Maix Dock" +SipeedMaixBit = "Sipeed Maix Bit" +SipeedMaixBitMic = "Sipeed Maix Bit ( with Mic )" +SipeedMaixGo = "Sipeed Maix Go ( open-ec & new CMSIS-DAP )" +SipeedMaixGoD = "Sipeed Maix Go ( Old CMSIS-DAP )" +SipeedMaixduino = "Sipeed Maixduino" +KendryteKd233 = "Kendryte KD233" +kendryteTrainer = "kendryte Trainer" +Auto = "Auto" # get data path pathDirList = sys.argv[0].replace("\\", "/").split("/")