Skip to content

Commit 8bd0492

Browse files
committed
ROMTable: support archid-only component ID table entries.
If looking for a table entry with the part number fails, then look for an entry with partno=None. This allows pyocd to at least recognize the architecture of a component.
1 parent 604e1a9 commit 8bd0492

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pyocd/coresight/rom_table.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,14 @@ def read_id_registers(self):
154154
self.name = info.name
155155
self.factory = info.factory
156156
else:
157-
self.name = '???'
157+
# Try just the archid with no partno or devtype as backup.
158+
key = (self.designer, self.component_class, None, None, self.archid)
159+
info = COMPONENT_MAP.get(key, None)
160+
if info is not None:
161+
self.name = info.name
162+
self.factory = info.factory
163+
else:
164+
self.name = '???'
158165

159166
self.valid = True
160167

0 commit comments

Comments
 (0)