square / pylink

Python Library for device debugging/programming via J-Link
https://pylink.readthedocs.io/en/latest/
Other
346 stars 127 forks source link

Pylink locks up on connect command #176

Closed kellykan closed 1 year ago

kellykan commented 1 year ago

Will have further details tomorrow but maybe someone has come across this issue before:

  1. jlink=pylink.JLink()
  2. jlink.open() 3.jlink.connect('LPC54608J512',verbose=True,speed='auto') Runs fine from command prompt, runs fone from python terminal. Runs fine in virtual env.

However when run from Jenkins the connect command hangs and doesn't return hence Jenkins locks up. Any ideas?

kellykan commented 1 year ago

Code below: log_good.tx run from python terminal, log_bad.txt run from jenkins

import pylink

jlink = pylink.JLink()

product name for JLink

product_name = 'LPC54608J512' error = jlink.open() error = jlink.product_name print(error) jlink.oem error = jlink.opened() print(error) error = jlink.connected() print(error) error = jlink.target_connected() print(error) error = jlink.set_tif(pylink.enums.JLinkInterfaces.SWD) print(error) error = jlink.connect(product_name, speed='auto') print(error) jlink.close() [log_bad.txt](https://github.com/square/pylink/files/11541251/log_bad.txt) [log_good.txt](https://github.com/square/pylink/files/11541255/log_good.txt)

kellykan commented 1 year ago

this was found to be a hardware related error