aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-06-08telnet_server: fix valgrind errorErhan Kurubas1-10/+1
Error: Uninitialised value was created by a heap allocation at telnet_new_connection (telnet_server.c:227) Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I698a3648be698c93a2395a718ee1ade028226995 Reviewed-on: https://review.openocd.org/c/openocd/+/7006 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-06-04flash/stm32l4x: fix scan-build warningsTarek BOCHKATI1-42/+47
fix "Declared variable-length array (VLA) has zero size" warnings while at there instrument the probe function to ensure the flash bank contains at least 1 sector Change-Id: I3ba0e6345881557ad1aab2d1b41eee438b49fe04 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6470 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-04stlink: manage TCP_BUSY status code when using RW MISCTarek BOCHKATI1-0/+7
Change-Id: I4f9eed3781b549742565a3a8ac5245a4b94ceb53 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6994 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-04target/riscv: drop unused variable registers_initializedTomas Vanek2-8/+0
Change-Id: If7bfe38ac273ce9e54003e003807e128cced1568 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6995 Tested-by: jenkins Reviewed-by: Tim Newsome <tim@sifive.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-04target: add Espressif ESP32-S2 basic supportErhan Kurubas17-1/+5122
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-06-03cortex_a: get rid of not needed log messagesTarek BOCHKATI1-1/+1
when using semi-hosting with cortex_a this LOG_INFO pollutes openocd console, so just reduce the log level of this message. Change-Id: I91aa70492f4e361b25a0e5517d0cf73f2f8ed599 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://gerrit.st.com/c/stm32ide/official/openocd/+/248225 Tested-by: Tarek BOCHKATI <tarek.bouchkati@st.com> Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@st.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6993 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-03github/workflow: enable libftdi based adaptersTarek BOCHKATI2-4/+19
Change-Id: I74b07b21573294dd7d9d3caf41c5755622c77149 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7008 Tested-by: jenkins Reviewed-by: Xiaofan Chen <xiaofanc@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-03github workflow: use libusb 1.0.26 and hidapi 0.11.2Tarek BOCHKATI1-2/+2
Change-Id: Id5348f86026330581d4bae081c9ab2bef435e6a6 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6992 Tested-by: jenkins Reviewed-by: Xiaofan Chen <xiaofanc@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-29flash/nor/core, target: don't ask for working mem if no target algoTomas Vanek2-2/+6
The command 'flash erase_check' showed the message 'Running slow fallback erase check - add working memory' even in the case the target didn't implement blank_check_memory. Change return code of target_blank_check_memory() in this case and sense it in default_flash_blank_check() and show a message without a request for working memory. Change-Id: I7cf9bf77742964b4f377c9ce48ca689e57d0882f Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6765 Tested-by: jenkins Reviewed-by: Tim Newsome <tim@sifive.com>
2022-05-27Give each SMP group a unique number.Tim Newsome2-2/+4
This helps e.g. if there are 8 cores, and cores 0--3 are in one SMP group while 4--7 are in another group. (And there are 2 gdb instances connected, one debugging the first group, and one the second.) Signed-off-by: Tim Newsome <tim@sifive.com> Change-Id: I7b6c9382eadf964529105eaf0411a42d48768668 Reviewed-on: https://review.openocd.org/c/openocd/+/6979 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
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-21configure: build jimtcl with json extensionErhan Kurubas1-2/+2
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I5845c240e50ee832c082df3f26fabbd4b14d6edd Reviewed-on: https://review.openocd.org/c/openocd/+/6890 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-21semihosting: add semihosting_basedir commandErhan Kurubas4-3/+65
This command allows users to set base working directory for the semihosting I/O operations.Default is the current OpenOCD directory. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I80c5979e4c96d66cccdd12cc6fcd5f353e5c6b4d Reviewed-on: https://review.openocd.org/c/openocd/+/6888 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-21flash: fix clang static analyzer build errorsErhan Kurubas2-5/+0
Fixes "variable set but not used" errors. Tested with Homebrew clang version 13.0.1 Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: Ia90baf5b4857db2b5569ebe6adbbb832de772aad Reviewed-on: https://review.openocd.org/c/openocd/+/6971 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-21target: fix clang static analyzer warningTomas Vanek1-1/+1
Removes Warning: line 6482, column 12 1st function call argument is an uninitialized value Use target ptr directly as checked in previous lines instead of dereferencing head->target Change-Id: I6804b776fd493af71f3098d702f9cdc7acb50151 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6970 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-18target/riscv: fix 'reset run' after 'reset halt'Tomas Vanek1-5/+5
'reset halt' does not clear DM_DMCONTROL_HALTREQ at deassert_reset(). If hw reset line is configured e.g. 'reset_config srst_only' the folowing 'reset run' halts: > gd32v.cpu curstate running > reset halt JTAG tap: gd32v.cpu tap/device found: 0x1000563d (mfg: 0x31e ... > gd32v.cpu curstate halted > reset JTAG tap: gd32v.cpu tap/device found: 0x1000563d (mfg: 0x31e ... > gd32v.cpu curstate halted <<<<---- wrong!!! > reset JTAG tap: gd32v.cpu tap/device found: 0x1000563d (mfg: 0x31e ... > gd32v.cpu curstate running Clear DM_DMCONTROL_HALTREQ when acking reset. Change-Id: Iae0454b425e81e64774b9785bb5ba1d4564d940b Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6961 Tested-by: jenkins Reviewed-by: Tim Newsome <tim@sifive.com>
2022-05-17doc: prevent writing "topic:" to commit messageTomas Vanek1-5/+31
First time contributors surprisingly often write "topic:" instead of "the main part or subsystem the patch touches" as requested in patchguide.html To prevent them doing so: Use longer self-explaing "specify touched area" instead of "topic" Give some examples in addition to recommended looking at "git log" Change-Id: I1c307b460d7a79ba3c9918af8dbc9e9f827e1fb9 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6683 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: Paul Fertser <fercerpav@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-14doc: Document linuxgpiod driver commandsSteve Marple1-1/+78
Change-Id: I84ad5dba9ab2099137595b46822bc10a0b089524 Signed-off-by: Steve Marple <stevemarple@googlemail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6962 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-14.gitignore: add cross-compile *-libtoolAntonio Borneo1-0/+1
While cross-compiling OpenOCD the generated script is not named "libtool" anymore, but e.g. "arm-linux-gnueabi-libtool". Ignore all the possible variants "*-libtool". Change-Id: I7a0dade992dbc13f977610bd4a78f8a4783b0146 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6960 Tested-by: jenkins
2022-05-14drivers/am335xgpio: Add AM335x driver for bitbang support on BeagleBonesSteve Marple7-0/+906
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-14bcm2835gpio: Fix incorrect GPIO validationSteve Marple1-14/+14
Incorrect validation prevented GPIO0 from controlling the direction of the SWDIO buffer or operating TRST/SRST. Have all GPIO number validation checks performed by is_gpio_valid(). Change-Id: Ib8fb704ab588a618ac41c111f6168d658891d92c Signed-off-by: Steve Marple <stevemarple@googlemail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6938 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2022-05-14openocd: add post-init and pre-shutdown helpersAntonio Borneo4-10/+47
It is a common requirement to automatically execute some command after "init". This can be achieved, either in scripts or through OpenOCD command line, by explicitly calling "init" followed by the commands. But this approach fails if the request for post-init commands is spread across configuration files; only one of the files can split pre-init and post-init status by calling "init". The common workaround is to "rename" the command "init" and replace it with a TCL proc that calls the original "init" and the post-init commands. E.g. in Zephyr script [1]. To simplify and formalize the post-init execution, use a TCL list that contains the list of commands to be executed. Every script can contribute adding new commands, e.g. using "lappend". In the same way, formalize the pre-shutdown execution with a TCL list of user commands to be executed before OpenOCD exit. Document them and add trivial examples. Drop from documentation the suggestion to rename "shutdown". Change-Id: I9464fb40ccede3e7760d425873adca363b49a64f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Link: [1] https://github.com/zephyrproject-rtos/zephyr/blob/zephyr-v2.7.1/boards/arm/nucleo_h743zi/support/openocd.cfg#L15 Reviewed-on: https://review.openocd.org/c/openocd/+/6851 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-05-14aarch64: don't wait for smp targets halted in deassert resetAntonio Borneo1-3/+7
The function target_type::deassert_reset() is called for every target after reset is deasserted. If the target fails to get halted, we log a warning and issue a halt request for the target itself. Current code calls the generic target_halt() that: - extends the halt to all the targets in the SMP node; - waits for targets to halt. This breaks the logic of running target_type::deassert_reset() per target. Plus, waiting for targets to halt delays the call of target_type::deassert_reset() for the next targets. Replace the call to target_halt() with the aarch64 specific function to halt the single target. Pass the parameter HALT_LAZY to prevent the wait for target halted. Similar solution is already implemented for cortex_a. Change-Id: I446dc03cb91524c6d388db485bc2388177af77b6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6947 Tested-by: jenkins
2022-05-14arm_adi_v5: add support for 64bit Class 0x9 ROM tablesAntonio Borneo1-11/+32
Arm documentation does not explicitly report the order of the two 32bit words that compose the 64bit value. But both ADIv5 and ADIv6 specify that only little-endian is supported (ADIv5.2 obsoletes the big-endian support). This change reads the 64bit value in little-endian. Detect the 64bit content and use it. Change-Id: I723ec099c7e8c70c1f9a568e32ea867fcbf1f1db Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6465 Tested-by: jenkins
2022-05-14arm_adi_v5: replace dap_lookup_cs_component()Antonio Borneo2-76/+85
With the generic function for ROM table walk-through, reimplement dap_lookup_cs_component(). Catch the code CORESIGHT_COMPONENT_FOUND and halt the search. While there, drop two macros in arm_coresight.h, now unused. Change-Id: I589ef7ae8a651d0c422ce7d0b4ed913713a8217e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6824 Tested-by: jenkins
2022-05-14arm_adi_v5: let dap_lookup_cs_component() to get AP dbgbaseAntonio Borneo4-28/+24
Simplify the code in cortex_a and aarch64 by moving the call to dap_get_debugbase() inside dap_lookup_cs_component(). This has the further effects: - dap_get_debugbase() is not referenced outside arm_adi_v5.c and becomes static; - dap_lookup_cs_component() looses one parameter; - the coreid parameter 'idx' is passed as value; - the caller in aarch64 don't have and don't print the irrelevant value of AP register APID; - fixes the debug message in the caller in aarch64 to print the coreid value instead of always zero. Change-Id: Ic7f0f643fdf067c059c8f2455a02ff18a3fed054 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6823 Tested-by: jenkins
2022-05-14arm_adi_v5: abstract actions during ROM table parsingAntonio Borneo1-30/+123
Now all the actions (build command output) of command "dap info" are decoupled from the ROM walk-through. Pass the actions as a generic parameter to ROM walk-through code. Put as private data every information that is only required by the actions and not by the ROM walk-through. Change-Id: I3b6ad112ea21296458c94aebbf91bf65bf6657a7 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6822 Tested-by: jenkins
2022-05-14arm_adi_v5: separate ROM table parsing from command output [3/3]Antonio Borneo1-17/+41
This change only targets the output of rtp_rom_loop(). Change-Id: If9ac013798923428c3b897a969887e98b6935a2b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6821 Tested-by: jenkins
2022-05-14arm_adi_v5: separate ROM table parsing from command output [2/3]Antonio Borneo2-65/+107
This change only targets the output of rtp_cs_component(). To easily propagate the coordinates of the CoreSight component, add them in the struct that holds the register values. While there, define a macro for the max depth of ROM tables. Change-Id: I75e5ef4f9419da3192123aebcd61471c2af9374f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6820 Tested-by: jenkins
2022-05-14arm_adi_v5: separate ROM table parsing from command output [1/3]Antonio Borneo1-6/+44
In OpenOCD arm_adi_v5 we have already two implementations of code for parsing the ADIv5 ROM table: - in the commands "dap info" and "$dap_name info"; - in the function dap_lookup_cs_component(). Adding support for ADIv6 requires extending both implementations. Moreover, current code does not handle few aspects of the ROM parsing, e.g. the "Power Domain IDs". To add such extensions both implementations should be touched. I plan to add a command to parses (again) the ROM table and dump a simple prototype of a configuration script for the target, useful while analysing a new target. Keeping aligned all these implementation would be too complex. With focus to "dap info" command, decouple the part of code to walk-through the ROM table from the code that creates the command output. The idea is to keep a single implementation for the walk-through code, while parametrizing the output code to handle the generation of a configuration script or the result of the function dap_lookup_cs_component(). This change only targets the output of MEM-AP header Further changes will target other parts of the code. While there, add a message if MEM-AP is not accessible. Change-Id: I112f637edfdb8688afb4e631297f6536da9604f1 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6819 Tested-by: jenkins
2022-05-14arm_adi_v5: handle faulting entry in ROM tableAntonio Borneo1-2/+5
ARM IHI0031F "Arm Debug Interface Architecture Specification" chapter C2.6.1 "BASE, Debug Base Address register" reports: A debugger must handle the following situations as non-fatal errors: - ... - An entry in the ROM Table points to a faulting location. - ... Typically, a debugger issues a warning if it encounters one of these situations. However, Arm recommends that it continues operating. An example of an implementation that might cause errors of this type is a system with static base address or ROM Table entries that enable entire subsystems to be disabled, for example by a tie-off input, packaging choice, fuse, or similar. Don't halt ROM table parsing if one entry causes an error; log the error condition and continue to next entry. Not sure if we have to send an ABORT before continuing. Change-Id: I94fdb5b175bfb07dde378149421582b7e7cd5b09 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6818 Tested-by: jenkins Reviewed-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
2022-05-14arm_adi_v5: report sysmem on class 0x9 ROM tablesAntonio Borneo1-1/+10
As Class 0x1 ROM table, also Class 0x9 ROM tables encodes a flag for system memory access. Detect the flag in rtp_cs_component() and dump the same message for both type of ROM tables. Extend rtp_read_cs_regs() to read ARM_CS_C9_DEVID. Change-Id: Ic85d1ea068ed706ceedfd65076ff4c96d04e9792 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6817 Tested-by: jenkins Reviewed-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
2022-05-14arm_adi_v5: split ROM table loop from generic coresightAntonio Borneo1-36/+66
During ROM table parsing, each ROM table entry points to a CoreSight component that can, in turn, be another ROM table. Split the specific code for ROM table handling from the generic CoreSight code. Log an error if a ROM table entry cannot be read. Change-Id: I5ad106a99b9c21ddb48b5b162ae87101e4f49878 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6816 Tested-by: jenkins
2022-05-14arm_adi_v5: rework dap_read_part_id()Antonio Borneo1-69/+80
Rework dap_read_part_id() while preparing for reorganizing the 'ROM Table Parsing' (RTP): - rename it with 'rtp' prefix; - extends it to read other CoreSight registers, thus improving the overall speed by queuing more reads; - reduce the list of arguments by using a struct; - reorder the reads by increasing offset, potentially gaining speed using MEM_AP_REG_BDx and/or auto-increment; - log a debug message in case of read error. Change-Id: I6544ac7740b808a6c0fbacf97ac00b97f5bd3832 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6815 Tested-by: jenkins
2022-05-14arm_adi_v5: add support for display Class 0x9 ROM tablesFlorian Fainelli1-22/+47
ADI v5.1 and v6.0 permit the definition of CoreSight components (class 9 ROM entries). dap_rom_display() is refactored a bit such that we always end up with attempting to parse the ROM contents using the appropriate upper limit for class 1 and 9 ROM types. Change-Id: I4ba497b3807f1f11f06186eb6e61959ea3540c59 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6359 Tested-by: jenkins
2022-05-14arm_adi_v5: describe Class 0x9 Device Architecture registerAntonio Borneo1-0/+49
Use the list of values from ARM IHI0029E to decode and print the Device Architecture register. Add attribute 'unused' to the function, not used yet. Change-Id: I7b1dd204bd1db671578c588372b667e23611876c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6463 Tested-by: jenkins Reviewed-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
2022-05-14adi_v5_jtag: reduce verbosity on persistent WAITAntonio Borneo1-2/+2
In case of AP not responding, e.g. not clocked, the first WAIT reply is logged as: DAP transaction stalled (WAIT) - slowing down then OpenOCD retries the transaction few times, until it timeouts. At each retry it prints the message: DAP transaction stalled during replay (WAIT) - resending Depending on JTAG speed and transport latency, the amount of log messages can be quite annoying and not relevant. The last printed line is at timeout: Timeout during WAIT recovery Reduce the verbosity. Change-Id: I5a7a337527c98b2450de59066b13713511c2894f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6814 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
2022-05-14arm_coresight: define ARM_CS_CIDR_CLASS()Antonio Borneo2-2/+2
Right now it has a single use but it will soon be used more. Change-Id: I9a819c65df467fc859e4b5251035a17ed33daa35 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6813 Tested-by: jenkins Reviewed-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
2022-05-07cross-build.sh: fix build with capstoneTarek BOCHKATI1-1/+1
since commit 12d1ad0c7529 : update capstone include path ... the generated capstone.pc is not working so fix the includedir in capstone.pc to get github action working Change-Id: I7767e181a74c73a7514eeb6293cd556a794dbfe9 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6969 Tested-by: jenkins Reviewed-by: Tim Newsome <tim@sifive.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-07doc: fix typo s/Not/Note/Piotr Kasprzyk1-1/+1
Append lacking e to word Note Signed-off-by: Piotr Kasprzyk <ciri@ciri.pl> Change-Id: Ibd40a2f93d11cf1945361f0c46329b88963d6826 Reviewed-on: https://review.openocd.org/c/openocd/+/6963 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-07target: document possibly unreachable target in deinit_target()Tomas Vanek1-0/+11
Change-Id: I95ff3d200bb2c8f5bc43a34c92726d9c47f8c172 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6953 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-07target: fix build with jimtcl 0.79Antonio Borneo1-0/+8
In jimtcl 0.80 the prototype of Jim_DictPairs() has changed. The only code in OpenOCD that uses Jim_DictPairs() has been merged recently and it only uses the current jimtcl syntax. To allow compiling OpenOCD master branch with older versions of jimtcl, detect the version of jimtcl and use the appropriate syntax. Change-Id: I6fc78303b6a4db064a97f326c46119f4568e88f3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: dullfire@yahoo.com Reviewed-on: https://review.openocd.org/c/openocd/+/6948 Tested-by: jenkins
2022-05-07bluenrg: add support for bluenrg-lps device and boardSalvatore Giorgio PECORINO4-6/+27
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-05-07server/gdb: fix gdb remote monitor cmd on multi-targetAntonio Borneo1-4/+16
Commit 5ebb1bdea1df ("server/gdb: fix return of gdb remote monitor command") replaces the call to command_run_line() with call to Jim_EvalObj() but does not properly set the "context". In multi-target environment, his can cause the erroneously execution of the command on the wrong target. Copy from the code in command_run_line() the proper setup before executing Jim_EvalObj(). Change-Id: I56738c80779082ca146a06c01bc30e28bc835fd3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: Bohdan Tymkiv <bohdan200@gmail.com> Fixes: 5ebb1bdea1df ("server/gdb: fix return of gdb remote monitor command") Reviewed-on: https://review.openocd.org/c/openocd/+/6966 Tested-by: jenkins Reviewed-by: Bohdan Tymkiv <bohdan200@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Tim Newsome <tim@sifive.com>
2022-05-07smp: deprecate legacy SMP core switching supportAntonio Borneo4-51/+11
The deprecation was already in the documentation since v0.11.0 through commit 85ba2dc4c6ab ("rtos/hwthread: add hardware-thread pseudo rtos") but OpenOCD was not informing the user printing a runtime message. Remove the deprecated method from the documentation and print a deprecated message at runtime. There is no reliable way to print the same message in GDB console, so we have to rely on user noticing it in the OpenOCD log. Target is to remove the functionality after v0.12.0. Change-Id: Idd2d9e3b6eccc92dcf0432c3c7de2f8a0fcabe9f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6862 Tested-by: jenkins