summaryrefslogtreecommitdiff
path: root/bsp/hpmicro/hpm6300evk/board/debug_scripts/openocd/soc/hpm6360.cfg
blob: eaf29249623e48a42d1faa24f2d82f9c260ae2fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright (c) 2021,2025 HPMicro
# SPDX-License-Identifier: BSD-3-Clause

if { [info exists CHIPNAME] } {
    set _CHIP $CHIPNAME
} else {
    set _CHIP hpm6360
}
set _CPUTAPID 0x1000563D
jtag newtap $_CHIP cpu -irlen 5 -expected-id $_CPUTAPID

set _TARGET0 $_CHIP.cpu0
target create $_TARGET0 riscv -chain-position $_CHIP.cpu -coreid 0

$_TARGET0 configure -work-area-phys 0x00000000 -work-area-size 0x20000 -work-area-backup 0

targets $_TARGET0

source [file join [file dirname [info script]] hpm_common.cfg]
source [file join [file dirname [info script]] hpm_common_csr.cfg]

proc reset_soc {} {
    sba_write_mem 0xF40C001C 24000000
}