| Dobrica Pavlinušić's random unstructured stuff X300 PCI: Revision 20 
 QuantusEP1C needs Quantus II 11 web pack (last supported) in squeeze chroot 
root@nuc:/nuc# debootstrap --arch i386 squeeze altera-squeeze http://archive.debian.org/debian
$ sudo mount blue:/bluez/FPGA/Altera-x300/11.0sp1_quartus_free_linux /nuc/altera-squeeze/mnt/
# mount /proc into chroot
# chroot into it
root@altera:/mnt$ bash setup --help
apt-get install -y `bash /mnt/setup --help 2>&1 | grep 'cannot open shared object file' | cut -d: -f2 | xargs -i ssh dpavlin@blue dpkg -S {} | grep i386 | cut -d: -f1 | head -1`
if setup dies, look at log in /tmp/ and continue installation of families:
  140  "/root/altera/11.0sp1/quartus/bin/quartus_sh" --qinstall -qda "/mnt/altera_installer/bin/../../devices/subscription/cyclone.qda" -show_qt_progress
  141  "/root/altera/11.0sp1/quartus/bin/quartus_sh" --qinstall -qda "/mnt/altera_installer/bin/../../devices/subscription/max3000a.qda" -show_qt_progress
try to start
root@altera:/$ /root/altera/11.0sp1/quartus/bin/quartus
quartus: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
or http://download.altera.com/akdlm/software/acdsinst/13.0sp1/232/ib_installers/cyclone-13.0.1.232.qdz Quartus II 13.0.1.232 tries to open following device files: 
dpavlin@blue:/bluez/FPGA/Altera-x300$ grep qdz /tmp/foo 
lstat64("/bluez/FPGA/Altera-x300/arria_web-13.0.1.232.qdz", 0xff9b166c) = -1 ENOENT (No such file or directory)
lstat64("/bluez/FPGA/Altera-x300/cyclone_web-13.0.1.232.qdz", 0xff9b166c) = -1 ENOENT (No such file or directory)
lstat64("/bluez/FPGA/Altera-x300/cyclonev-13.0.1.232.qdz", 0xff9b166c) = -1 ENOENT (No such file or directory)
lstat64("/bluez/FPGA/Altera-x300/max_web-13.0.1.232.qdz", 0xff9b166c) = -1 ENOENT (No such file or directory)
pinout
 JTAGopenocd
pi@picam /nuc/picam/x300-pci $ sudo openocd -f raspberrypi-native.cfg 
Open On-Chip Debugger 0.10.0-dev-00024-gd28ab08 (2015-09-12-02:20)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO config: tck = 4, tms = 27, tdi = 22, tdi = 17
BCM2835 GPIO config: trst = 18
trst_only separate trst_push_pull
adapter speed: 100 kHz
jtag
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : clock speed 100 kHz
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Info : JTAG tap: auto0.tap tap/device found: 0x171280dd (mfg: 0x06e, part: 0x7128, ver: 0x1)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x171280dd"
Error: IR capture error at bit 2, saw 0x3FFFFFFFFFFFFD55 not 0x...3
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined
OK, let's try config: # XXX dpavlin x300 pci bcm2835gpio_jtag_nums 4 27 22 17 # not really used for altera jtag, but we have to define it to make openocd happy bcm2835gpio_trst_num 18 # reset_config trst_only reset_config none adapter_khz 30 transport select jtag jtag newtap x300pci tap -irlen 10 -expected-id 0x171280dd -irmask 0x3 -ircapture 0x1 urjtag bug with gpio pin 4using urjtag has bug which doesn't allow usage of pin 4 for anything (DUH!) following patch fixes this problem: 
--- a/urjtag/src/tap/cable/gpio.c
+++ b/urjtag/src/tap/cable/gpio.c
@@ -45,11 +45,11 @@
 
 /* pin mapping */
 enum {
-    GPIO_TDI = 0,
+    GPIO_REQUIRED = 0,
+    GPIO_TDI,
     GPIO_TCK,
     GPIO_TMS,
-    GPIO_TDO,
-    GPIO_REQUIRED
+    GPIO_TDO
 };
 
 typedef struct {
run urjtagpi@picam ~/x300-pci $ sudo jtag jtag> cable gpio help Usage: cable gpio tdi=<gpio_tdi> tdo=<gpio_tdo> tck=<gpio_tck> tms=<gpio_tms> # it seems that tck pin is not accepted! jtag> cable gpio tck=4 tdo=17 tms=27 tdi=22 jtag> cable gpio tms=27 tdi=22 tdo=17 tck=4 urjtag + usbblasterjtag> cable usbblaster Connected to libftdi driver. jtag> detect IR length: 10 Chain length: 1 Device Id: 00010111000100101000000011011101 (0x171280DD) Manufacturer: Altera (0x0DD) Part(0): EPM7128AETC100 (0x7128) Stepping: 1 Filename: /usr/local/share/urjtag/altera/epm7128aetc100/epm7128aetc100 |