--- /dev/null
+#
+# Config for using Raspberry Pi's expansion header
+#
+# This is best used with a fast enough buffer but also
+# is suitable for direct connection if the target voltage
+# matches RPi's 3.3V and the cable is short enough.
+#
+# Do not forget the GND connection, pin 6 of the expansion header.
+#
+
+#gdb_port 3333
+telnet_port 4444
+tcl_port 6666
+
+interface bcm2835gpio
+
+bcm2835gpio_peripheral_base 0x20000000
+
+# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
+# These depend on system clock, calibrated for stock 700MHz
+# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET
+bcm2835gpio_speed_coeffs 113714 28
+
+# XXX dpavlin x300 dongle
+# Each of the JTAG lines need a gpio number set: tck tms tdi tdo
+bcm2835gpio_jtag_nums 17 22 23 27
+
+# not really used for altera jtag, but we have to define it to make openocd happy
+bcm2835gpio_trst_num 31
+# reset_config trst_only
+reset_config none
+
+# select jtag
+adapter_khz 10000
+transport select jtag
+
+
-sudo openocd -f raspberrypi-native.cfg -c 'jtag newtap tb276 tap -expected-id 0x020f10dd -irlen 10' -c 'init' -c 'scan_chain'
+#sudo openocd -f raspberrypi-native.cfg -c 'jtag newtap tb276 tap -expected-id 0x020f10dd -irlen 10' -c 'init' -c 'scan_chain'
+sudo openocd -f rpi-board.cfg -c 'jtag newtap tb276 tap -expected-id 0x020f10dd -irlen 10' -c 'init' -c 'scan_chain'
#ln -sf f32c/xram_bram/project.svf project.svf
rm project.svf && scp dpavlin@10.60.0.92:/rest/cvs/f32c/f32c/rtl/proj/altera/tb276/xram_bram/project.svf .
-sudo openocd -f raspberrypi-native.cfg -f tb276.ocd
+#sudo openocd -f raspberrypi-native.cfg -f tb276.ocd
+sudo openocd -f rpi-board.cfg -f tb276.ocd
sudo ./f32c/ujprog -P /dev/ttyAMA0 -a /nuc/Arduino/tb276/build/tb276.ino.hex