OpenOCD configuration for SAM7S. Should be merged into ../../common/openocd
This commit is contained in:
parent
2166261890
commit
4a82069f15
1
cpu/arm/at91sam7s/openocd/AT91SAM7x_init.script
Normal file
1
cpu/arm/at91sam7s/openocd/AT91SAM7x_init.script
Normal file
|
@ -0,0 +1 @@
|
|||
arm7_9 force_hw_bkpts enable
|
18
cpu/arm/at91sam7s/openocd/arm7_wig.cfg
Normal file
18
cpu/arm/at91sam7s/openocd/arm7_wig.cfg
Normal file
|
@ -0,0 +1,18 @@
|
|||
|
||||
|
||||
# Change the default telnet port...
|
||||
telnet_port 4444
|
||||
# GDB connects here
|
||||
gdb_port 3333
|
||||
# GDB can also flash my flash!
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program enable
|
||||
|
||||
# Wiggler interface
|
||||
interface parport
|
||||
parport_port 0
|
||||
parport_cable wiggler
|
||||
jtag_speed 0
|
||||
set CPUTAPID 0x3f0f0f0f
|
||||
source [find target/sam7s.cfg]
|
||||
|
30
cpu/arm/at91sam7s/openocd/arm7_wig_flash.cfg
Normal file
30
cpu/arm/at91sam7s/openocd/arm7_wig_flash.cfg
Normal file
|
@ -0,0 +1,30 @@
|
|||
#daemon configuration
|
||||
telnet_port 4444
|
||||
gdb_port 3333
|
||||
|
||||
#interface
|
||||
interface parport
|
||||
parport_port 0
|
||||
parport_cable wiggler
|
||||
jtag_speed 0
|
||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
||||
reset_config srst_only
|
||||
|
||||
#jtag scan chain
|
||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
||||
jtag_device 4 0x1 0xf 0xe
|
||||
|
||||
#target configuration
|
||||
daemon_startup reset
|
||||
#target <type> <startup mode>
|
||||
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
|
||||
target arm7tdmi little run_and_init 0 arm7tdmi_r4
|
||||
#target_script 0 reset h2294_init.script
|
||||
target_script 0 reset openocd_flash
|
||||
run_and_halt_time 0 30
|
||||
working_area 0 0x40000000 0x4000 nobackup
|
||||
|
||||
#flash configuration
|
||||
#flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum
|
||||
#flash bank cfi 0x80000000 0x400000 2 2 0
|
||||
flash bank at91sam7 0 0 0 0 0
|
30
cpu/arm/at91sam7s/openocd/arm7_wig_reset.cfg
Normal file
30
cpu/arm/at91sam7s/openocd/arm7_wig_reset.cfg
Normal file
|
@ -0,0 +1,30 @@
|
|||
#daemon configuration
|
||||
telnet_port 4444
|
||||
gdb_port 3333
|
||||
|
||||
#interface
|
||||
interface parport
|
||||
parport_port 0
|
||||
parport_cable wiggler
|
||||
jtag_speed 0
|
||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
||||
reset_config srst_only
|
||||
|
||||
#jtag scan chain
|
||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
||||
jtag_device 4 0x1 0xf 0xe
|
||||
|
||||
#target configuration
|
||||
daemon_startup reset
|
||||
#target <type> <startup mode>
|
||||
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
|
||||
target arm7tdmi little run_and_init 0 arm7tdmi_r4
|
||||
#target_script 0 reset h2294_init.script
|
||||
target_script 0 reset openocd_reset
|
||||
run_and_halt_time 0 30
|
||||
working_area 0 0x40000000 0x4000 nobackup
|
||||
|
||||
#flash configuration
|
||||
#flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum
|
||||
#flash bank cfi 0x80000000 0x400000 2 2 0
|
||||
flash bank at91sam7 0 0 0 0 0
|
10
cpu/arm/at91sam7s/openocd/openocd_flash
Normal file
10
cpu/arm/at91sam7s/openocd/openocd_flash
Normal file
|
@ -0,0 +1,10 @@
|
|||
poll
|
||||
mww 0xffffff64 0x5a000004
|
||||
sleep 250
|
||||
mww 0xffffff64 0x5a002004
|
||||
sleep 250
|
||||
flash probe 0
|
||||
flash write 0 /tmp/openocd_write.bin 0x0
|
||||
reset run
|
||||
sleep 500
|
||||
shutdown
|
4
cpu/arm/at91sam7s/openocd/openocd_reset
Normal file
4
cpu/arm/at91sam7s/openocd/openocd_reset
Normal file
|
@ -0,0 +1,4 @@
|
|||
poll
|
||||
reset run
|
||||
sleep 500
|
||||
shutdown
|
36
cpu/arm/at91sam7s/openocd/target/sam7s.cfg
Normal file
36
cpu/arm/at91sam7s/openocd/target/sam7s.cfg
Normal file
|
@ -0,0 +1,36 @@
|
|||
# ATMEL sam7s
|
||||
|
||||
if { [info exists CHIPNAME] } {
|
||||
set _CHIPNAME $CHIPNAME
|
||||
} else {
|
||||
set _CHIPNAME sam7s
|
||||
}
|
||||
|
||||
if { [info exists ENDIAN] } {
|
||||
set _ENDIAN $ENDIAN
|
||||
} else {
|
||||
set _ENDIAN little
|
||||
}
|
||||
|
||||
if { [info exists CPUTAPID ] } {
|
||||
set _CPUTAPID $CPUTAPID
|
||||
} else {
|
||||
# force an error till we get a good number
|
||||
set _CPUTAPID 0xffffffff
|
||||
}
|
||||
|
||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
||||
reset_config srst_only
|
||||
|
||||
#jtag scan chain
|
||||
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
|
||||
|
||||
# The target
|
||||
set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
|
||||
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi
|
||||
|
||||
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0
|
||||
|
||||
flash bank at91sam7 0 0 0 0 0
|
||||
|
||||
|
Loading…
Reference in a new issue