|
1 |
| -# Copyright 2023 NXP |
| 1 | +# Copyright 2023, 2025 NXP |
2 | 2 | # SPDX-License-Identifier: Apache-2.0
|
3 | 3 | """
|
4 | 4 | Runner for NXP S32 Debug Probe.
|
|
17 | 17 |
|
18 | 18 | from runners.core import BuildConfiguration, RunnerCaps, RunnerConfig, ZephyrBinaryRunner
|
19 | 19 |
|
20 |
| -NXP_S32DBG_USB_CLASS = 'NXP Probes' |
21 |
| -NXP_S32DBG_USB_VID = 0x15a2 |
22 |
| -NXP_S32DBG_USB_PID = 0x0067 |
23 |
| - |
| 20 | +NXP_S32DBG_USB_VID = 0x1FC9 |
| 21 | +NXP_S32DBG_USB_PID = 0x014D |
24 | 22 |
|
25 | 23 | @dataclass
|
26 | 24 | class NXPS32DebugProbeConfig:
|
@@ -133,8 +131,10 @@ def find_usb_probes() -> list[str]:
|
133 | 131 | # require priviledged permissions to access the device info
|
134 | 132 | macaddr_pattern = r'(?:[0-9a-f]{2}[:]){5}[0-9a-f]{2}'
|
135 | 133 | if platform.system() == 'Windows':
|
136 |
| - cmd = f'pnputil /enum-devices /connected /class "{NXP_S32DBG_USB_CLASS}"' |
137 |
| - serialid_pattern = f'instance id: +usb\\\\.*\\\\({macaddr_pattern})' |
| 134 | + cmd = 'pnputil /enum-devices /connected' |
| 135 | + serialid_pattern = 'instance id: +usb\\\\' \ |
| 136 | + f'VID_{NXP_S32DBG_USB_VID:04X}&PID_{NXP_S32DBG_USB_PID:04X}\\\\' \ |
| 137 | + f'({macaddr_pattern})'.lower() |
138 | 138 | else:
|
139 | 139 | cmd = f'lsusb -v -d {NXP_S32DBG_USB_VID:x}:{NXP_S32DBG_USB_PID:x}'
|
140 | 140 | serialid_pattern = f'iserial +.*({macaddr_pattern})'
|
@@ -192,10 +192,11 @@ def runtime_environment(self) -> dict[str, str] | None:
|
192 | 192 | """Execution environment used for the client process."""
|
193 | 193 | if platform.system() == 'Windows':
|
194 | 194 | python_lib = (self.s32ds_path / 'S32DS' / 'build_tools' / 'msys32'
|
195 |
| - / 'mingw32' / 'lib' / 'python2.7') |
| 195 | + / 'mingw64' / 'lib' / 'python3.10') |
196 | 196 | return {
|
197 | 197 | **os.environ,
|
198 |
| - 'PYTHONPATH': f'{python_lib}{os.pathsep}{python_lib / "site-packages"}' |
| 198 | + 'PYTHONPATH': f'{python_lib}{os.pathsep}{python_lib / "site-packages"}{os.pathsep}' |
| 199 | + f'{python_lib / "lib-dynload"}' |
199 | 200 | }
|
200 | 201 |
|
201 | 202 | return None
|
|
0 commit comments