summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
Diffstat (limited to 'src/target')
-rw-r--r--src/target/Makefile.am45
-rw-r--r--src/target/event/at91eb40a_reset.cfg8
-rw-r--r--src/target/target/at91eb40a.cfg34
3 files changed, 65 insertions, 22 deletions
diff --git a/src/target/Makefile.am b/src/target/Makefile.am
index 25292879..d2108f0a 100644
--- a/src/target/Makefile.am
+++ b/src/target/Makefile.am
@@ -1,22 +1,23 @@
-
-if OOCD_TRACE
-OOCD_TRACE_FILES = oocd_trace.c
-else
-OOCD_TRACE_FILES =
-endif
-
-INCLUDES = -I$(top_srcdir)/src/gdb -I$(top_srcdir)/src/helper -I$(top_srcdir)/src/jtag -I$(top_srcdir)/src/xsvf $(all_includes)
-METASOURCES = AUTO
-AM_CPPFLAGS = -DPKGLIBDIR=\"$(pkglibdir)\" @CPPFLAGS@
-noinst_LIBRARIES = libtarget.a
-libtarget_a_SOURCES = target.c register.c breakpoints.c armv4_5.c embeddedice.c etm.c arm7tdmi.c arm9tdmi.c \
- arm_jtag.c arm7_9_common.c algorithm.c arm920t.c arm720t.c armv4_5_mmu.c armv4_5_cache.c arm_disassembler.c \
- arm966e.c arm926ejs.c feroceon.c etb.c xscale.c arm_simulator.c image.c armv7m.c cortex_m3.c cortex_swjdp.c \
- etm_dummy.c $(OOCD_TRACE_FILES) target_request.c trace.c
-noinst_HEADERS = target.h trace.h register.h armv4_5.h embeddedice.h etm.h arm7tdmi.h arm9tdmi.h \
- arm_jtag.h arm7_9_common.h arm920t.h arm720t.h armv4_5_mmu.h armv4_5_cache.h breakpoints.h algorithm.h \
- arm_disassembler.h arm966e.h arm926ejs.h etb.h xscale.h arm_simulator.h image.h armv7m.h cortex_m3.h cortex_swjdp.h \
- etm_dummy.h oocd_trace.h target_request.h trace.h
-
-nobase_dist_pkglib_DATA = xscale/debug_handler.bin
-
+
+if OOCD_TRACE
+OOCD_TRACE_FILES = oocd_trace.c
+else
+OOCD_TRACE_FILES =
+endif
+
+INCLUDES = -I$(top_srcdir)/src/gdb -I$(top_srcdir)/src/helper -I$(top_srcdir)/src/jtag -I$(top_srcdir)/src/xsvf $(all_includes)
+METASOURCES = AUTO
+AM_CPPFLAGS = -DPKGLIBDIR=\"$(pkglibdir)\" @CPPFLAGS@
+noinst_LIBRARIES = libtarget.a
+libtarget_a_SOURCES = target.c register.c breakpoints.c armv4_5.c embeddedice.c etm.c arm7tdmi.c arm9tdmi.c \
+ arm_jtag.c arm7_9_common.c algorithm.c arm920t.c arm720t.c armv4_5_mmu.c armv4_5_cache.c arm_disassembler.c \
+ arm966e.c arm926ejs.c feroceon.c etb.c xscale.c arm_simulator.c image.c armv7m.c cortex_m3.c cortex_swjdp.c \
+ etm_dummy.c $(OOCD_TRACE_FILES) target_request.c trace.c
+noinst_HEADERS = target.h trace.h register.h armv4_5.h embeddedice.h etm.h arm7tdmi.h arm9tdmi.h \
+ arm_jtag.h arm7_9_common.h arm920t.h arm720t.h armv4_5_mmu.h armv4_5_cache.h breakpoints.h algorithm.h \
+ arm_disassembler.h arm966e.h arm926ejs.h etb.h xscale.h arm_simulator.h image.h armv7m.h cortex_m3.h cortex_swjdp.h \
+ etm_dummy.h oocd_trace.h target_request.h trace.h
+
+nobase_dist_pkglib_DATA = xscale/debug_handler.bin event/at91eb40a_reset.cfg target/at91eb40a.cfg
+
+
diff --git a/src/target/event/at91eb40a_reset.cfg b/src/target/event/at91eb40a_reset.cfg
new file mode 100644
index 00000000..a2d29c6d
--- /dev/null
+++ b/src/target/event/at91eb40a_reset.cfg
@@ -0,0 +1,8 @@
+# Reset script for AT91EB40a
+reg cpsr 0x000000D3
+mww 0xFFE00020 0x1
+mww 0xFFE00024 0x00000000
+mww 0xFFE00000 0x01002539
+mww 0xFFFFF124 0xFFFFFFFF
+mww 0xffff0010 0x100
+mww 0xffff0034 0x100
diff --git a/src/target/target/at91eb40a.cfg b/src/target/target/at91eb40a.cfg
new file mode 100644
index 00000000..0f08f717
--- /dev/null
+++ b/src/target/target/at91eb40a.cfg
@@ -0,0 +1,34 @@
+#Script for AT91EB40a
+
+#Atmel ties SRST & TRST together, at which point it makes
+#no sense to use TRST, but use TMS instead.
+#
+#The annoying thing with tying SRST & TRST together is that
+#there is no way to halt the CPU *before and during* the
+#SRST reset, which means that the CPU will run a number
+#of cycles before it can be halted(as much as milliseconds).
+reset_config srst_only srst_pulls_trst
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 4 0x1 0xf 0xe
+
+#target configuration
+#target arm7tdmi <endianness> <reset mode> <chainpos> <variant>
+target arm7tdmi little reset_init 0 arm7tdmi-s_r4
+
+# speed up memory downloads
+arm7 fast_memory_access enable
+arm7_9 dcc_downloads enable
+
+# OpenOCD does not have a flash driver for for AT91FR40162S
+target_script 0 reset event/at91eb40a_reset.cfg
+
+# required for usable performance. Used for lots of
+# other things than flash programming.
+working_area 0 0x00000000 0x20000 nobackup
+
+#force hardware values - we're running out of flash more
+#often than not. The user can disable this in his
+#subsequent config script.
+arm7_9 force_hw_bkpts enable