eric6/MicroPython/EspDevices.py

changeset 8205
4a0f1f896341
parent 8185
c9acf46b54ce
child 8218
7c09585bd960
equal deleted inserted replaced
8204:fd477cded1c1 8205:4a0f1f896341
200 """ 200 """
201 from .EspFirmwareSelectionDialog import EspFirmwareSelectionDialog 201 from .EspFirmwareSelectionDialog import EspFirmwareSelectionDialog
202 dlg = EspFirmwareSelectionDialog() 202 dlg = EspFirmwareSelectionDialog()
203 if dlg.exec() == QDialog.DialogCode.Accepted: 203 if dlg.exec() == QDialog.DialogCode.Accepted:
204 chip, firmware, baudRate, flashMode, _ = dlg.getData() 204 chip, firmware, baudRate, flashMode, _ = dlg.getData()
205 if chip not in ("esp8266", "esp32"):
206 raise ValueError(self.tr("Unsupported chip type '{0}'.")
207 .format(chip))
208
205 if chip == "esp8266": 209 if chip == "esp8266":
206 flashAddress = "0x0000" 210 flashAddress = "0x0000"
207 elif chip == "esp32": 211 elif chip == "esp32":
208 flashAddress = "0x1000" 212 flashAddress = "0x1000"
209 else: 213
210 raise ValueError(self.tr("Unsupported chip type '{0}'.")
211 .format(chip))
212 flashArgs = [ 214 flashArgs = [
213 "-u", 215 "-u",
214 "-m", "esptool", 216 "-m", "esptool",
215 "--chip", chip, 217 "--chip", chip,
216 "--port", self.microPython.getCurrentPort(), 218 "--port", self.microPython.getCurrentPort(),

eric ide

mercurial