Skip to content

Commit

Permalink
add boards
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed May 28, 2019
1 parent c769695 commit 4a0dc40
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion helpAbout.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

versionMajor = 1
versionMinor = 1
versionDev = 0
versionDev = 1
date = "2019.5.10"

def strAbout():
Expand Down
18 changes: 15 additions & 3 deletions kflash_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion kflash_py
Submodule kflash_py updated 1 files
+3 −4 kflash.py
15 changes: 9 additions & 6 deletions parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("/")
Expand Down

0 comments on commit 4a0dc40

Please sign in to comment.