You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've been using pylink on a couple boards and it's been working pretty well so far! However, today one of my boards got in a bad state where RTT can't be used with it. My code has:
jlink.rtt_read(0, 1024)
and the stacktrace I get is:
File "/home/jsmith/.local/lib/python3.10/site-packages/pylink/jlink.py", line 142, in wrapper
return func(self, *args, **kwargs)
File "/home/jsmith/.local/lib/python3.10/site-packages/pylink/jlink.py", line 5111, in rtt_read
raise errors.JLinkRTTException(bytes_read)
File "/home/jsmith/.local/lib/python3.10/site-packages/pylink/errors.py", line 38, in __init__
message = self.to_string(code)
File "/home/jsmith/.local/lib/python3.10/site-packages/pylink/enums.py", line 264, in to_string
return super(JLinkRTTErrors, cls).to_string(error_code)
File "/home/jsmith/.local/lib/python3.10/site-packages/pylink/enums.py", line 96, in to_string
raise ValueError('Invalid error code: %d' % error_code)
ValueError: Invalid error code: -11
It looks like the J-Link DLL is returning error code -11 but this library doesn't know how to interpret that? btw, it's worked fine with this same board and script in the past.
The text was updated successfully, but these errors were encountered:
Hey i have the same problem.
It seems to be a usage error. i can reproduce it by attaching a jlink to my mcu.
have the rtt_read() running in a thread.
then connect with the wrong device selected using jlink.connect.
then connect with the right device and program that device (i used a script for programming called by subprocess).
It gives the same exception traceback.
So i fixed it by first disconnecting before connecting to a new device.
I hope this helps someone
Hi, I've been using pylink on a couple boards and it's been working pretty well so far! However, today one of my boards got in a bad state where RTT can't be used with it. My code has:
and the stacktrace I get is:
It looks like the J-Link DLL is returning error code -11 but this library doesn't know how to interpret that? btw, it's worked fine with this same board and script in the past.
The text was updated successfully, but these errors were encountered: