782 }, |
782 }, |
783 "nrf52": { |
783 "nrf52": { |
784 "volumes": { |
784 "volumes": { |
785 (0x239A, 0x0029): [ |
785 (0x239A, 0x0029): [ |
786 ("FTHR840BOOT", "Feather nRF52840 Express"), |
786 ("FTHR840BOOT", "Feather nRF52840 Express"), |
|
787 ("MDK840DONGL", "MDK nRF52840 USB Dongle"), |
|
788 ], |
|
789 (0x239A, 0x0063): [ |
|
790 ("NANO33BOOT", "Nano 33 BLE"), |
|
791 ], |
|
792 (0x239A, 0x00DA): [ |
|
793 ("XENONBOOT ", "Particle Xenon"), |
787 ], |
794 ], |
788 (0x2886, 0x0045): [ |
795 (0x2886, 0x0045): [ |
789 ("XIAO-SENSE", "XIAO nRF52840 Sense"), |
796 ("XIAO-SENSE", "XIAO nRF52840 Sense"), |
790 ], |
797 ], |
791 }, |
798 }, |
864 boardTypes = [boardType] if boardType else list(SupportedUF2Boards) |
871 boardTypes = [boardType] if boardType else list(SupportedUF2Boards) |
865 for board in boardTypes: |
872 for board in boardTypes: |
866 for vidpid, volumes in SupportedUF2Boards[board]["volumes"].items(): |
873 for vidpid, volumes in SupportedUF2Boards[board]["volumes"].items(): |
867 for volume, description in volumes: |
874 for volume, description in volumes: |
868 if OSUtilities.isWindowsPlatform(): |
875 if OSUtilities.isWindowsPlatform(): |
869 if FileSystemUtilities.findVolume(volume, findAll=True): |
876 if FileSystemUtilities.findVolume( |
|
877 volume, findAll=True, markerFile="INFO_UF2.TXT" |
|
878 ): |
870 foundDevices.add((board, description, vidpid)) |
879 foundDevices.add((board, description, vidpid)) |
871 else: |
880 else: |
872 # check only user mounted devices on non-Windows systems |
881 # check only user mounted devices on non-Windows systems |
873 for userMount in userMounts: |
882 for userMount in userMounts: |
874 if os.path.basename(userMount).startswith(volume): |
883 if os.path.basename(userMount).startswith(volume): |
1267 self.bootPicker.clear() |
1276 self.bootPicker.clear() |
1268 else: |
1277 else: |
1269 volumes = SupportedUF2Boards[boardType]["volumes"][vidpid] |
1278 volumes = SupportedUF2Boards[boardType]["volumes"][vidpid] |
1270 foundVolumes = [] |
1279 foundVolumes = [] |
1271 for volume, _ in volumes: |
1280 for volume, _ in volumes: |
1272 foundVolumes += FileSystemUtilities.findVolume(volume, findAll=True) |
1281 foundVolumes += FileSystemUtilities.findVolume( |
|
1282 volume, findAll=True, markerFile="INFO_UF2.TXT" |
|
1283 ) |
1273 |
1284 |
1274 if len(foundVolumes) == 0: |
1285 if len(foundVolumes) == 0: |
1275 self.__showNoVolumeInformation([v[0] for v in volumes], boardType) |
1286 self.__showNoVolumeInformation([v[0] for v in volumes], boardType) |
1276 self.bootPicker.clear() |
1287 self.bootPicker.clear() |
1277 elif len(foundVolumes) == 1: |
1288 elif len(foundVolumes) == 1: |
1314 for boardType in SupportedUF2Boards: |
1325 for boardType in SupportedUF2Boards: |
1315 for volumes in SupportedUF2Boards[boardType]["volumes"].values(): |
1326 for volumes in SupportedUF2Boards[boardType]["volumes"].values(): |
1316 for volume, _ in volumes: |
1327 for volume, _ in volumes: |
1317 if OSUtilities.isWindowsPlatform(): |
1328 if OSUtilities.isWindowsPlatform(): |
1318 foundBootVolumes.update( |
1329 foundBootVolumes.update( |
1319 FileSystemUtilities.findVolume(volume, findAll=True) |
1330 FileSystemUtilities.findVolume( |
|
1331 volume, findAll=True, markerFile="INFO_UF2.TXT" |
|
1332 ) |
1320 ) |
1333 ) |
1321 else: |
1334 else: |
1322 # check only user mounted devices on non-Windows systems |
1335 # check only user mounted devices on non-Windows systems |
1323 for userMount in userMounts: |
1336 for userMount in userMounts: |
1324 if os.path.basename(userMount).startswith(volume): |
1337 if os.path.basename(userMount).startswith(volume): |