JTAGWhisperer: CPLD and FPGA programing with Arduino

in firmware by DP | 13 comments

JTAGWhisperer turns an Arduino into an JTAG programmer for CPLDs and FPGAs. It uses the same Xilinx XAPP58 [PDF] XSVF programmer we ported to the Bus Pirate. Mike has successfully programed a XC9572XL CPLD breakout board, but it should work with many JTAG targets. Python and pyserial are required.

CoolRunner-II and XC9572XL CPLD breakouts are available for $15.

Via the forum.

This entry was posted in firmware and tagged , , .

Comments

  1. Boseji says:

    Great, people who dont have BusPirate can use Arduino and take advantage.
    Thanks for sharing,

    - Boseji

  2. tino g. says:

    oh thats great! last week i finished my firt selfmade arduino.. now i can use it to play with my coolrunner II :D

    thank you

  3. Peter says:

    What Arduino is prefered ? There are different ones !

  4. Miguel Montiel says:

    Hi all, i tested the Jtagwhisperer with a teensyduino clon board.The comunication goes all right. But, when send the xsvf file, in the console i see this message:
    [miguel@dhcppc6 JTAGWhisperer-master]$ sudo ./send_xsvf -p /dev/ttyACM0 test/timer_test_1ms.xsvf
    Ready to send file of size 12 bytes.
    Device is ready.
    IMPORTANT: Unexpected instruction 65
    IMPORTANT: Failure at instruction #0
    IMPORTANT: Processed 0 instructions.
    IMPORTANT: Checksum 41/1.
    Received device quit: Exiting!
    El dispositivo no esta listo
    Expected checksum: 11d/c.
    Elapsed time: 0.00 seconds.

    i created another xsvf, for a xc9536XL CPLD and the result is the same:
    [miguel@dhcppc6 JTAGWhisperer-master]$ sudo ./send_xsvf -p /dev/ttyACM0 main.xsvf
    Ready to send file of size 39453 bytes.
    Device is ready.
    IMPORTANT: Unexpected instruction 65
    IMPORTANT: Failure at instruction #0
    IMPORTANT: Processed 0 instructions.
    IMPORTANT: Checksum 41/1.
    Received device quit: Exiting!
    El dispositivo no esta listo
    Expected checksum: ac818/9a1d.
    Elapsed time: 0.00 seconds.

    the only diference i can see is the expected checksum, but this is logic if a try to programm a diferent CPLD.

    somebody can tell me more about this

    thanks in advanceHi all, i tested the Jtagwhisperer with a teensyduino clon board.The comunication goes all right. But, when send the xsvf file, in the console i see this message:
    [miguel@dhcppc6 JTAGWhisperer-master]$ sudo ./send_xsvf -p /dev/ttyACM0 test/timer_test_1ms.xsvf
    Ready to send file of size 12 bytes.
    Device is ready.
    IMPORTANT: Unexpected instruction 65
    IMPORTANT: Failure at instruction #0
    IMPORTANT: Processed 0 instructions.
    IMPORTANT: Checksum 41/1.
    Received device quit: Exiting!
    El dispositivo no esta listo
    Expected checksum: 11d/c.
    Elapsed time: 0.00 seconds.

    i created another xsvf, for a xc9536XL CPLD and the result is the same:
    [miguel@dhcppc6 JTAGWhisperer-master]$ sudo ./send_xsvf -p /dev/ttyACM0 main.xsvf
    Ready to send file of size 39453 bytes.
    Device is ready.
    IMPORTANT: Unexpected instruction 65
    IMPORTANT: Failure at instruction #0
    IMPORTANT: Processed 0 instructions.
    IMPORTANT: Checksum 41/1.
    Received device quit: Exiting!
    El dispositivo no esta listo
    Expected checksum: ac818/9a1d.
    Elapsed time: 0.00 seconds.

    the only diference i can see is the expected checksum, but this is logic if a try to programm a diferent CPLD.

    somebody can tell me more about this

    thanks in advance

  5. Miguel Montiel says:

    Peter:

    U can use any Arduino board, in the README file included, said u can connect 8,9,10 and 11 pin for a JTAG interface, really this pins are PB0, PB1,PB2 and PB3 in the AVR. if our arduino board hava a different output assignments

    i hope this can help u.

  6. Peter says:

    TMS – Pin 8
    TDI – Pin 9
    TDO – Pin 10
    TCK – Pin 11
    GND – GND
    VTG – 3.3V

    The jumper on VIO isn’t removed.

    When i try to upload the DeviceID.xsvf file to the CPLD then i get the message: “Device is ready.”
    Next: “Send: 32 bytes, 58 remaining”

    But this was all. It seams to be stopped or freezed !

  7. Miguel Montiel says:

    hi peter!

    this happen because, u don’t reset the arduino, in the pde file you have a BLINK_PIN in arduino.
    this leds start to blinking at start of comunication between arduino and pc (or mac)
    in this moment u can execute the script.
    is relatively at the same time reset the arduino and send the xsvf file.
    try many times as u can, it’s only a practice situation

  8. Peter says:

    When i reset the arduino it only 32bytes then stopped again !

  9. Peter says:

    My Arduino is on COM3: and i use windows xp.

    Is my syntax ok ? send_xsvf.py -p com3 xsvf/XC9572XL/DeviceID.xsvf

  10. Miguel Montiel says:

    I offer an apology for the delay, I have windows installed on my laptop. But I read that the syntax is correct. I have some problems at that point.
    Device is ready.
    IMPORTANT: Unexpected instruction 65
    IMPORTANT: Failure at instruction #0
    IMPORTANT: Processed 0 instructions.
    IMPORTANT: Checksum 41/1.
    Received device quit: Exiting!
    Does anyone else have an answer?
    thanks in advance.

  11. Peter says:

    Hi Miguel,

    i have tried this with the reset timing but everytime he stand still at 32 bytes.

    Then i have set the led blinking loop from 10 to 1000 to check something.
    The result is that everytime i start the python skript the arduino makes a reset.

    The led blinks, i reset the arduino, start the python skript, the arduino blinks again (automatic reset).
    That’s why the thing with the reset timing couldn’t work !

    Arduino 2009 and Arduino Pro Mini.

  12. Miguel Montiel says:

    Hi peter!

    i’m sorry but don’t work for me too. :(

  13. Miguel Montiel says:

    Clon Teensy 2.0 atmega32U4 based

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.