Skip to content

Commit

Permalink
Merge pull request #2 from Martoni/master
Browse files Browse the repository at this point in the history
Testing with JTAG-HS3
  • Loading branch information
trabucayre authored Nov 19, 2019
2 parents 0a604ba + f8a1ae1 commit 51caac9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions cable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
};
Expand Down
4 changes: 2 additions & 2 deletions ftdijtag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 51caac9

Please sign in to comment.