aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Palsson <karlp@tweak.net.au>2015-05-31 02:18:36 +0000
committerPaul Fertser <fercerpav@gmail.com>2017-02-13 17:42:36 +0000
commit091c378728456bffec86218de0c2f0669144f053 (patch)
tree323613d6ab3d34e6e96d54d2bcdf712002dfd62a
parent7c2dc138b32291e12e68ecd0391053d66efd53aa (diff)
flash/nor: avrf: support atmega128rfa1
Tested with a Dresden Elektronik deRFmega128 module. Change-Id: I91da3b11b60e78755360b08453ed368d6d396651 Signed-off-by: Karl Palsson <karlp@tweak.net.au> Reviewed-on: http://openocd.zylin.com/2790 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
-rw-r--r--src/flash/nor/avrf.c1
-rw-r--r--tcl/target/atmega128rfa1.cfg22
2 files changed, 23 insertions, 0 deletions
diff --git a/src/flash/nor/avrf.c b/src/flash/nor/avrf.c
index 627418c..11cc3b2 100644
--- a/src/flash/nor/avrf.c
+++ b/src/flash/nor/avrf.c
@@ -66,6 +66,7 @@ static const struct avrf_type avft_chips_info[] = {
* eeprom_page_size, eeprom_page_num
*/
{"atmega128", 0x9702, 256, 512, 8, 512},
+ {"atmega128rfa1", 0xa701, 128, 512, 8, 512},
{"at90can128", 0x9781, 256, 512, 8, 512},
{"at90usb128", 0x9782, 256, 512, 8, 512},
{"atmega164p", 0x940a, 128, 128, 4, 128},
diff --git a/tcl/target/atmega128rfa1.cfg b/tcl/target/atmega128rfa1.cfg
new file mode 100644
index 0000000..2c12a61
--- /dev/null
+++ b/tcl/target/atmega128rfa1.cfg
@@ -0,0 +1,22 @@
+set _CHIPNAME avr
+set _ENDIAN little
+
+# jtag speed
+adapter_khz 4500
+
+# avr jtag docs never connect RSTN
+reset_config none
+
+#jtag scan chain
+if { [info exists CPUTAPID] } {
+ set _CPUTAPID $CPUTAPID
+} else {
+ set _CPUTAPID 0x0a70103f
+}
+jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+
+set _TARGETNAME $_CHIPNAME.cpu
+target create $_TARGETNAME avr -endian $_ENDIAN -chain-position $_TARGETNAME
+
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME avr 0 0 0 0 $_TARGETNAME