mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
openocd: update configuration files
1. use ftdi interface driver instead of deprecated ft2232 2. remove custom target config and use upstream stellaris target 3. replaced deprecated servo_v2.cfg with servo_v2_slower.cfg 4. deprecated openocd.cfg BUG=none BRANCH=none TEST=flash samus works CQ-DEPEND=CL:210778 Change-Id: I572a717613eedc3afc44009a0f1aba1f1d36d7f7 Signed-off-by: Dominic Chen <ddchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/210920 Reviewed-by: Todd Broch <tbroch@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
5c5f832da9
commit
fd9eed96fd
@@ -1,44 +0,0 @@
|
||||
# Script for TI/Luminary Stellaris LM4F232H (LM4F232H5BB) and TM4E1G31H6ZRB.
|
||||
|
||||
if { [info exists CHIPNAME] } {
|
||||
set _CHIPNAME $CHIPNAME
|
||||
} else {
|
||||
set _CHIPNAME lm4f232h
|
||||
}
|
||||
|
||||
if { [info exists CPUTAPID ] } {
|
||||
set _CPUTAPID $CPUTAPID
|
||||
} else {
|
||||
set _CPUTAPID 0x4ba00477
|
||||
}
|
||||
|
||||
#jtag scan chain
|
||||
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 1 -irmask 0xf -expected-id $_CPUTAPID
|
||||
|
||||
# the lm3s luminary variant causes a software reset rather than asserting SRST
|
||||
# this stops the debug registers from being cleared
|
||||
# this will be fixed in later revisions of silicon
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
target create $_TARGETNAME cortex_m3 -chain-position $_CHIPNAME.cpu -variant lm3s
|
||||
|
||||
# 8k working area at base of ram, not backed up
|
||||
#$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x2000
|
||||
# 12k working area at base of ram, not backed up
|
||||
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x3000
|
||||
|
||||
# Use system reset request, since LM4 doesn't support vectreset
|
||||
cortex_m3 reset_config sysresetreq
|
||||
|
||||
# Ensure that the watchdog is properly disabled when doing flashing
|
||||
$_TARGETNAME configure -event reset-init {
|
||||
# Unlock watchdog0
|
||||
mww 0x40000c00 0x1ACCE551
|
||||
# Disable Watchdog0
|
||||
mww 0x40000008 0
|
||||
}
|
||||
|
||||
#flash configuration
|
||||
flash bank internal stellaris 0 0 0 0 $_TARGETNAME
|
||||
|
||||
# useful command definitions for software loading
|
||||
source [find lm4x_cmds.tcl]
|
||||
@@ -1,7 +0,0 @@
|
||||
telnet_port 4444
|
||||
gdb_port 3333
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program enable
|
||||
|
||||
source [find interface/luminary-icdi.cfg]
|
||||
source [find lm4x.cfg]
|
||||
15
chip/lm4/openocd/samus.cfg
Normal file
15
chip/lm4/openocd/samus.cfg
Normal file
@@ -0,0 +1,15 @@
|
||||
telnet_port 4444
|
||||
gdb_port 3333
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program enable
|
||||
|
||||
interface ftdi
|
||||
ftdi_vid_pid 0x18d1 0x500d
|
||||
ftdi_layout_init 0x0c08 0x0f1b
|
||||
ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
|
||||
ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
|
||||
|
||||
source [find target/stellaris.cfg]
|
||||
source [find lm4x_cmds.tcl]
|
||||
|
||||
adapter_khz 50
|
||||
@@ -3,9 +3,11 @@ gdb_port 3333
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program enable
|
||||
|
||||
interface ft2232
|
||||
ft2232_layout jtagkey
|
||||
ft2232_vid_pid 0x18d1 0x5002
|
||||
jtag_khz 0
|
||||
jtag_rclk 6000
|
||||
source [find lm4x.cfg]
|
||||
interface ftdi
|
||||
ftdi_vid_pid 0x18d1 0x5002
|
||||
ftdi_layout_init 0x0c08 0x0f1b
|
||||
ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
|
||||
ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
|
||||
|
||||
source [find target/stellaris.cfg]
|
||||
source [find lm4x_cmds.tcl]
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
telnet_port 4444
|
||||
gdb_port 3333
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program enable
|
||||
|
||||
interface ft2232
|
||||
ft2232_layout jtagkey
|
||||
ft2232_vid_pid 0x18d1 0x5002
|
||||
adapter_khz 600
|
||||
#jtag_khz 600
|
||||
#jtag_khz 0
|
||||
#jtag_rclk 6000
|
||||
source [find lm4x.cfg]
|
||||
@@ -3,8 +3,11 @@ gdb_port 3333
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program enable
|
||||
|
||||
interface ft2232
|
||||
ft2232_layout jtagkey
|
||||
ft2232_vid_pid 0x0403 0x6014
|
||||
jtag_khz 600
|
||||
source [find lm4x.cfg]
|
||||
interface ftdi
|
||||
ftdi_vid_pid 0x18d1 0x5004
|
||||
ftdi_layout_init 0x0c08 0x0f1b
|
||||
ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
|
||||
ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
|
||||
|
||||
source [find target/stellaris.cfg]
|
||||
source [find lm4x_cmds.tcl]
|
||||
|
||||
@@ -332,7 +332,7 @@ function flash_stm32_dfu() {
|
||||
function flash_link() {
|
||||
[[ -n "${EC_DIR}" ]] || die "Cannot locate openocd script"
|
||||
|
||||
OCD_CFG="servo_v2_slower.cfg"
|
||||
OCD_CFG="servo_v2.cfg"
|
||||
OCD_PATH="${EC_DIR}/chip/lm4/openocd"
|
||||
OCD_CMDS="init; flash_lm4 ${IMG} ${FLAGS_offset};"
|
||||
if [ "${FLAGS_unprotect}" = ${FLAGS_TRUE} ] ; then
|
||||
@@ -351,7 +351,7 @@ function flash_link() {
|
||||
function flash_lm4() {
|
||||
[[ -n "${EC_DIR}" ]] || die "Cannot locate openocd script"
|
||||
|
||||
OCD_CFG="servo_v2_slower.cfg"
|
||||
OCD_CFG="servo_v2.cfg"
|
||||
OCD_PATH="${EC_DIR}/chip/lm4/openocd"
|
||||
OCD_CMDS="init; flash_lm4 ${IMG} ${FLAGS_offset};"
|
||||
if [ "${FLAGS_unprotect}" = ${FLAGS_TRUE} ] ; then
|
||||
|
||||
Reference in New Issue
Block a user