jtag/drivers: Add support for CH347-based JTAG adapters
This adds general support for JTAG adapters based on the WCH CH347T and CH347F chips. The CH347T must be configured in mode 3 to provide both UART and JTAG interfaces. The CH347F exposes UART and JTAG directly. Similar to FTDI FT2232-based devices, the CH347T/F can be used for simultaneous UART and JTAG communication. The ch347 driver code is based on: https://github.com/WCHSoftGroup/ch347 Bug fixes and adjustments were made to align the code with OpenOCD style and ensure compatibility. The driver was integrated into the OpenOCD build system. The USB packet format was identified using public GitHub sources and documented here: https://www.easydevkits.com/wch-ch347-jtag-interface/ Change-Id: I5fca9dd015111e4410fea029611fdeedbb228fdb Signed-off-by: EasyDevKits <info@easydevkits.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7937 Tested-by: jenkins Reviewed-by: ZhiYuanNJ <871238103@qq.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
@@ -129,6 +129,7 @@ m4_define([ADAPTER_OPT], [m4_translit(ADAPTER_ARG($1), [_], [-])])
|
||||
|
||||
m4_define([USB1_ADAPTERS],
|
||||
[[[ftdi], [MPSSE mode of FTDI based devices], [FTDI]],
|
||||
[[ch347], [Mode 3 of CH347 based devices], [CH347]],
|
||||
[[stlink], [ST-Link Programmer], [HLADAPTER_STLINK]],
|
||||
[[ti_icdi], [TI ICDI JTAG Programmer], [HLADAPTER_ICDI]],
|
||||
[[ulink], [Keil ULINK JTAG Programmer], [ULINK]],
|
||||
@@ -724,6 +725,7 @@ AM_CONDITIONAL([INTERNAL_JIMTCL], [test "x$use_internal_jimtcl" = "xyes"])
|
||||
AM_CONDITIONAL([HAVE_JIMTCL_PKG_CONFIG], [test "x$have_jimtcl_pkg_config" = "xyes"])
|
||||
AM_CONDITIONAL([INTERNAL_LIBJAYLINK], [test "x$use_internal_libjaylink" = "xyes"])
|
||||
|
||||
|
||||
AM_CONDITIONAL([USE_GCOV], [test "x$enable_gcov" = "xyes"])
|
||||
|
||||
# Look for environ alternatives. Possibility #1: is environ in unistd.h or stdlib.h?
|
||||
|
||||
Reference in New Issue
Block a user