tcl/board: Add am625 native swd configuration

Direct memory driver swd native configuration for am625.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Jason Peck <jpeck@ti.com>
Change-Id: I6cf521fe9af0a4b8f8ab4853bc25722368b713e6
Reviewed-on: https://review.openocd.org/c/openocd/+/7091
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
This commit is contained in:
Nishanth Menon 2022-07-14 16:37:54 -05:00 committed by Antonio Borneo
parent 42872d18bf
commit 3223b49c40
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,22 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022-2023 Texas Instruments Incorporated - http://www.ti.com/
#
# Texas Instruments am625
# Link: https://www.ti.com/product/AM625
#
# This configuration file is used as a self hosted debug configuration that
# works on every AM625 platform based on firewall configuration permitted
# in the system.
#
# In this system openOCD runs on one of the CPUs inside AM625 and provides
# network ports that can then be used to debug the microcontrollers on the
# SoC - either self hosted IDE OR remotely.
# We are using dmem, which uses dapdirect_swd transport
adapter driver dmem
if { ![info exists SOC] } {
set SOC am625
}
source [find target/ti_k3.cfg]

View File

@ -120,6 +120,16 @@ switch $_soc {
# M4 processor
set _gp_mcu_cores 1
set _gp_mcu_ap_unlock_offsets {0xf0 0x7c}
# Setup DMEM access descriptions
# DAPBUS (Debugger) description
set _dmem_base_address 0x740002000
set _dmem_ap_address_offset 0x100
set _dmem_max_aps 10
# Emulated AP description
set _dmem_emu_base_address 0x760000000
set _dmem_emu_base_address_map_to 0x1d500000
set _dmem_emu_ap_list 1
}
am62a7 {
set _CHIPNAME am62a7
@ -329,3 +339,22 @@ if { $_gp_mcu_cores != 0 } {
halt 1000
}
}
# In case of DMEM access, configure the dmem adapter with offsets from above.
if { 0 == [string compare [adapter name] dmem ] } {
if { [info exists _dmem_base_address] } {
# DAPBUS (Debugger) description
dmem base_address $_dmem_base_address
dmem ap_address_offset $_dmem_ap_address_offset
dmem max_aps $_dmem_max_aps
# The following are the details of APs to be emulated for direct address access.
# Debug Config (Debugger) description
dmem emu_base_address_range $_dmem_emu_base_address $_dmem_emu_base_address_map_to
dmem emu_ap_list $_dmem_emu_ap_list
# We are going local bus, so speed is really dummy here.
adapter speed 2500
} else {
puts "ERROR: ${SOC} data is missing to support dmem access!"
}
}