mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-05 06:21:53 +00:00
The original _CHIPNAME for npcx ec in the openocd configuration file is npcx5m5g. As we introduce more npcx ec SKUs, it is not appropriate to keep using this name. This CL modifies the _CHIPNAME to a generic name(npcx_ec). BRANCH=none BUG=none TEST=./util/flash_ec --board=npcx7_evb; check the openocd log and make sure the _CHIPNAME is npcx_ec now. Signed-off-by: CHLin <CHLIN56@nuvoton.com> Change-Id: I49d298de1e43ac29f3e5535702595ee27225ac23 Signed-off-by: CHLin <CHLIN56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/576604 Commit-Ready: Jun Lin <riverq@gmail.com> Tested-by: Jun Lin <riverq@gmail.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
62 lines
1.3 KiB
INI
62 lines
1.3 KiB
INI
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# nuvoton-m4 devices support both JTAG and SWD transports.
|
|
#
|
|
|
|
source [find target/swj-dp.tcl]
|
|
|
|
if { [info exists CHIPNAME] } {
|
|
set _CHIPNAME $CHIPNAME
|
|
} else {
|
|
set _CHIPNAME npcx_ec
|
|
}
|
|
|
|
if { [info exists ENDIAN] } {
|
|
set _ENDIAN $ENDIAN
|
|
} else {
|
|
set _ENDIAN little
|
|
}
|
|
|
|
# Work-area is a space in RAM used for flash programming
|
|
# By default use 16kB
|
|
if { [info exists WORKAREASIZE] } {
|
|
set _WORKAREASIZE $WORKAREASIZE
|
|
} else {
|
|
set _WORKAREASIZE 0x8000
|
|
}
|
|
|
|
#jtag scan chain
|
|
if { [info exists CPUTAPID ] } {
|
|
set _CPUTAPID $CPUTAPID
|
|
} else {
|
|
set _CPUTAPID 0x4BA00477
|
|
}
|
|
|
|
#jtag newtap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
|
|
swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
|
|
|
|
set _TARGETNAME $_CHIPNAME.cpu
|
|
target create $_TARGETNAME cortex_m -endian $_ENDIAN -chain-position \
|
|
$_CHIPNAME.cpu -work-area-phys 0x200C0000 \
|
|
-work-area-size $_WORKAREASIZE
|
|
|
|
# JTAG speed
|
|
adapter_khz 100
|
|
|
|
adapter_nsrst_delay 100
|
|
jtag_ntrst_delay 100
|
|
|
|
# use sysresetreq to perform a system reset
|
|
cortex_m reset_config sysresetreq
|
|
|
|
#reset configuration
|
|
reset_config trst_and_srst
|
|
|
|
$_TARGETNAME configure -event reset-start {
|
|
echo "NPCX Reset..."
|
|
halt
|
|
adapter_khz 1000
|
|
}
|