Skip to content

Commit

Permalink
probe: cmsis-dap: use test binary from builtin board data for v2.1 ba…
Browse files Browse the repository at this point in the history
…sed board info

If a CMSIS-DAP probe supports the v2.1 board and target info, but the
board also has builtin board ID based data, then use the test binary
name from the builtin data with the probe-supplied data.
  • Loading branch information
flit committed Jul 21, 2023
1 parent fdaf08a commit 142392e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyocd/probe/cmsis_dap_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 142392e

Please sign in to comment.