惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
博客园_首页
雷峰网
雷峰网
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
The Cloudflare Blog
罗磊的独立博客
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
Last Week in AI
Last Week in AI
J
Java Code Geeks
MyScale Blog
MyScale Blog
G
Google Developers Blog
U
Unit 42
Y
Y Combinator Blog
P
Proofpoint News Feed
Vercel News
Vercel News

Comments for LinuxJedi's /dev/null

Converting a PC Floppy Drive to Amiga Amiga 1000 Restoration: The Keyboard Amiga 1000 Restoration: Floppy Drive and WCS Failure? Amiga 4000 Repair: This one was just weird Socket SO_REUSEPORT and Kernel Implementations Coding an MSP430 From the Linux Command Line Upgrading the RAM Detective: A Firmware Adventure with RAMCHECK When an Amiga A570 Repair Took a Strange Turn AI Didn’t Destroy Your Company, Your Processes Did KDE Plasma Automatic Time Zone Teletext on a BBC computer in 2024 Amiga RAMesses UART and Ethernet on the STM32 Nucleo-F756ZG Trying Out Even More Amiga 500 Plus Upgrades Programming Xilinx JTAG from a Raspberry Pi
Raspberry Pi JTAG Programming - 2025 Edition
LinuxJedi · 2025-02-12 · via Comments for LinuxJedi's /dev/null

It seems that every time I document how to do Xilinx JTAG programming from a Raspberry Pi, they change something to break it. So, it is time to update the instructions again.

Edit 2025-11-29

The method in this blog post uses libgpiod. It appears that this library has been updated to v2 in the Trixie version of Pi OS, which is not API compatible. I do not have a solution at this time, it will require more rewrites. Please use Bookworm for now.

History

The main problem is when using xc3sprog. The original method used wiringpi in the Buster version of Pi OS to talk to the GPIO. Then the Bullseye version came around and wiringpi was removed in favour of sysfsgpio. I believe in-part due to the way the Pi 5 GPIO works, this was no longer viable, so with Bookworm, there is another method libgpio. In addition, wiringpi is back and also should work!

I should probably note here that if you are confused about the Pi OS naming, it is based on Debian. Debian names each release after Toy Story characters.

How to use libgpio

The original xc3sprog repository appears to be no longer developed or taking contributions. I was going to fork it and add support for libgpio, but someone beat me to it. You can find their repository here.

As a refresher, this is the pinout of the Pi GPIO, this is the same for most generations of Raspberry Pi, apart from the first original one:

You should wire it up as follows:

Pin NumberGPIO NumberFunction
74TMS
9GND
1117TCK
1327TDO
1522TDI
173.3v

Now, to install the software, open a shell or SSH into the Pi and do the following:

sudo apt update
sudo apt install build-essential libusb-dev libftdi-dev libgpiod-dev git cmake
git clone https://github.com/arkadiuszmakarenko/xc3sprog.git
mkdir xc3sprog/build
cd xc3sprog/build
cmake ..
make
sudo make install

This should get you the software installed. From here you can check if the JTAG chain works by using:

sudo xc3sprog -c gpiod_creator -j

This should give you a list of JTAG devices connected. JTAG works in a chain from ID 0, so multiple chips can be programmed from a single connector.

From here you can program your chips using:

sudo xc3sprog -c gpiod_creator -v -p {chain position starting from 0} {filename}.jed

That is it! You should get a successful flash!