From 63e9a2e0e11b71f36d09b7171cc00678c0568485 Mon Sep 17 00:00:00 2001 From: Erik Gilling Date: Wed, 7 Aug 2024 14:18:12 -0700 Subject: [PATCH] coresight: discovery: Avoid double offset in root component creation Because the APAccessMemoryInterface includes and offset and the component factory API includes an address base, the base address offset at cpmid.address was being applied twice. --- pyocd/coresight/discovery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyocd/coresight/discovery.py b/pyocd/coresight/discovery.py index becb2533c..9482f652f 100644 --- a/pyocd/coresight/discovery.py +++ b/pyocd/coresight/discovery.py @@ -262,7 +262,7 @@ def _create_root_component(self, cmpid): memif = APAccessMemoryInterface(self.dp, ap_address) # Instantiate the component and attach to the target. - component = cmpid.factory(memif, cmpid, cmpid.address) + component = cmpid.factory(memif, cmpid, 0) self.target.add_child(component) component.init() except exceptions.Error as e: