I have a task: Re-Burn FPGA Xilinx XC6SLX9-2TQG144C form an Android device. From the interface on Android device, I have RS-232, GPIO 4 bit (2 in, 2 out), USB 2.0, USB 3.0. Also, flash memory AT45DB161E-SHF-B connected to FPGA through SPI. I have Jtag but how can I use it from Android OS? I am new in FPGA programming, so I even haven't idea from what start. Thx for helping.
-
If you need to program FPGA once, JTAG is okay. But FPGA loses it's configuration on power off and reloads from memory on next power on. So If you want to make it permanent, you need a different approach. Some of the bytes in the ".bit" file which is used to program bit file are actually header information for the Xilinx software. So it cannot be used directly. You can use the bin file for that. – maximus Dec 04 '19 at 09:56
3 Answers
There are several possibilities that come to mind. You could connect the Android GPIOs to the flash SPI and bitbang the SPI to program the flash.
But you might need the GPIO to reset the FPGA.
You could probably use the NDK to compile openocd to run on your device and then use a USB to JTAG adapter to program the FPGA.
If you do use FTDI, I found that the parallel FPGA configuration interface is much easier than JTAG. With FT60x you can just stream over the bytes from the bin file.

- 2,340
- 1
- 14
- 20
-
I'm really interested in hearing how it goes with your project, btw. – Jamey Hicks Jan 02 '20 at 14:26
Since android is not a realtime OS you will need additional hardware that will communicate with android and program the chip.
From what I found by googling the best supported solution is to go with a FTDI chip, since it provides a JTAG interface and also has full support and java drivers.
You can also try a usb-to-jtag programmer, there are some drivers for android, however I'm not sure if they will work with all programmers.
If you have a serial interface then you are in luck, since there are well made drivers, all you need is a usb-to-serial interface.

- 2,320
- 1
- 14
- 27
You could make your own android program if programmers dont exists, yet.
You could linux in your android, then do whatever you need.

- 113
- 1
- 3