diff --git a/pyocd/probe/cmsis_dap_probe.py b/pyocd/probe/cmsis_dap_probe.py index 42cbe46f6..8ef53da21 100644 --- a/pyocd/probe/cmsis_dap_probe.py +++ b/pyocd/probe/cmsis_dap_probe.py @@ -238,7 +238,11 @@ def associated_board_info(self) -> Optional["BoardInfo"]: assert target_device_name board = "Generic " + (part_number or target_device_name) - info = BoardInfo(name=board, target=target_device_name, vendor=vendor) + # If we also have the ID based info, then use the test binary from that. + binary_name = info.binary if (info is not None) else None + + # Create a new board info object with the data from the probe. + info = BoardInfo(name=board, target=target_device_name, vendor=vendor, binary=binary_name) return info