openocd/tcl/interface
Paul Fertser 962b3eb40c Add BCM2835 (as found in Raspberry Pi) interface driver
This adds support for JTAG programming by bitbanging GPIOs exposed on
the RaspberryPi's expansion header.

Tested by connecting directly to an STM32VLDiscovery board, without any
additional circuity. I observed maximum about 4MHz on the TCK pin with an
old analogue 'scope and about 100kHz when setting the speed to 100kHz.
Busyloop waiting is needed because even with a single 0ns nanosleep call
(with FIFO priority) it lowers the TCK speed to ~30kHz which is way too low
to be useful.

The speed testing with adapter_khz 2000 gave the following results:
sudo chrt -f 1 nice -n -19 ./src/openocd \
     -f interface/raspberrypi-native.cfg \
     -c "set WORKAREASIZE 0x2000" \
     -f target/stm32f1x.cfg -c "adapter_khz 2000"

wrote 131072 bytes from file random.bin in 3.973677s (32.212 KiB/s)
dumped 131072 bytes in 1.445699s (88.538 KiB/s)

This is 3.7 times faster for writing and 14.3 times faster for reading
compared to the generic sysfsgpio driver; probably the writing speed is
limited by the target itself here and reading speed might be considerably
higher too with appropriate connection and a capable target.

BCM2835 name is choosen over BCM2708 because the published peripherals
datasheet uses the particular model name and not family name.

Change-Id: Ib78168be27f53c2a3c88c3dd8154d1190c318c78
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/758
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-10 09:39:48 +00:00
..
ftdi interface/ftdi: remove "untested" warning from DP Busblaster 2013-05-29 14:32:29 +00:00
altera-usb-blaster.cfg jtag_interface: .speed can be NULL when not needed 2013-02-08 22:33:19 +00:00
arm-jtag-ew.cfg Move TCL script files -- Step 2 of 2: 2009-05-27 06:49:24 +00:00
at91rm9200.cfg Move TCL script files -- Step 2 of 2: 2009-05-27 06:49:24 +00:00
axm0432.cfg - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. 2009-08-06 21:44:18 +00:00
busblaster.cfg cfg: Deleted duplicate busblaster.cfg and renamed original. 2012-05-08 14:03:42 +00:00
buspirate.cfg TCL: fix non TCL comments 2010-12-18 21:04:22 +01:00
calao-usb-a9260-c01.cfg - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. 2009-08-06 21:44:18 +00:00
calao-usb-a9260-c02.cfg - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. 2009-08-06 21:44:18 +00:00
calao-usb-a9260.cfg rename jtag_nsrst_delay as adapter_nsrst_delay 2010-03-15 08:41:30 -07:00
chameleon.cfg Move TCL script files -- Step 2 of 2: 2009-05-27 06:49:24 +00:00
cortino.cfg - add support for cortino jtag interface 2009-05-27 11:58:19 +00:00
digilent-hs1.cfg ft2232: Support for Digilent HS1 USB adapter 2012-04-10 20:19:47 +00:00
dlp-usb1232h.cfg Add an interface file for DLP Design DLP-USB1232H. 2011-10-13 22:29:28 +00:00
dummy.cfg Move TCL script files -- Step 2 of 2: 2009-05-27 06:49:24 +00:00
estick.cfg jtag: add opendous and estick support 2012-05-14 09:41:49 +00:00
flashlink.cfg interface configs: Fix whitespace and other issues. 2011-10-30 02:06:07 +00:00
flossjtag-noeeprom.cfg interface configs: Fix whitespace and other issues. 2011-10-30 02:06:07 +00:00
flossjtag.cfg interface configs: Fix whitespace and other issues. 2011-10-30 02:06:07 +00:00
flyswatter.cfg Dirk Behme <dirk.behme@googlemail.com> retire jtag_speed usage 2009-09-04 08:27:27 +00:00
flyswatter2.cfg cfg: Fixed product link to Flyswatter2 2012-05-07 20:14:09 +00:00
hilscher_nxhx10_etm.cfg scripts: use adapter_khz not deprecated jtag_khz 2011-11-18 22:14:55 +00:00
hilscher_nxhx50_etm.cfg scripts: use adapter_khz not deprecated jtag_khz 2011-11-18 22:14:55 +00:00
hilscher_nxhx50_re.cfg scripts: use adapter_khz not deprecated jtag_khz 2011-11-18 22:14:55 +00:00
hilscher_nxhx500_etm.cfg scripts: use adapter_khz not deprecated jtag_khz 2011-11-18 22:14:55 +00:00
hilscher_nxhx500_re.cfg scripts: use adapter_khz not deprecated jtag_khz 2011-11-18 22:14:55 +00:00
hitex_str9-comstick.cfg - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. 2009-08-06 21:44:18 +00:00
icebear.cfg - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. 2009-08-06 21:44:18 +00:00
jlink.cfg Move TCL script files -- Step 2 of 2: 2009-05-27 06:49:24 +00:00
jtag-lock-pick_tiny_2.cfg Add JTAG-lock-pick Tiny 2 config files 2012-08-29 06:26:39 +00:00
jtagkey-tiny.cfg Move TCL script files -- Step 2 of 2: 2009-05-27 06:49:24 +00:00
jtagkey.cfg - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. 2009-08-06 21:44:18 +00:00
jtagkey2.cfg - add cfg file for Amontec JTAGKey2 jtag interface 2009-08-18 16:46:48 +00:00
jtagkey2p.cfg cfg: add Amontec JTAGkey2p interface config (Issue #26) 2010-07-19 17:31:38 +01:00
kt-link.cfg JTAG: support KT-LINK adapter 2009-11-04 21:20:44 -08:00
lisa-l.cfg Added support for Lisa/L builtin JTAG interface. 2010-08-13 09:52:27 +02:00
luminary-icdi.cfg Luminary-icdi comment update 2010-08-03 21:29:05 -04:00
luminary-lm3s811.cfg cfg: correct Stellaris LM3S811 config typo 2012-01-27 19:24:36 +00:00
luminary.cfg Fix Luminary FT2232 layout docs/configs 2009-12-28 12:59:47 -08:00
minimodule.cfg added minimodule interface 2011-06-12 11:18:27 +02:00
nds32-aice.cfg aice: add Andes AICE support 2013-06-05 19:27:23 +00:00
neodb.cfg Added Openmoko USB JTAG interface config file. 2010-01-11 15:58:13 +01:00
ngxtech.cfg interface configs: Add missing URLs and names. 2011-11-03 23:53:26 +00:00
olimex-arm-usb-ocd-h.cfg Olimex FT2232H JTAG adapters 2009-10-29 15:39:03 -07:00
olimex-arm-usb-ocd.cfg - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. 2009-08-06 21:44:18 +00:00
olimex-arm-usb-tiny-h.cfg Olimex FT2232H JTAG adapters 2009-10-29 15:39:03 -07:00
olimex-jtag-tiny.cfg - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. 2009-08-06 21:44:18 +00:00
oocdlink.cfg rename jtag_khz as adapter_khz 2010-03-15 08:37:43 -07:00
opendous_ftdi.cfg interface: opendous_ftdi config file added 2013-03-13 12:32:56 +00:00
opendous.cfg jtag: add opendous and estick support 2012-05-14 09:41:49 +00:00
openjtag.cfg Added OpenJTAG Driver 2013-06-05 19:52:15 +00:00
openocd-usb-hs.cfg cfg: added new openocd-usb highspeed adapter 2012-08-09 22:30:48 +00:00
openocd-usb.cfg finish removing deprecated/obsolete commands 2009-11-09 13:16:32 -08:00
openrd.cfg rename jtag_khz as adapter_khz 2010-03-15 08:37:43 -07:00
osbdm.cfg jtag_interface: .speed can be NULL when not needed 2013-02-08 22:33:19 +00:00
parport_dlc5.cfg interface configs: Fix whitespace and other issues. 2011-10-30 02:06:07 +00:00
parport.cfg interface configs: Fix whitespace and other issues. 2011-10-30 02:06:07 +00:00
raspberrypi-native.cfg Add BCM2835 (as found in Raspberry Pi) interface driver 2013-06-10 09:39:48 +00:00
redbee-econotag.cfg interface configs: Add missing URLs and names. 2011-11-03 23:53:26 +00:00
redbee-usb.cfg interface configs: Add missing URLs and names. 2011-11-03 23:53:26 +00:00
rlink.cfg Move TCL script files -- Step 2 of 2: 2009-05-27 06:49:24 +00:00
sheevaplug.cfg rename jtag_khz as adapter_khz 2010-03-15 08:37:43 -07:00
signalyzer-h2.cfg Signalyzer: new config files 2009-10-27 11:56:04 -07:00
signalyzer-h4.cfg Signalyzer: new config files 2009-10-27 11:56:04 -07:00
signalyzer-lite.cfg Signalyzer: new config files 2009-10-27 11:56:04 -07:00
signalyzer.cfg Signalyzer: H2 and H4 support 2009-10-27 12:40:24 -07:00
stlink-v1.cfg jtag_interface: .speed can be NULL when not needed 2013-02-08 22:33:19 +00:00
stlink-v2.cfg jtag_interface: .speed can be NULL when not needed 2013-02-08 22:33:19 +00:00
stm32-stick.cfg - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. 2009-08-06 21:44:18 +00:00
sysfsgpio-raspberrypi.cfg jtag_interface: .speed can be NULL when not needed 2013-02-08 22:33:19 +00:00
ti-icdi.cfg jtag_interface: .speed can be NULL when not needed 2013-02-08 22:33:19 +00:00
turtelizer2.cfg - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. 2009-08-06 21:44:18 +00:00
ulink.cfg interface configs: Add missing URLs and names. 2011-11-03 23:53:26 +00:00
usb-jtag.cfg jtag_interface: .speed can be NULL when not needed 2013-02-08 22:33:19 +00:00
usbprog.cfg interface configs: Fix whitespace and other issues. 2011-10-30 02:06:07 +00:00
vpaclink.cfg Add VPACLink interface definition 2010-04-26 07:08:52 +02:00
vsllink.cfg versaloon driver update 2011-08-16 12:50:38 +01:00
xds100v2.cfg interface configs: Add missing URLs and names. 2011-11-03 23:53:26 +00:00