Merge pull request #2 from Martoni/master

Testing with JTAG-HS3
This commit is contained in:
Gwenhael Goavec-Merou 2019-11-19 16:27:44 +01:00 committed by GitHub
commit 51caac9600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,9 @@ Current support:
* Digilent arty Artix xc7a35ti (memory and spi flash)
* Lattice MachXO3LF Starter Kit LCMX03LF-6900C (flash)
Supported cables:
* JTAG-HS3: jtag programmer cable from digilent
## compile and install
This application uses **libftdi1**, so this library must be installed (and,

View File

@ -7,6 +7,7 @@
static std::map <std::string, FTDIpp_MPSSE::mpsse_bit_config > cable_list = {
{"digilent", {0x0403, 0x6010, 0xe8, 0xeb, 0x00, 0x60}},
{"digilent_hs3", {0x0403, 0x6014, 0x88, 0x8B, 0x20, 0x30}},
{"ft2232", {0x0403, 0x6010, 0x08, 0x0B, 0x08, 0x0B}},
{"altera", {0xcafe, 0xbebe, 0x08, 0x0B, 0x08, 0x0B}}
};

View File

@ -204,8 +204,8 @@ int FtdiJtag::read_write(unsigned char *tdi, unsigned char *tdo, int len, char l
unsigned char tx_buf[3] = {(unsigned char)(MPSSE_LSB | MPSSE_WRITE_NEG |
((tdi) ? MPSSE_DO_WRITE : 0) |
((tdo) ? (MPSSE_DO_READ | MPSSE_READ_NEG) : 0)),
((xfer - 1) & 0xff), // low
(((xfer - 1) >> 8) & 0xff)}; // high
static_cast<unsigned char>((xfer - 1) & 0xff), // low
static_cast<unsigned char>((((xfer - 1) >> 8) & 0xff))}; // high
flushTMS(true);