From 5ea20d7ed99e252947a85f93db870109cc094efc Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Wed, 18 Oct 2023 13:45:39 -0500 Subject: [PATCH] tcl/target/ti_k3: Convert memory access ap port num as a variable Convert the memory access ap port num as a variable to allow support for the AM2x family of K3 SoCs. Change-Id: Ibd96c94055721f60d95179dab21d014c15b0f562 Signed-off-by: Nishanth Menon Reviewed-on: https://review.openocd.org/c/openocd/+/7943 Reviewed-by: Antonio Borneo Tested-by: jenkins --- tcl/target/ti_k3.cfg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tcl/target/ti_k3.cfg b/tcl/target/ti_k3.cfg index e05b81a17c..bb2a991ce5 100644 --- a/tcl/target/ti_k3.cfg +++ b/tcl/target/ti_k3.cfg @@ -66,6 +66,9 @@ set _gp_mcu_cores 0 # General Purpose MCU power-ap unlock offsets set _gp_mcu_ap_unlock_offsets {0xf0 0x60} +# Generic mem-ap port number +set _mem_ap_num 2 + # Set configuration overrides for each SOC switch $_soc { am654 { @@ -423,5 +426,5 @@ if { 0 == [string compare [adapter name] dmem ] } { } } else { # AXI AP access port for SoC address map - target create $_CHIPNAME.axi_ap mem_ap -dap $_CHIPNAME.dap -ap-num 2 + target create $_CHIPNAME.axi_ap mem_ap -dap $_CHIPNAME.dap -ap-num $_mem_ap_num }