Skip to content

Commit 1171ba4

Browse files
authored
Merge pull request #305 from Infineon/temp/xmcflasher_patch
Fix: Cannot find JLink device in Linux
2 parents f5e7ace + 85b1767 commit 1171ba4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/xmc-flasher.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from serial.tools.list_ports import comports
33
from xmc_data import xmc_master_data
44

5-
version = '0.1.2'
5+
version = '0.1.3'
66

77
jlinkexe = ''
88

@@ -40,8 +40,9 @@ def set_environment():
4040
def discover_jlink_devices():
4141
ports = comports()
4242
port_sn_list = []
43+
jlink_pattern = r'[Jj][-\s]?[Ll][Ii][Nn][Kk]'
4344
for p in ports:
44-
if "JLink" in p.description:
45+
if re.search(jlink_pattern, p.description):
4546
port_sn_list.append((p.device, p.serial_number))
4647

4748
return port_sn_list

0 commit comments

Comments
 (0)