Skip to content

Commit 5eec8e8

Browse files
authored
probe: jlink: check if APv1 before accessing APSEL (pyocd#1819)
- JLink memory access commands only support an 8-bit APSEL
1 parent b0a7290 commit 5eec8e8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pyocd/probe/jlink_probe.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pyOCD debugger
2-
# Copyright (c) 2020 Arm Limited
2+
# Copyright (c) 2020,2025 Arm Limited
33
# Copyright (c) 2021-2022 Chris Reed
44
# Copyright (c) 2023 Marian Muller Rebeyrol
55
# SPDX-License-Identifier: Apache-2.0
@@ -28,6 +28,7 @@
2828
from ..core import exceptions
2929
from ..core.plugin import Plugin
3030
from ..core.options import OptionInfo
31+
from ..coresight.ap import APVersion
3132
from ..utility import conversion
3233
from ..utility.compatibility import to_str_safe
3334

@@ -457,10 +458,13 @@ def write_ap_multiple(self, addr, values):
457458

458459
def get_memory_interface_for_ap(self, ap_address):
459460
assert self._is_open
461+
# JLink memory access commands only support an 8-bit APSEL
462+
if ap_address.ap_version != APVersion.APv1:
463+
return None
460464
# JLink memory access commands only support AP 0
461465
if ap_address.apsel != 0:
462466
return None
463-
# JLink memory access commands require to be conneected to the target
467+
# JLink memory access commands require to be connected to the target
464468
if not self._link.target_connected():
465469
return None
466470
apsel = ap_address.apsel

0 commit comments

Comments
 (0)