I’m using the latest SVN.
I introduced and optimized the USB protocol of USBprog and JLink.
From USBprog, I use the command to control the signals, but add a mask byte. From jlink, I use the command to do jtag operation, but change the order of data, so I can do jtag operation even when the command is receiving.
I notice it breaks the jlink license, so I’ll try to make another jtag commands totally different from jlink ones. For example, collect the commands form execute_queue() and send them to my JTAG tool directly without interpret them to jtag operations.
Will commands below OK?
/// OLINK_CMD_CONN
/// no parameters
/// return version string
#define OLINK_CMD_CONN 0x80
/// OLINK_CMD_DISCONN
/// no parameters
/// no return data
#define OLINK_CMD_DISCONN 0x81
/// OLINK_CMD_SET_SPEED
/// parameter 1(1 byte): jtag speed
/// no return data
#define OLINK_CMD_SET_SPEED 0x82
/// OLINK_CMD_OPENOCD
/// parameter 1(2 byte): length in bytes
/// parameter 2(n bytes): commands
/// return data
#define OLINK_CMD_OPENOCD 0x90
/// OLINK_OPENOCDCMD_SET_PORT
/// parameter 1(1 byte): port mask
/// parameter 2(1 byte): port data
/// no return data
#define OLINK_OPENOCDCMD_SET_PORT 0x00
/// OLINK_OPENOCDCMD_TMS
/// parameter 1(1 byte): length in bits
/// parameter 2(n bytes): tms data
/// no return data
#define OLINK_OPENOCDCMD_TMS 0x01
/// OLINK_OPENOCDCMD_JTAG_SCAN
/// parameter 1(2 bytes): length in bits
/// parameter 2(n bytes): tdi data
/// return data
#define OLINK_OPENOCDCMD_JTAG_SCAN 0x02