2 # PFW-WIRELESS - Atheros AR2317 target gdbinit script.
4 # (C) Copyright 2007-2008, Greg Ungerer <gerg@snapgear.com>
9 monitor char 0x1110000f = 0x83
10 monitor char 0x11100003 = 0x15
11 monitor char 0x11100007 = 0x00
12 monitor char 0x1110000f = 0x03
16 monitor char 0x11100003 = $arg0
21 monitor char 0x11100003 = 0x55
31 # set MEMCTL_SCONR for xxx
32 monitor long 0x10300000 = 0x00001168
33 # set MEMCTL_STMG0R for xxx
34 monitor long 0x10300004 = 0x02265696
35 # set MEMCTL_STMG1R for xxx
36 monitor long 0x10300008 = 0x00070008
37 # set MEMCTL_SCTLR for xxx
38 monitor long 0x1030000c = 0x00003088
39 # set MEMCTL_SREFR for xxx
40 monitor long 0x10300010 = 0x00000410
45 # Set of flash programming macros for SPI flash
48 define spi-write-enable
49 monitor long 0x1f000000 = 1
50 monitor long 0x1f000008 = 0x70000
51 monitor long 0x1f000008 = 0x60000
53 monitor long 0x1f000008 = 0x70000
54 monitor long 0x1f000000 = 0
60 set $addrend = $addr + $arg1
63 monitor long 0x1f000000 = 1
64 monitor long 0x1f000008 = 0x70000
65 monitor long 0x1f000008 = 0x60000
69 while ($addr < $addrend)
70 set $val = *((unsigned char *) $addr)
75 monitor long 0x1f000008 = 0x70000
76 monitor long 0x1f000000 = 0
80 define spi-erase-sector
83 monitor long 0x1f000000 = 1
84 monitor long 0x1f000008 = 0x70000
85 monitor long 0x1f000008 = 0x60000
88 monitor long 0x1f000008 = 0x70000
89 monitor long 0x1f000000 = 0
94 monitor long 0x11300004 = 0x000000ab
95 monitor long 0x11300008 = 0x00000000
96 monitor long 0x11300000 = 0x00000114
97 monitor long 0x11300000
98 monitor long 0x11300008
103 # Complete flash programming macros.
109 #load tools/bin/ar2317-flasher
117 # Real startup now...
122 target remote localhost:8888
127 #monitor endian little