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
Short comment first - thanks so much for this library, I spent a while playing with various JTAG boundary scan options and it's frustrating how hard it is to toggle some IO pins for testing with other tools. I came close to buying some of the very expensive tools even but they wouldn't provide enough up-front information.
jtag = JTAGCore()
probes = jtag.get_probe_names()
jtag.open_probe(probes[b"USB JLINK ARM"])
jtag.scan_init_chain()
numdev = jtag.get_number_devices()
print("Found %d devices."%numdev)
for n in range(0, numdev):
print("Device %d: %x"%(n, jtag.get_devid(n)))
jtag.bsdl_attach(r"bsdl_files/STM32F405_415_407_417_WLCSP90.bsd", 1)
total_pins = jtag.pins_get_number(1)
for pinid in range(0, total_pins):
pinname, pinprop = jtag.pin_get_properties(1, pinid)
print("{:3d} {} {}".format(pinid, pinname, pinprop))
jtag.set_scan_mode(1, "passive")
jtag.scan() #Get updated pin status
print(jtag.pin_get_state(1, "PA9")) #Print status of a pin
jtag.set_scan_mode(1, "active")
jtag.pin_set_state(1, "PA11", True) #set pin high (active out)
jtag.pin_set_state(1, "PA11", False) #Set pin low (active out)
jtag.pin_set_state(1, "PA11", None) #Set pin to high-z
I've included my library build in that repo to make it easier for other people to use. I had a few issues I ran into - I can open separate issues for them or just paste as comments here, roughly around:
Library segfaulted because script_printf was set to null and isn't checked (I routed it to just not print)
Windows build would hang checking drv_LPT_libGetDrv so I commented them out (I'm nowhere near LPTs these days)
Would be nice to have 64-bit build, as most Python these days is 64-bit versions (and it can't call a 32-bit library)
Finally - do you want to have the Python interface as part of the repo (i.e. - I can open a PR once it's cleaner)? If you're not using Python you might be hesitant too for future support. I can start it as a separate project if you prefer, but it makes more sense to have it here to me (especially to keep any changes in the library & Python API in sync).
The text was updated successfully, but these errors were encountered:
I'm going to be reorganizing the python module - I decided in the end it might be easier keeping the python side in a separate project (which could work with other backends later). Could still easily add the "core" part to this project - I'm open. For now I'll keep all my Python stuff separate to avoid problems!
I read your article on Circuit Cellar and share your interest in this codebase as an extensible library of JTAG boundary scan algorithms. Take a look at my pull request. Does this offer a simpler way to build your Python3 interface?
Short comment first - thanks so much for this library, I spent a while playing with various JTAG boundary scan options and it's frustrating how hard it is to toggle some IO pins for testing with other tools. I came close to buying some of the very expensive tools even but they wouldn't provide enough up-front information.
I'm adding a Python interface to this library, so far it seems to work OK (tested on Windows 10 w/ JLINK). See https://github.com/colinoflynn/jtag-boundary-scanner/tree/python-interface/pylibjtag
You use it something like this:
I've included my library build in that repo to make it easier for other people to use. I had a few issues I ran into - I can open separate issues for them or just paste as comments here, roughly around:
script_printf
was set to null and isn't checked (I routed it to just not print)drv_LPT_libGetDrv
so I commented them out (I'm nowhere near LPTs these days)Finally - do you want to have the Python interface as part of the repo (i.e. - I can open a PR once it's cleaner)? If you're not using Python you might be hesitant too for future support. I can start it as a separate project if you prefer, but it makes more sense to have it here to me (especially to keep any changes in the library & Python API in sync).
The text was updated successfully, but these errors were encountered: