src/eric7/MicroPython/UF2FlashDialog.py

branch
eric7
changeset 11167
a3f5af773bc7
parent 11122
9b2abac8e19f
child 11171
f7cb33253cbf
diff -r fd914f897dcf -r a3f5af773bc7 src/eric7/MicroPython/UF2FlashDialog.py
--- a/src/eric7/MicroPython/UF2FlashDialog.py	Sun Mar 09 14:16:35 2025 +0100
+++ b/src/eric7/MicroPython/UF2FlashDialog.py	Sat Mar 15 11:53:21 2025 +0100
@@ -538,7 +538,7 @@
                 ("XIAO-BOOT", "XIAO nRF52840"),
             ],
             (0x2886, 0x0045): [
-                ("XIAO-SENSE", "XIAO nRF52840"),
+                ("XIAO-SENSE", "XIAO nRF52840 Sense"),
             ],
             (0x2886, 0x0057): [
                 ("T1000-E", "T1000-E for Meshtastic"),
@@ -770,6 +770,31 @@
         "show_all": True,
         "firmware": "CircuitPython",
     },
+    "nrf52": {
+        "volumes": {
+            (0x2886, 0x0045): [
+                ("XIAO-SENSE", "XIAO nRF52840 Sense"),
+            ],
+        },
+        "instructions": QCoreApplication.translate(
+            "UF2FlashDialog",
+            "<h3>NRF52 Board</h3>"
+            "<p>In order to prepare the board for flashing follow these"
+            " steps:</p><ol>"
+            "<li>Switch your device to 'bootloader' mode by double-pressing"
+            " the reset button.</li>"
+            "<li>Wait until the device has entered 'bootloader' mode.</li>"
+            "<li>(If this does not happen, then try shorter or longer"
+            " pauses between presses.)</li>"
+            "<li>Ensure the boot volume is available (this may require"
+            " mounting it).</li>"
+            "<li>Select the firmware file to be flashed and click the"
+            " flash button.</li>"
+            "</ol>",
+        ),
+        "show_all": True,
+        "firmware": "MicroPython / CircuitPython",
+    },
     "rp2": {
         "volumes": {
             (0x0000, 0x0000): [
@@ -963,7 +988,11 @@
             self.on_devicesComboBox_currentIndexChanged(0)
         else:
             for index, (boardType, description, vidpid) in enumerate(sorted(devices)):
-                self.devicesComboBox.addItem(description)
+                self.devicesComboBox.addItem(
+                    self.tr("{0} ({1})", "board description, board type").format(
+                        description, boardType
+                    )
+                )
                 self.devicesComboBox.setItemData(index, boardType, self.DeviceTypeRole)
                 self.devicesComboBox.setItemData(index, vidpid, self.DeviceVidPidRole)
             self.devicesComboBox.addItem(self.tr("Manual Select"))
@@ -1015,7 +1044,7 @@
         Private method to show instructions for resetting devices to bootloader
         mode.
         """
-        self.infoLabel.setText(self.tr("Reset Instructions:"))
+        self.infoLabel.setText(self.tr("Flash Instructions:"))
 
         htmlText = self.tr(
             "<h4>No known devices detected.</h4>"
@@ -1038,7 +1067,7 @@
         """
         boardTypes = {x[0] for x in devices}
 
-        self.infoLabel.setText(self.tr("Reset Instructions:"))
+        self.infoLabel.setText(self.tr("Flash Instructions:"))
 
         if self.__boardType:
             htmlText = self.tr(
@@ -1070,7 +1099,7 @@
         @param boardType type of the board to show instructions for
         @type str
         """
-        self.infoLabel.setText(self.tr("Reset Instructions:"))
+        self.infoLabel.setText(self.tr("Flash Instructions:"))
 
         htmlText = self.tr(
             "<h4>No known devices detected.</h4>"
@@ -1132,7 +1161,7 @@
 
         if boardType:
             htmlText += self.tr(
-                "<h4>Reset Instructions</h4>"
+                "<h4>Flash Instructions</h4>"
                 "<p>Follow the instructions below to set the board into"
                 " 'bootloader' mode. Press <b>Refresh</b> when ready.</p>"
             )

eric ide

mercurial