• Stars
    star
    148
  • Rank 249,983 (Top 5 %)
  • Language
    C
  • License
    Other
  • Created almost 13 years ago
  • Updated over 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Yes, your Arduino can replace an expensive JTAG cable!

The JTAG Whisperer

With this library, your Arduino is an XSVF player. Use it to program CPLDs and FPGAs!

Warning

Most Arduinos are 5-volt devices. Many JTAG devices are not 5-volt devices and will die if they get anywhere near 5 volts. Be sure your device is 5-volt tolerant or that you use an appropriate buffer for the I/O lines!

Instructions

You'll need Python on your desktop, as well as the Python library pyserial (try easy_install pyserial or pip install pyserial to get it). You'll also need a target JTAG-speaking board of some kind, an Arduino, and four jumpers to connect four of the Arduino pins to your target board's JTAG headers.

  1. Find your Arduino IDE's sketches directory. This is the directory where you keep your own sketches.

  2. If there isn't already one, create a libraries directory inside the sketches directory.

  3. Unzip the project archive into libraries. It should end up looking like this: [Your Arduino sketches directory]/libraries/JTAGWhisperer/JTAGWhisperer.h (etc.)

  4. Restart your Arduino IDE and you should see JTAGWhisperer among the libraries in the Sketch -> Import Library... menu.

  5. Open the example JTAGWhisperer sketch. Upload it to your Arduino.

  6. Get a Xilinx XC9572XL CPLD. Hook up your CPLD's JTAG pins to the Arduino: pins 8, 9, 10, 11 to TMS, TDI, TDO, and TCK, respectively. (If you have TCK on pin 11, you probably did it right.) On an Arduino MEGA or MEGA2560, use pins 53, 52, 51, 50 accordingly. Re-read the warning above about I/O voltage. You just hooked up 5-volt I/O to your device, and that might let out the magic smoke!

  7. Apply power to the CPLD (note that the XC9500XL series are 3.3-volt devices!). Do not forget to set the '9572 VIO to 3.3V. DID I REMIND YOU THAT VOLTAGES MATTER? Try asking it its device ID as follows, from the root of the source directory:

./send_xsvf -p /dev/tty.your_arduino_serial_port xsvf/XC9572XL/DeviceID.xsvf

  1. You should see a back-and-forth that ends up with a "Success" message. If you rebuild the sketch with the DEBUG messages enabled in SerialComm.h, you'll see the actual device ID that's reported.

  2. Now you're ready to write data to your CPLD. Execute either of these:

./send_xsvf -p /dev/tty.your_arduino_serial_port xsvf/XC9572XL/ProgramButtonLED.xsvf

./send_xsvf -p /dev/tty.your_arduino_serial_port xsvf/XC9572XL/AlternateLEDsOnButton.xsvf

The first one blinks D1 when you press the button. The second one alternates between D1 and D2 when you hold down the button.

Generate your own XSVF files using Xilinx iMPACT, or download them from the web. Just make sure they're for your device.

Credits

By Mike Tsao. Project on GitHub.

Many thanks to Ben, who adapted the Xilinx XAPP058 code into something comprehensible. This code evolved from his project, and all the clever parts are his.

The guys over at Dangerous Prototypes sell an XC9572XL breakout board. It's cheap, it's open-source hardware, and their Bus Pirate tool will also program CPLDs. The "AlternateLEDsOnButton" XSVF is taken directly from their CPLD tutorials. DP are the guys who got me into CPLDs in the first place. Check them out and buy their stuff!

More Repositories

1

weblight

WebUSB LED. Hardware, software, and firmware.
C
187
star
2

mkeosimg

Make a Ubiquiti EdgeOS image from a system tarball
Shell
179
star
3

G35Arduino

An Arduino library for GE Color Effects G-35 holiday lights.
C++
64
star
4

WT32-SC01-Demo

A hello world sketch for the WT32-SC01 ESP32 Development board
C
28
star
5

cold-wallet-generator

Given one or more Bitcoin addresses with private keys, generates a TeX file suitable for printing and putting into cold storage.
Python
23
star
6

happynine

A BIP 0032 HD wallet for Bitcoin, implemented as a Chrome App.
JavaScript
18
star
7

smart-usb-switch

An ESP8266-based smart USB type-A switch
XSLT
16
star
8

mkwgconf

Generates Wireguard configuration files
Python
15
star
9

TribeDuino

A proof of concept that uses an Arduino to read a Korg monotribe firmware file in m4a audio format.
Arduino
14
star
10

archer-c9-back-to-stock

A DD-WRT-web-flashable image to take your DD-WRT Archer C9 back to stock firmware.
14
star
11

avr-programmer

A compact AVR programmer that doesn't require ugly cables.
14
star
12

scanqr-app

A Chrome Packaged App that scans QR codes.
JavaScript
13
star
13

groove

A digital audio workstation (DAW) engine.
Rust
13
star
14

b39tools

Tools for working with BIP-39 assets
Python
10
star
15

op-1-tools

Research about the Teenage Engineering OP-1
10
star
16

paSSSphrase

Split a strong passphrase among friends using Shamir's secret sharing, then etch it into metal so it'll last longer than you will.
Ruby
10
star
17

quaid

A single-page webapp that decrypts text using only client-side JavaScript
JavaScript
8
star
18

esp32-ble-button

Allows an ESP32 to read inexpensive "anti-lost" Bluetooth Low Energy buttons (a.k.a. iTAG)
C++
7
star
19

ok-wake

A device that tells pre-literate kids that it's OK to get out of bed.
C
6
star
20

rpio

RPio: A Raspberry Pi Breakout Board
5
star
21

SimpleECDSA

Found at http://jonasfj.dk/blog/2007/12/simpleecdsa-a-simple-implementation-of-ecdsa-in-c/
C
5
star
22

like-a-g35

An alternate driver for GE Christmas lights.
4
star
23

sm16716

An Arduino controller for SM16716-based LED strings.
Arduino
4
star
24

ChromeLeft4kDead

Notch's Left4kDead as a Chrome App.
JavaScript
4
star
25

audrey

A circa-2001 project to open up the 3Com Ergo Audrey internet appliance.
HTML
4
star
26

keycad

Generates various CAD files for custom keyboards
Python
4
star
27

cinemagraph-maker

Erlang
3
star
28

blur-facebook

Helps blot out names in comments when you want to post a funny screenshot to Reddit.
JavaScript
3
star
29

hypnagogo

The Hypna Go Go: Hypnagogic Goggles
C
3
star
30

td-base

A starting point for Tower Defense-style games.
Python
2
star
31

rpi_breakout

The project now known as rpio.
2
star
32

pub

Public documents that are freely available but hard to find or subject to bitrot
2
star
33

nanowrimo-meter

JavaScript
1
star
34

sowbug.github.com

HTML
1
star
35

hsk-mock-exams-pinyin

HSK mock exams with Pinyin versions of listening phrases
1
star
36

psychic-bassoon

A JavaScript passphrase generator
1
star
37

ld14

Entry to Ludum Dare 14
Python
1
star
38

Left4kDeadEdu

A refactored and annotated version of Notch's Left 4k Dead.
Java
1
star
39

sudoku-app

A Chrome Packaged App for playing the puzzle game Sudoku.
JavaScript
1
star
40

8821

Building a Williams arcade machine from scratch
C
1
star
41

trhid

JavaScript
1
star
42

beach

A small PyGame game written in about six hours.
Python
1
star
43

neje_laser_upgrade

How to upgrade your NEJE Master laser engraver to stock GRBL with Laser Mode ($32)
1
star
44

smart-light

Alexa-compatible light controller for ESP8266 and ESP32.
C++
1
star
45

paste-itc-password

A Chrome extension that allows pasting of passwords into the login page of iTunes Connect.
JavaScript
1
star
46

tqw

The Quoting, Whirled: A Burning Man Art Project from August 2002.
C
1
star