aboutsummaryrefslogtreecommitdiff
path: root/tcl
AgeCommit message (Collapse)AuthorFilesLines
2022-07-30drivers/vdebug: add support for DAP level interfaceJacek Wuwer8-6/+90
This patch adds support for DAP interface to Cadence vdebug driver. It implements a new transport layer for dapdirect_swd. Change-Id: I64b02a9e1ce91e552e07fca692879655496f88b6 Signed-off-by: Jacek Wuwer <jacekmw8@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6965 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-23tcl: ngultra: add target config fileAdrien Grassein1-0/+51
ngultra is a Quad-R52 SoC + an FPGA. Signed-off-by: Adrien Grassein <agrassein@nanoxplore.com> Change-Id: I6a04eab3d9a7610e9dfa3d9f647868e579b6bd8a Reviewed-on: https://review.openocd.org/c/openocd/+/7046 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-02tcl/esp32s3: check memory protection on gdb attachErhan Kurubas1-3/+46
Memory protection must be disabled to allow stub flasher operate correctly. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I6f292ee672ae001cd6e4df5d24eb7bb862639093 Reviewed-on: https://review.openocd.org/c/openocd/+/7037 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-02tcl/esp32s2: check memory protection on gdb attachErhan Kurubas1-0/+35
Memory protection must be disabled to allow stub flasher operate correctly. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I2f239d98fca6882c4361691af306a5652b58ee78 Reviewed-on: https://review.openocd.org/c/openocd/+/7036 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-02jtag: add esp_usb_jtag driverErhan Kurubas2-0/+24
This driver is used with the ESP32 chips which has builtin USB-JTAG interface. e.g. with ESP32-C3, ESP32-S3 Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: If966268cb8d26f76540dd5440245a17ed0b72c61 Reviewed-on: https://review.openocd.org/c/openocd/+/6943 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2022-06-24tcl: add SPDX tagAntonio Borneo54-0/+101
For historical reasons, no license information was added to the tcl files. This makes trivial adding the SPDX tag through script: fgrep -rL SPDX tcl | while read a;do \ sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n }' $a;done With no specific license information from the author, let's extend the OpenOCD project license GPL-2.0-or-later to the files. Change-Id: Ief3da306a6e1978de7dfb8f552f9ff23151f9944 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7030 Tested-by: jenkins
2022-06-24tcl/interface: add SPDX tagAntonio Borneo115-0/+230
For historical reasons, no license information was added to the tcl files. This makes trivial adding the SPDX tag through script: fgrep -rL SPDX tcl/interface | while read a;do \ sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n }' $a;done With no specific license information from the author, let's extend the OpenOCD project license GPL-2.0-or-later to the files. Change-Id: I7bd6a628e9e153fc477cddf9b97087a39ec48aa7 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7029 Tested-by: jenkins
2022-06-24tcl/board: add SPDX tagAntonio Borneo319-0/+636
For historical reasons, no license information was added to the tcl files. This makes trivial adding the SPDX tag through script: fgrep -rL SPDX tcl/board | while read a;do \ sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n }' $a;done With no specific license information from the author, let's extend the OpenOCD project license GPL-2.0-or-later to the files. Change-Id: Ibcf7da62e842aafd036a78db9ea2b9f11f79af16 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7028 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2022-06-24tcl/target: add SPDX tagAntonio Borneo270-0/+535
For historical reasons, no license information was added to the tcl files. This makes trivial adding the SPDX tag through script: fgrep -rL SPDX tcl/ target| while read a;do \ sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n }' $a;done With no specific license information from the author, let's extend the OpenOCD project license GPL-2.0-or-later to the files. Change-Id: I7b2610300b24cccd07bfa6fb5f1266970d5d3a1b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7027 Tested-by: jenkins
2022-06-24tcl: move SPDX tag as first lineAntonio Borneo12-24/+24
The SPDX tag is aimed at machine handling and it's thus expected to be placed in the first line. Change-Id: I3992856eeb28b333c38d010ef286e22471ede263 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7026 Tested-by: jenkins
2022-06-24tcl: replace FSF boilerplate with SPDX tagAntonio Borneo3-42/+6
OpenOCD project is switching to SPDX tags. Replace the few FSF boilerplate in tcl folder. Change-Id: I15b146eb77cc491ed7355178f684f3e76fc763b4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7025 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2022-06-24tcl/board/steval-idb012v1: fix SPDX tagAntonio Borneo1-2/+3
Remove trailing '.' While there, add newline to file's last line. Change-Id: I3a727e406b572d051b28e17688c24627e55520c4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7024 Tested-by: jenkins
2022-06-24tcl/interface/vdebug: add newline to file's last lineAntonio Borneo1-1/+1
Change-Id: I83d2477e8bc837aeac69bd5d08fdd923fd00a37c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7023 Tested-by: jenkins
2022-06-24tcl/target/imx8m: use hwthread rtosAlvin Šipraga1-1/+2
In order to facilitate debugging multiple cores, specify the coreid and the hwthread rtos in the imx8m target configuration. Change-Id: Ibd871517a160ceca15002fb10e27cb793f14d086 Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk> Reviewed-on: https://review.openocd.org/c/openocd/+/7019 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-24target: add Espressif ESP32-S3 basic supportErhan Kurubas2-0/+104
ESP32-S3 is a dual core Xtensa SoC Not full featured yet. Some of the missing functionality: -Semihosting -Flash breakpoints -Flash loader -Apptrace -FreeRTOS Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I44e17088030c96a9be9809f6579a4f16dbfc5794 Reviewed-on: https://review.openocd.org/c/openocd/+/6990 Tested-by: jenkins Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-24target: add Espressif ESP32 basic supportErhan Kurubas5-0/+161
ESP32 is a dual core Xtensa SoC Not full featured yet. Some of the missing functionality: -Semihosting -Flash breakpoints -Flash loader -Apptrace -FreeRTOS Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I76fb184aa38ab9f4e30290c038b5ff8850060750 Reviewed-on: https://review.openocd.org/c/openocd/+/6989 Tested-by: jenkins Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-24target/board: Add Ampere QS|MQ config filesDaniel Goehring3-0/+597
Add Ampere Altra ("Quicksilver") and Ampere Altra Max ("Mystique") target/board configuration files. The target configuration file supports silicon and emulation. The board configuration files support 1 and 2 socket platforms. Tested on Ampere emulation and silicon Change-Id: I036c798a50624e30ab51ccd2895b6f60c40be096 Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com> Reviewed-on: https://review.openocd.org/c/openocd/+/5591 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2022-06-10tcl: add get_bit & get_bitfield memory helper functionsErhan Kurubas1-0/+19
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I21506526e3ebd9c3a70a25ba60bf83aee431feb6 Reviewed-on: https://review.openocd.org/c/openocd/+/7016 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-04target: add Espressif ESP32-S2 basic supportErhan Kurubas3-0/+77
ESP32-S2 is a single core Xtensa chip. Not full featured yet. Some of the missing functionality: -Semihosting -Flash breakpoints -Flash loader -Apptrace -FreeRTOS Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I2fb32978e801af5aa21616c581691406ad7cd6bb Reviewed-on: https://review.openocd.org/c/openocd/+/6940 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2022-05-27tcl: Add support for Kontron SMARC-sAL28Sean Anderson1-0/+14
This commit is adapted from [1]. [1] https://review.openocd.org/c/openocd/+/4999 Signed-off-by: Michael Walle <michael.walle@kontron.com> Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com> [ adapted to use common configuration ] Signed-off-by: Sean Anderson <sean.anderson@seco.com> Change-Id: I9a428371694e7864e03055b8de18a55a7843b8c2 Reviewed-on: https://review.openocd.org/c/openocd/+/6977 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-27target: Add LS1028ASean Anderson1-0/+18
The LS1028A is similar to the LS1088A, except that it has 2 CPUs (and different ethernet capabilities). From a JTAG perspective, all that's different is the number of CPUs and the TAPID. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Change-Id: Iba3a0ecfbf82cfcfeb7eea42d52121c3b9dc93a2 Reviewed-on: https://review.openocd.org/c/openocd/+/6976 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-27tcl/target/ls1088: Break out common configurationSean Anderson2-55/+65
Several Layerscape processors (LS1088A, LS2088A, LS2160A, and LS1028A) share a common architecture. Break out the common setup from the LS1088 config in preparation for adding the LS1028A. There's no official name for this series of processors, but NXP refers to them as "chassis generation 3" in U-Boot, so we'll go with that too. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Change-Id: Ic6f89f95c678101f54579bcaa5d79c5b67ddf50a Reviewed-on: https://review.openocd.org/c/openocd/+/6975 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-21tcl/target/renesas_rz_five: Added RZ/Fivemicbis1-0/+22
Added support for the new Renesas RISC-V device: RZ/Five Signed-off-by: micbis <michele.bisogno.ct@renesas.com> Change-Id: Id8ba29b83528c0bfe4f9b4ed21b0151a6e853bd7 Reviewed-on: https://review.openocd.org/c/openocd/+/6974 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2022-05-21tcl/target/renesas_rz_g2: Added RZ/G2LC and RZ/G2ULmicbis1-6/+22
Added support for two new devices: RZ/G2LC and RZ/G2UL Change-Id: Iec6ba88c1d279f50808b060343b45c796bbfdbfc Signed-off-by: micbis <michele.bisogno.ct@renesas.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6972 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-14tcl/interface/ftdi: Add config for Tigard boardThomas Hebb1-0/+19
Tigard[1] is an FT2232H-based development tool designed for ease of use with many different protocols and targets. It includes a JTAG header wired to channel B, with labeled pins for the four required signals as well as nTRST and nSRST, which are connected through an output buffer to BDBUS4 and BDBUS5 respectively. Add an interface config for Tigard. I wrote it by referencing the Tigard schematic and tested it by debugging a couple of RISC-V development boards. [1] https://github.com/tigard-tools/tigard Signed-off-by: Thomas Hebb <tommyhebb@gmail.com> Change-Id: I34df9f72538ba1e40ad53b568c9cdca96ae4b082 Reviewed-on: https://review.openocd.org/c/openocd/+/6952 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-14drivers/am335xgpio: Add AM335x driver for bitbang support on BeagleBonesSteve Marple2-0/+57
Change-Id: Iac1c9f3d380e2474c8b77407c89c2aad96fbf2ea Signed-off-by: Steve Marple <stevemarple@googlemail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6941 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-07bluenrg: add support for bluenrg-lps device and boardSalvatore Giorgio PECORINO2-2/+10
Added bluenrg-lps support Added file for the board steval-idb012v1 Fixed size_info information using a mask Changed the if condition in bluenrg-x.cfg to be valid only for bluenrg-1 and bluenrg-2 Signed-off-by: Salvatore Giorgio PECORINO <salvatore-giorgio.pecorino@st.com> Change-Id: Ic0777ec0811ee6fac7d5e1d065c4629e47d84a1f Reviewed-on: https://review.openocd.org/c/openocd/+/6928 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-04-24tcl/target/gd32vf103: add flash bankTomas Vanek1-1/+15
The flash is compatible with stm32f1x, reuse the driver. Extend the size of work area to RAM size of the smallest device. Stop watchdogs before flash programming. Change-Id: I67a7654a6e196f9d4b2409edaa7990c53334437e Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6711 Tested-by: jenkins Reviewed-by: Tim Newsome <tim@sifive.com>
2022-04-23tcl/target/stm32l4x: align format/order/comments with stm32f4xMarkus Reiter1-11/+14
Change-Id: Ie97bb2f56b582bc735c238af5f160fcb28a61eb0 Signed-off-by: Markus Reiter <me@reitermark.us> Reviewed-on: https://review.openocd.org/c/openocd/+/6933 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-04-23tcl/target/stm32l4x: switch to new TPIU/SWO supportMarkus Reiter1-7/+33
Change-Id: I3362fa7292eae7a3ba119cf6183f8bc4cbd5cbd4 Signed-off-by: Markus Reiter <me@reitermark.us> Reviewed-on: https://review.openocd.org/c/openocd/+/6932 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-04-23tcl/target/stm32l4x: set default WORKAREASIZE to smallest deviceMarkus Reiter1-2/+2
Change-Id: Ia8bfb664ff28bd0579492032ce513b010e71c593 Signed-off-by: Markus Reiter <me@reitermark.us> Reviewed-on: https://review.openocd.org/c/openocd/+/6931 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-04-23tcl/target/stm32f4x: fix nameMarkus Reiter1-1/+1
Change-Id: I9baa79d8cf402991e6638c255a91728b8a77020c Signed-off-by: Markus Reiter <me@reitermark.us> Reviewed-on: https://review.openocd.org/c/openocd/+/6930 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-04-03tcl/board: Add NXP FRDM-K64FMarc Schink1-0/+15
Change-Id: I4b8fbfb2948c4295c2a34d641dd59a73c512d9fa Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6884 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-03-26tcl/tools: Add function to measure the speed of ARM Cortex-M devicesMarc Schink1-0/+50
Tested on an EFM32PG12 Starter Kit. Change-Id: I2cbc36fe0d2ad2089bf8c1e7d2260daaae4ddbb4 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/5353 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-19tcl/stm32u5x: fix clock config used at 'reset init'Tarek BOCHKATI1-9/+12
Change-Id: If004a04b93be47439809ea3fa336b14de7a12277 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6597 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-03-12Remove all occurrences of 'mem2array' and 'array2mem'Marc Schink16-109/+73
Replace deprecated commands 'mem2array' and 'array2mem' with new Tcl commands 'read_memory' and 'write_memory'. Change-Id: I116d995995396133ca782b14cce02bd1ab917a4e Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6859 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12board: Add LS1046ARDBSean Anderson1-0/+17
This adds support for the LS1046A Reference Design Board. There are several JTAG headers accessable once the case is opened, but this config is for the externally-accessable CMSIS DAP. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Change-Id: I0f83470da3758f0c4512ce47348c4db7de17b27e Reviewed-on: https://review.openocd.org/c/openocd/+/6855 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12target: Add LS1046ASean Anderson1-0/+56
The LS1046A is a quad-core processor from NXP in the layerscape family. This SoC is a bit tricky to program: while the AArch64 CPUs are little-endian, most of the peripherals are big-endian. Care must be taken when interpreting memory reads/writes. This processor is in the same family as the ls1012a, so the setup is similar. If you use OpenOCD to attach early in the boot process, only the cpu0 may be available. Trying to halt other CPUs will fail. To avoid this, defer examination of cpus 1-3, and provide a core_up helper (like e.g. zynqmp). Signed-off-by: Sean Anderson <sean.anderson@seco.com> Change-Id: If5a1a9441fb35fea3e05dc708b42e0cb3bbf2a54 Reviewed-on: https://review.openocd.org/c/openocd/+/6854 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl: don't use 'set' to retrieve the value of a variableAntonio Borneo4-4/+4
Original TLC syntax uses 'set varname' to retrieve the value of variable 'varname'. Such archaic syntax is still valid, but the shorter '$varname' makes the code easier to read. Replace 'set varname' with '$varname'. While there, remove some useless curly brackets. Change-Id: I27310e8c05afe56ea8bd0e41d4ae2c34447b725c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6863 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-03-12tcl/board: Add AM625 EVM basic supportNishanth Menon1-0/+25
Add basic connection details with am625 EVM/SK For further details, see https://www.ti.com/lit/zip/sprr448 Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: Ibd23203ea98e34d03d2f55dac3565aa15aad744b Reviewed-on: https://review.openocd.org/c/openocd/+/6799 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Add AM625 SoCNishanth Menon1-0/+25
Add support for the latest in TI k3 family AM625 SoC. For further details, see https://www.ti.com/lit/pdf/spruiv7 Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: Ia54d0eab1c30a973afb1c2c61f4c5a72d29d9b78 Reviewed-on: https://review.openocd.org/c/openocd/+/6798 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/board: Add J721s2 EVM basic supportNishanth Menon1-0/+25
Add basic connection details with J721s2 EVM. For further details, see https://www.ti.com/lit/zip/sprr439 Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I68f8818c492ea6e07c14f2da305671c26da801cb Reviewed-on: https://review.openocd.org/c/openocd/+/6797 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Add J721S2 SoCNishanth Menon1-0/+20
Add support for the latest in TI k3 family J721S2 SoC. For further details, see http://www.ti.com/lit/pdf/spruj28 Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I608ab4513ffb6b5c4166ba423e7d0dddbbb3bbfd Reviewed-on: https://review.openocd.org/c/openocd/+/6796 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Add a gdb-attach event hook for armv8 and simplify startup ↵Nishanth Menon1-11/+28
function Since we can detect the type of target as well, reuse the _cpu_no_smp_up function name and use the target name to simplify the _up function and maintain consistency with what we introduced for r5. Lets introduce gdb-attach event in a much cleaner fashion. NOTE: we add a halt 1000 to retain the default gdb-attach hook behavior While at it, fix a minor type of s/are/as in "Set Default target are core 0" and simplify the foreach usage. Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I3259b7c3ae4c71b06d921edfaefe17c03bb673dc Reviewed-on: https://review.openocd.org/c/openocd/+/6616 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Add a gdb-attach event hook for r5 and simplify startup ↵Nishanth Menon1-34/+16
function Since we can detect the type of target as well, make the attach function name generic for the follow on cleanup patch on armv8 to use as well. Lets introduce gdb-attach event in a much cleaner fashion. We can introduce a simpler r5_up function since we now have more descriptive core names making the individual descriptive procs redundant. NOTE: we add a halt 1000 to retain the default gdb-attach hook behavior Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I31506bb2b86e63638082640eb72aa7c4c9575e93 Reviewed-on: https://review.openocd.org/c/openocd/+/6617 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Rename R5 targets to be more descriptiveNishanth Menon1-23/+12
R5 targets are currently named r5.0..n and the only way for user to determine the actual type is external documentation. Lets just rename the target names to make them descriptive to not require external documentation for finding which R5 to connect to. NOTE: we leave the _mcu_r5_cores _main0_r5_cores _main1_r5_cores alone for now to allow existing startup proc functions to work, but we will drop it in the follow on patch. Previously: Info : starting gdb server for j721e.cpu.r5.0 on 3336 Info : Listening on port 3336 for gdb connections Info : starting gdb server for j721e.cpu.r5.1 on 3337 Info : Listening on port 3337 for gdb connections Info : starting gdb server for j721e.cpu.r5.2 on 3338 Info : Listening on port 3338 for gdb connections Info : starting gdb server for j721e.cpu.r5.3 on 3339 Info : Listening on port 3339 for gdb connections Info : starting gdb server for j721e.cpu.r5.4 on 3340 Info : Listening on port 3340 for gdb connections Info : starting gdb server for j721e.cpu.r5.5 on 3341 Info : Listening on port 3341 for gdb connections With this patch: Info : starting gdb server for j721e.cpu.mcu_r5.0 on 3336 Info : Listening on port 3336 for gdb connections Info : starting gdb server for j721e.cpu.mcu_r5.1 on 3337 Info : Listening on port 3337 for gdb connections Info : starting gdb server for j721e.cpu.main0_r5.0 on 3338 Info : Listening on port 3338 for gdb connections Info : starting gdb server for j721e.cpu.main0_r5.1 on 3339 Info : Listening on port 3339 for gdb connections Info : starting gdb server for j721e.cpu.main1_r5.0 on 3340 Info : Listening on port 3340 for gdb connections Info : starting gdb server for j721e.cpu.main1_r5.1 on 3341 Info : Listening on port 3341 for gdb connections Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I2989efe3ae3e16754f98fa1dc9363ec4c898f7c3 Reviewed-on: https://review.openocd.org/c/openocd/+/6627 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Rename m4 target as general purpose mcuNishanth Menon1-17/+17
The MCU is present on few of the SoCs and is meant as General Purpose (GP) MCU of the system. Lets rename it to make clear what we are debugging - esp when multiple MCUs are present in the system. Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I16132d321daf6e9b1d893fe6f92026d5aa9eb152 Reviewed-on: https://review.openocd.org/c/openocd/+/6619 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Rename m3 target as sysctrlNishanth Menon1-16/+16
The M3 is the system controller of the system. Lets rename it to make clear what we are debugging - esp when multiple MCUs are present in the system. Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I4cd03b6068b8ce140fd254f9dd88151c4c7006d7 Reviewed-on: https://review.openocd.org/c/openocd/+/6618 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Add a gdb-attach event hook for m3 and m4Nishanth Menon1-0/+12
Add gdb-attach event to call the "up" function of m3 and m4 allowing for more seamless integration with gdb for end users. We still retain _up functions for non-gdb functionality. NOTE: we add a halt 1000 to retain the default gdb-attach hook behavior Suggested-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I2e51fdbd8756f156551e589c748c3a338afa655c Reviewed-on: https://review.openocd.org/c/openocd/+/6615 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Remove args from m3 and m4_upNishanth Menon1-2/+2
args serve no purpose, so drop them. Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I136394307016453d576cf524b0f02227ba26ef8a Reviewed-on: https://review.openocd.org/c/openocd/+/6626 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>