aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/drivers/Makefile.am
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2012-07-22 17:28:02 +0400
committerSpencer Oliver <spen@spen-soft.co.uk>2013-06-10 09:39:48 +0000
commit962b3eb40cc5b69d9b3d6fcc4c5d56c4d204a307 (patch)
treebbc0bc9979304808c9ab5292365169bf61e7ac2c /src/jtag/drivers/Makefile.am
parent08d4411b59dd8bd0e7d8009003b71d23acbf6eee (diff)
downloadriscv-openocd-962b3eb40cc5b69d9b3d6fcc4c5d56c4d204a307.zip
riscv-openocd-962b3eb40cc5b69d9b3d6fcc4c5d56c4d204a307.tar.gz
riscv-openocd-962b3eb40cc5b69d9b3d6fcc4c5d56c4d204a307.tar.bz2
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>
Diffstat (limited to 'src/jtag/drivers/Makefile.am')
-rw-r--r--src/jtag/drivers/Makefile.am3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jtag/drivers/Makefile.am b/src/jtag/drivers/Makefile.am
index 65167ea..30251be 100644
--- a/src/jtag/drivers/Makefile.am
+++ b/src/jtag/drivers/Makefile.am
@@ -114,6 +114,9 @@ endif
if SYSFSGPIO
DRIVERFILES += sysfsgpio.c
endif
+if BCM2835GPIO
+DRIVERFILES += bcm2835gpio.c
+endif
if OPENJTAG
DRIVERFILES += openjtag.c