… or how to keep on learning new stuff
A few days ago, I was visiting my friend Bart030. Bart received a bricked ZX-Uno board for repairs. However, he didn’t have a working Raspberry PI unit so he asked me to work on this broken puppy.
ZX-Uno is an awesome project by a Spanish team of guys.
- McLeod – Reviews and proposes, is a de facto partner.
- Superfo – Router, which is responsible for designing the PCB.
- AntonioVillena – Initial idea, scheme design and prototype distribution.
- Quest – Ports of secondary cores. Multiboot system. Firmware and prototypes collaboration
- Hark0 – Graphic and web designer.
They did a great job with this project. Bringing this kind of device nowadays is IMO super cool and I wish those guys best luck in future upgrades and projects.
Why I wrote this post?
Well, I was trying to fix this lil machine and after a while of googling, I’ve figured that most of the important information is written in Spanish. I agree that a lot of people speak and understand Spanish but I am not one of them … even after having 0.7L of whiskey, all I can say in Spanish is “Cerveza porfavor” … and I am not even sure if it is correct 😀
So this little puppy was not booting at all – blank screen after supplying power to it. The owner of ZX-Uno said that it happened after he tried to upgrade firmware. I started to google stuff and I’ve found a few interesting topics.
So it turns out that it is possible to make a JTAG programmer out of RaspPI!
I completely wasn’t aware of that!
There is a fully working software that does the job – URJTAG
So YEAH, Xilinx chips can be programmed using a simple cable connected to Raspberry PI GPIOs.
According to one of ZX-Uno creators, that was enough to recover dead ZX-Uno from the dark abyss. Antonio Villena put a great tutorial online on forums … unfortunately in Spanish. However, that wasn’t much of a problem – google translate FTW!one!eleven111!11!
There are few ways to recover the bricked device from “lost” state and I’ll focus on JTAG using RPIs GPIO today.
Preparing RPI OS
Fresh install of Raspbian had to be deployed on my RPI 1 B+. I had one already but it was kinda outdated so quick download and install and fixed it.
Next, I had to download and install urjtag from GIT
sudo apt-get update
sudo apt-get install autoconf autopoint libtool
sudo apt-get install libreadline-dev python-dev git
git clone git://git.code.sf.net/p/urjtag/git urjtag-git
A file in src/cmd/cmd_bfin.c had to be edited by simply adding a line: #define _SYS_UCONTEXT_H
Everything was ready for compilation.
sudo make install
Only five out of six wires are needed because I do not need to supply power (3.3V) to FPGA chip via JTAG, it will be powered by original Zx-Uno PSU.
Here is a PDF with details
Connecting it to RPI is quite straight forward.
Zx-Uno Raspberry pi JTAG Pin GPIO Pin TMS 6 ------ GPIO6 31 TDI 5 ------ GPIO13 33 TDO 4 ------ GPIO19 35 TCK 3 ------ GPIO26 37 GND 2 ------ GND 39
There are two files needed for recovery.
First, is recovery.bit provided by Antonio and which will be uploaded to FPGA through JTAG straight from Raspberry PI and a second FLASH.ZX1 which has to be uploaded to root directory of SD card and plugged into Zx-Uno to reflash its firmware from the BIOS menu.
Everything was connected and ready but it was Saturday evening … aaaaand…
… and I had to leave this project for another day.
Another day came and as usual, I had to recover myself first. Quick recovery.beer was uploaded and right after that I was ready for recovery.bit upload. I’ve launched urjtag, configured GPIO and tried to detect FPGA chip.
config of GPIOs inside urjtag
cable gpio tdi=13 tdo=19 tck=26 tms=6
So, I could start to load a recovery.bit with the following command inside urjtag.
pld load recovery.bit
Here is how it looked … feat. my new Lamers scarf ;P
With SD card plugged in I wanted to re-flash software however I’ve encountered following FAIL ;P
It turned out that FAT32 wasn’t cleanly unmounted and a dirty bit was set on it so I’ve moved SD card to my Linux box and did a quick:
Back to UNO = Mission complete 😉
With new FLASH.ZX1 uploaded fo FPGA there was nothing left except testing.
YAY! It’s ALIVE!
Also FYI there is a nice case model for all of you 3D printing fans 😉
- Zx-Uno team – for awesome project
- Bart030 – for repair opportunity
- Owner – for bricking the device 😉
- Lamers – for an awesome scarf. lol 😀
If you want to get retro gear or hardware modules, please visit our shop
New products are being added every month.
Also, please support our work by spreading info about it.
Without your support, we simply cannot grow and we have a lot of new cool retro hardware (and more) products to come