Python code questions #1679
Unanswered
RunSongham
asked this question in
Q&A
Replies: 1 comment
-
Here you go.
from pyocd.core.helpers import ConnectHelper
import prettytable
probes = ConnectHelper.get_all_connected_probes(blocking=False)
pt = prettytable.PrettyTable(["#", "Probe/Board", "Unique ID"])
pt.align = 'l'
pt.header = True
pt.border = True
pt.hrules = prettytable.HEADER
pt.vrules = prettytable.NONE
for index, probe in enumerate(probes):
pt.add_row([
str(index),
probe.product_name,
probe.unique_id,
])
print(pt)
from pyocd.target.pack import pack_target
import prettytable
packs = pack_target.ManagedPacks.get_installed_packs()
pt = prettytable.PrettyTable(["Pack", "Version", "Pack File"])
pt.align = 'l'
pt.header = True
pt.border = True
pt.hrules = prettytable.HEADER
pt.vrules = prettytable.NONE
for ref in packs:
pt.add_row([
f"{ref.vendor}.{ref.pack}",
ref.version,
ref.get_pack_name(),
])
print(pt) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
Developing a debug tool using gui as python.
Now you need to connect the j-link to perform the MCU flash write.
As I looked for information, I found out pyocd, and as I read the document, I don't know what I want in detail, so I ask.
Beta Was this translation helpful? Give feedback.
All reactions