diff options
author | Bert Lange <b.lange@fzd.de> | 2011-11-07 15:41:50 +0100 |
---|---|---|
committer | Bert Lange <b.lange@fzd.de> | 2011-11-07 15:41:50 +0100 |
commit | d190f1c37139ec38667a3d6e566dbe1b0549f84d (patch) | |
tree | 7885f39318cb7852afc24992dd08cb6bb953ac03 /uc_str912/scripts | |
parent | acc2681723f43b3c8ccb29055bec9d63cb863c78 (diff) | |
download | zpu-d190f1c37139ec38667a3d6e566dbe1b0549f84d.zip zpu-d190f1c37139ec38667a3d6e566dbe1b0549f84d.tar.gz |
initial commit
Diffstat (limited to 'uc_str912/scripts')
-rw-r--r-- | uc_str912/scripts/flash_str9.ld | 137 | ||||
-rw-r--r-- | uc_str912/scripts/load.gdb | 24 | ||||
-rw-r--r-- | uc_str912/scripts/load_amontec.gdb | 20 | ||||
-rw-r--r-- | uc_str912/scripts/load_segger.gdb | 18 | ||||
-rw-r--r-- | uc_str912/scripts/str912_rom.ld | 249 | ||||
-rw-r--r-- | uc_str912/scripts/str912fw44.ld | 61 | ||||
-rw-r--r-- | uc_str912/scripts/str91x-configs/str91x_flash.gdb | 6 | ||||
-rw-r--r-- | uc_str912/scripts/str91x-configs/str91x_flasherase.ocd | 6 | ||||
-rw-r--r-- | uc_str912/scripts/str91x-configs/str91x_flashprobe.gdb | 10 | ||||
-rw-r--r-- | uc_str912/scripts/str91x-configs/str91x_flashprogram.ocd | 7 | ||||
-rw-r--r-- | uc_str912/scripts/str91x-configs/str91x_jtagkey-flash-erase.cfg | 43 | ||||
-rw-r--r-- | uc_str912/scripts/str91x-configs/str91x_jtagkey-flash-program.cfg | 43 | ||||
-rw-r--r-- | uc_str912/scripts/str91x-configs/str91x_jtagkey.cfg | 42 | ||||
-rw-r--r-- | uc_str912/scripts/str91x-configs/str91x_ram.gdb | 6 | ||||
-rw-r--r-- | uc_str912/scripts/test.gdb | 42 |
15 files changed, 714 insertions, 0 deletions
diff --git a/uc_str912/scripts/flash_str9.ld b/uc_str912/scripts/flash_str9.ld new file mode 100644 index 0000000..7bd5a06 --- /dev/null +++ b/uc_str912/scripts/flash_str9.ld @@ -0,0 +1,137 @@ +/*** Linker Script File ***/ +/*** Hitex/We/2006-04-24 ***/ + +/* Memory Definitions */ +/* for STR912-Eval */ + + + +MEMORY +{ + IntCodeFlash (rx) : ORIGIN = 0x00000000, LENGTH = 512k + IntDataRAM (rw) : ORIGIN = 0x04000000, LENGTH = 96k + IntDataEth (!rx) : ORIGIN = 0x07C00000, LENGTH = 0x42F /* AHB nonbuffered Ethernet RAM */ +} + +/* this address is used in startup for initilizing stack */ +/* stack is at the end of data range */ + +PROVIDE(_top_stack_ = 0x4018000 -4); + +SECTIONS +{ + + /* first section is .text which is used for code */ + .start : { *(.startup)} >IntCodeFlash = 0 + .text : + { + /* here is the path to change and Processor-specific ISR_XXX-file */ + ./startup912.o (.text) /* Startup code */ + ./*(.text) /* remaining code */ + *(.glue_7t) + *(.glue_7) + } >IntCodeFlash =0 + + __end_of_text__ = .; + + __exidx_start = .; + .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } + __exidx_end = .; + + + + . = ALIGN(4); + + /* .rodata section which is used for read-only data (constants) */ + + .rodata . : + { + *(.rodata) + } >IntCodeFlash + + . = ALIGN(4); + + _etext = . ; + PROVIDE (etext = .); + + /* .data section which is used for initialized data */ + + .data : AT (_etext) + { + _data = . ; + __data_beg_src__ = __end_of_text__; + __data_start__ = . ; + PROVIDE (__data_start__ = .) ; + *(.data) + SORT(CONSTRUCTORS) + *(.ramfunc) + } >IntDataRAM + . = ALIGN(4); + + _edata = . ; + PROVIDE (edata = .); + + /* .bss section which is used for uninitialized data */ + + .bss : + { + __bss_start = . ; + __bss_start__ = . ; + *(.bss) + *(COMMON) + } >IntDataRAM + . = ALIGN(4); + __bss_end__ = . ; + __bss_end = . ; + + _end = .; + PROVIDE (end = .); + +.bss2 : + { + /* used for uninitialized data */ + + __bss2_start = . ; + __bss2_start__ = . ; + *(COMMON) + . = ALIGN(4); + __bss2_end__ = . ; + + } >IntDataRAM + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } +} + + diff --git a/uc_str912/scripts/load.gdb b/uc_str912/scripts/load.gdb new file mode 100644 index 0000000..90cab56 --- /dev/null +++ b/uc_str912/scripts/load.gdb @@ -0,0 +1,24 @@ +set complaints 1 +set output-radix 16 +set input-radix 16 +set prompt (arm-gdb) +target remote localhost:3333 +monitor reset init +monitor halt +# 16 = 450 bytes/sec +# 32 = 870 bytes/sec +# 64 = 1 kbyte/sec c bleibt nicht stehen +# 127 = 2 kbyte/sec c bleibt nicht stehen +# 250 = 4 kbyte/sec +# 500 = 5 kbyte/sec +# 1000 = 7 kbyte/sec +# 2000 = 8 kbyte/sec +# 3000 = 8 kbyte/sec +monitor jtag_rclk 3000 +monitor str9x flash_config 0 4 2 0x00000 0x80000 +monitor flash protect 0 0 7 off +monitor flash protect_check 0 +pwd +load main.elf +file main.elf +#monitor jtag_rclk 3000 diff --git a/uc_str912/scripts/load_amontec.gdb b/uc_str912/scripts/load_amontec.gdb new file mode 100644 index 0000000..a846f82 --- /dev/null +++ b/uc_str912/scripts/load_amontec.gdb @@ -0,0 +1,20 @@ +set complaints 1 +set output-radix 16 +set input-radix 16 +set prompt (arm-gdb) + +target remote localhost:3333 + + +monitor reset init +monitor halt +monitor jtag_rclk 1000 +monitor str9x flash_config 0 4 2 0x00000 0x80000 +monitor flash protect 0 0 7 off +monitor flash erase_sector 0 0 7 + + + +pwd +load main.elf +#load test_led.elf diff --git a/uc_str912/scripts/load_segger.gdb b/uc_str912/scripts/load_segger.gdb new file mode 100644 index 0000000..569b5dc --- /dev/null +++ b/uc_str912/scripts/load_segger.gdb @@ -0,0 +1,18 @@ +set complaints 1 +set output-radix 16 +set input-radix 16 +set prompt (arm-gdb) + +target remote localhost:2331 + +monitor speed adaptive +monitor endian little + +monitor reset +monitor flash device = STR912 +monitor flash download = 1 +monitor halt + +pwd +load main.elf +file main.elf diff --git a/uc_str912/scripts/str912_rom.ld b/uc_str912/scripts/str912_rom.ld new file mode 100644 index 0000000..8cbb7f7 --- /dev/null +++ b/uc_str912/scripts/str912_rom.ld @@ -0,0 +1,249 @@ +/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 0;
+ _STACKSIZE_SVC = 1024;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
+ DATA (rw) : ORIGIN = 0x04000000, LENGTH = 0x00018000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ CREATE_OBJECT_SYMBOLS
+ KEEP(*(.vectors))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ .init_array :
+ {
+ *(.init)
+ *(.fini)
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >CODE
+
+ . = ALIGN(4);
+
+ /* .ARM.exidx is sorted, so has to go in its own output section. */
+ __exidx_start = .;
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ } >CODE
+ __exidx_end = .;
+
+ _etext = .;
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
diff --git a/uc_str912/scripts/str912fw44.ld b/uc_str912/scripts/str912fw44.ld new file mode 100644 index 0000000..feabaa4 --- /dev/null +++ b/uc_str912/scripts/str912fw44.ld @@ -0,0 +1,61 @@ +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") +OUTPUT_ARCH(arm) + +MEMORY +{ + flash (RX) : ORIGIN = 0x00000000, LENGTH = 512k + sram (W!RX) : ORIGIN = 0x04000000, LENGTH = 96k +} + +SECTIONS +{ + .fixed : + { + . = ALIGN(4); + _sfixed = .; + *(.text .text.*) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + } >flash + +/* .ARM.extab : { *(.ARM.extab*) } */ + + . = ALIGN(4); + + __exidx_start = .; + .ARM.exidx : { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } >flash + __exidx_end = .; + + . = ALIGN(4); + + _efixed = .; + PROVIDE(etext = .); + + .relocate : AT (_efixed) + { + . = ALIGN(4); + _srelocate = .; + *(.data .data.*) + *(.gnu.linkonce.d.*) + . = ALIGN(4); + _erelocate = .; + } >sram + + .bss (NOLOAD) : { + _szero = .; + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + . = ALIGN(4); + _ezero = .; + } >sram + . = ALIGN(4); + + end = .; +} diff --git a/uc_str912/scripts/str91x-configs/str91x_flash.gdb b/uc_str912/scripts/str91x-configs/str91x_flash.gdb new file mode 100644 index 0000000..2c194e2 --- /dev/null +++ b/uc_str912/scripts/str91x-configs/str91x_flash.gdb @@ -0,0 +1,6 @@ +target remote localhost:3333
+monitor reset
+monitor sleep 500
+monitor poll
+monitor soft_reset_halt
+monitor arm7_9 force_hw_bkpts enable
diff --git a/uc_str912/scripts/str91x-configs/str91x_flasherase.ocd b/uc_str912/scripts/str91x-configs/str91x_flasherase.ocd new file mode 100644 index 0000000..7b998ea --- /dev/null +++ b/uc_str912/scripts/str91x-configs/str91x_flasherase.ocd @@ -0,0 +1,6 @@ +wait_halt
+str9x flash_config 4 2 0 0x80000
+flash protect 0 0 10 off
+flash erase 0 0 10
+reset
+shutdown
diff --git a/uc_str912/scripts/str91x-configs/str91x_flashprobe.gdb b/uc_str912/scripts/str91x-configs/str91x_flashprobe.gdb new file mode 100644 index 0000000..aa528d3 --- /dev/null +++ b/uc_str912/scripts/str91x-configs/str91x_flashprobe.gdb @@ -0,0 +1,10 @@ +target remote localhost:3333
+monitor reset
+monitor sleep 500
+monitor poll
+monitor soft_reset_halt
+monitor flash protect 0 0 10 off
+monitor flash probe 0
+monitor flash info 0
+monitor reset run
+monitor sleep 500
diff --git a/uc_str912/scripts/str91x-configs/str91x_flashprogram.ocd b/uc_str912/scripts/str91x-configs/str91x_flashprogram.ocd new file mode 100644 index 0000000..ad854e1 --- /dev/null +++ b/uc_str912/scripts/str91x-configs/str91x_flashprogram.ocd @@ -0,0 +1,7 @@ +wait_halt
+str9x flash_config 4 2 0 0x80000
+flash protect 0 0 10 off
+flash erase 0 0 10
+flash write 0 main.bin 0
+reset
+shutdown
diff --git a/uc_str912/scripts/str91x-configs/str91x_jtagkey-flash-erase.cfg b/uc_str912/scripts/str91x-configs/str91x_jtagkey-flash-erase.cfg new file mode 100644 index 0000000..16567d3 --- /dev/null +++ b/uc_str912/scripts/str91x-configs/str91x_jtagkey-flash-erase.cfg @@ -0,0 +1,43 @@ +#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+
+#interface
+interface ft2232
+ft2232_device_desc "Amontec JTAGkey A"
+ft2232_layout jtagkey
+#jtag_speed 1
+jtag_nsrst_delay 200
+jtag_ntrst_delay 200
+
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst
+
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 8 0x1 0x1 0xfe
+jtag_device 4 0x1 0xf 0xe
+jtag_device 5 0x1 0x1 0x1e
+
+
+#target configuration
+daemon_startup reset
+
+
+#target <type> <startup mode>
+#target arm966e <endianness> <reset mode> <chainpos> <variant>
+target arm966e little reset_init 1 arm966e
+run_and_halt_time 0 30
+
+
+working_area 0 0x50000000 16384 nobackup
+
+
+#flash bank <driver> <base> <size> <chip_width> <bus_width>
+flash bank str9x 0x00000000 0x00080000 0 0 0
+
+#Script used for FLASH erasing
+target_script 0 reset C:\openocd-configs\str91x-configs\str91x_flasherase.ocd
diff --git a/uc_str912/scripts/str91x-configs/str91x_jtagkey-flash-program.cfg b/uc_str912/scripts/str91x-configs/str91x_jtagkey-flash-program.cfg new file mode 100644 index 0000000..c264096 --- /dev/null +++ b/uc_str912/scripts/str91x-configs/str91x_jtagkey-flash-program.cfg @@ -0,0 +1,43 @@ +#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+
+#interface
+interface ft2232
+ft2232_device_desc "Amontec JTAGkey A"
+ft2232_layout jtagkey
+#jtag_speed 1
+jtag_nsrst_delay 200
+jtag_ntrst_delay 200
+
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst
+
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 8 0x1 0x1 0xfe
+jtag_device 4 0x1 0xf 0xe
+jtag_device 5 0x1 0x1 0x1e
+
+
+#target configuration
+daemon_startup reset
+
+
+#target <type> <startup mode>
+#target arm966e <endianness> <reset mode> <chainpos> <variant>
+target arm966e little reset_init 1 arm966e
+run_and_halt_time 0 30
+
+
+working_area 0 0x50000000 16384 nobackup
+
+
+#flash bank <driver> <base> <size> <chip_width> <bus_width>
+flash bank str9x 0x00000000 0x00080000 0 0 0
+
+#Script used for FLASH programming
+target_script 0 reset C:\openocd-configs\str91x-configs\str91x_flashprogram.ocd
diff --git a/uc_str912/scripts/str91x-configs/str91x_jtagkey.cfg b/uc_str912/scripts/str91x-configs/str91x_jtagkey.cfg new file mode 100644 index 0000000..6394ddc --- /dev/null +++ b/uc_str912/scripts/str91x-configs/str91x_jtagkey.cfg @@ -0,0 +1,42 @@ +#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+
+#interface
+interface ft2232
+ft2232_device_desc "Amontec JTAGkey A"
+ft2232_layout jtagkey
+#jtag_speed 1
+
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst
+
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 8 0x1 0x1 0xfe
+jtag_device 4 0x1 0xf 0xe
+jtag_device 5 0x1 0x1 0x1e
+
+
+#target configuration
+daemon_startup reset
+
+
+#target <type> <startup mode>
+#target arm966e <endianness> <reset mode> <chainpos> <variant>
+target arm966e little reset_halt 1 arm966e
+run_and_halt_time 0 30
+
+
+working_area 0 0x50000000 16384 nobackup
+
+
+#flash bank <driver> <base> <size> <chip_width> <bus_width>
+flash bank str9x 0x00000000 0x00080000 0 0 0
+
+
+# For more information about the configuration files, take a look at:
+# http://openfacts.berlios.de/index-en.phtml?title=Open On-Chip Debugger
diff --git a/uc_str912/scripts/str91x-configs/str91x_ram.gdb b/uc_str912/scripts/str91x-configs/str91x_ram.gdb new file mode 100644 index 0000000..de9e060 --- /dev/null +++ b/uc_str912/scripts/str91x-configs/str91x_ram.gdb @@ -0,0 +1,6 @@ +target remote localhost:3333
+monitor reset
+monitor sleep 500
+monitor poll
+monitor soft_reset_halt
+monitor arm7_9 sw_bkpts enable
diff --git a/uc_str912/scripts/test.gdb b/uc_str912/scripts/test.gdb new file mode 100644 index 0000000..adca3a3 --- /dev/null +++ b/uc_str912/scripts/test.gdb @@ -0,0 +1,42 @@ +set complaints 1 +set output-radix 16 +set input-radix 16 +set prompt (arm-gdb) +target remote localhost:3333 +monitor reset +monitor jtag_rclk 1000 +#monitor arm7_9 dcc_downloads enable +#monitor arm7_9 fast_memory_access enable +monitor poll +monitor halt +#bbsr = FMI_BBSR +#nbsr = FMI_NBBSR +# info lt. RM0006 +# BBSIZE +# 0000 = 32 kB +# 0001 = 64 kB +# 1011 = 64 MByte +# NBBSIZE +# 0000 = 8 kB +# 0001 = 16 kB +# 1011 = 64 MByte +monitor str9x flash_config 0 4 2 0x00000 0x80000 +monitor flash protect 0 0 7 off +monitor flash protect_check 0 +monitor flash info 0 + +set remotetimeout 10000 + +pwd + +#monitor flash write_image erase ../main.elf 0 elf +#monitor flash write_image erase ../main.hex 0 ihex +#monitor flash write_image erase ../main.bin 0 bin +#monitor flash write_image erase ../test_led.elf 0 elf +#load test_led.elf +load main.elf + +#monitor sleep 200 +#monitor reset +kill +quit |