diff options
author | Andrey Yurovsky <yurovsky@gmail.com> | 2014-03-07 17:16:52 -0800 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2014-03-29 07:12:42 +0000 |
commit | fb897cc805fe193a1ee2f295f284e421660793d5 (patch) | |
tree | 4d592e75336940a424097818a11629b14de5d697 /contrib | |
parent | a5ef7b83e2a729d9442801f34314b911e3ed1e9f (diff) | |
download | riscv-openocd-fb897cc805fe193a1ee2f295f284e421660793d5.zip riscv-openocd-fb897cc805fe193a1ee2f295f284e421660793d5.tar.gz riscv-openocd-fb897cc805fe193a1ee2f295f284e421660793d5.tar.bz2 |
jlink: add support for Jlink-OB (0x0105) devices
The JLink-OB (onboard) devices work the same way as the normal JLink
except that their PID is 0x0105 (and that's the only one we know of so
far) and their endpoint addresses are different due to there being a
CDC-ACM interface as well. These JLink-OB devices show up on a lot of
vendors' development kits as an integrated debugger.
This change simply checks whether the adapter we opened has a JLink-OB
PID and, if it does, uses the JLink-OB endpoints rather than the
default. To do this, we add a new routine, jtag_libusb_get_pid() to the
libusb adapter layer, it in turn just calls
libusb_get_device_descriptor(), which previously had no wrapper.
Also, checkpatch.pl doesn't like the VID/PID macros as defined so I
moved them to the array itself. This should have no effect on the code.
This change adds the 0102 through 0104 PIDs to openocd.rules as well as this
new 0105 PID.
Tested on an Atmel SAM4S Xplained board which has a JLink-OB, also
regression tested by using a 0x0101 PID normal JLink adapter.
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Change-Id: I121d30e57729cda3adb66e2a5dc72e1fcb7ef8b1
Reviewed-on: http://openocd.zylin.com/2031
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/99-openocd.rules | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/99-openocd.rules b/contrib/99-openocd.rules index 44ab9cc..b5a5e68 100644 --- a/contrib/99-openocd.rules +++ b/contrib/99-openocd.rules @@ -77,6 +77,12 @@ ATTRS{idVendor}=="0fbb", ATTRS{idProduct}=="1000", MODE="664", GROUP="plugdev" # IAR J-Link USB ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0101", MODE="664", GROUP="plugdev" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0102", MODE="664", GROUP="plugdev" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0103", MODE="664", GROUP="plugdev" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0104", MODE="664", GROUP="plugdev" + +# J-Link-OB (onboard) +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0105", MODE="664", GROUP="plugdev" # Raisonance RLink ATTRS{idVendor}=="138e", ATTRS{idProduct}=="9000", MODE="664", GROUP="plugdev" |