aboutsummaryrefslogtreecommitdiff
path: root/src/target
AgeCommit message (Collapse)AuthorFilesLines
2021-06-08Call keep_alive() more often. (#616)Tim Newsome2-6/+7
When it doesn't do anything (most of the time) it has negligible performance impact. With slower remote bitbang, and multiple spike instances being tested in a single chain, things are sufficiently slow that if a computer is busy then this is required to pass riscv-tests/debug. Change-Id: I8816efedaa0cc3b25734ba8fdc979ee4502284a1 Signed-off-by: Tim Newsome <tim@sifive.com>
2021-06-07Print dcsr.cause always (#617)Jan Matyas1-1/+3
Minor change/debug print: Made sure that dcsr.cause is printed into the log always.
2021-05-28Refactor opcodes.h (#613)Xiang W1-105/+82
Simplify the code and prevent some field of the instruction from overflowing Change-Id: I0acade05ad351d0e1918be4b75702b1637aa02c9 Signed-off-by: Xiang W <wxjstz@126.com>
2021-05-20remove needless function declaration from src/target/riscv/program.h (#608)wxjstz1-10/+0
Signed-off-by: Xiang W <wxjstz@126.com>
2021-05-20Add keepalive for vector register access. (#611)Tim Newsome1-0/+2
(And whatever else does a lot of register writes.) Change-Id: I86a1a784fb7b9430aa470dbb39a495b89f56d8c9 Signed-off-by: Tim Newsome <tim@sifive.com>
2021-05-17Merge pull request #605 from riscv/rtos_riscvTim Newsome1-19/+0
Remove enable_rtos_riscv command.
2021-05-16riscv: replace macro DIM() with ARRAY_SIZE()Antonio Borneo3-15/+9
OpenOCD already defines the macro ARRAY_SIZE, while riscv code uses a local macro DIM. Prefer using the macro ARRAY_SIZE() instead of DIM(). Not all the riscv code has been upstreamed, yes; this patch only covers the code already upstreamed. Change-Id: I89a58a6d91916d85c53ba5e4091b558271f8d618 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-05-16riscv: prefer ARRAY_SIZE() to DIM()Antonio Borneo2-8/+8
OpenOCD already defines the macro ARRAY_SIZE, while riscv code uses a local macro DIM. Prefer using the macro ARRAY_SIZE() instead of DIM(). Not all the riscv code has been upstreamed, yes; this patch only covers the code not upstreamed. Change-Id: Ie3e411280f76bc798f1d51c2574cfec148ee0d0d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-05-16riscv: drop unused variableAntonio Borneo1-3/+0
The array newly_halted[] is assigned but its value is never used. Drop it! Change-Id: I678812a31c45a3ec03716e3eee6a30b8e8947926 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-05-14Remote enable_rtos_riscv command.Tim Newsome1-19/+0
I'd missed this when that functionality was removed. Change-Id: If5b697d9dbac517a077d9c1826c747fc95b19f1f Signed-off-by: Tim Newsome <tim@sifive.com>
2021-05-12Keep alive when accessing registers.Tim Newsome1-0/+4
With the bitbang performance decrease and talking to slower targets (daisy chain spike) we more often don't meet the expected keepalive time for gdb. This addresses the cases I ran into. Change-Id: Ie69c2c602c3be9c156e508fdfa6d0178f104e1d8 Signed-off-by: Tim Newsome <tim@sifive.com>
2021-05-03Add keep_alive() to system bus read loop.Tim Newsome1-0/+1
Without it the repeat read test wasn't passing any longer. This is because 7dd323b26d93e49e409e02053e30f53ac8138cd5 reduced the remote bitbang performance. I've notified the mailing list about this. Change-Id: Ie71592792202423aec89fa889b9e3d2a60a3c25f Signed-off-by: Tim Newsome <tim@sifive.com>
2021-05-03Merge branch 'master' into from_upstreamTim Newsome15-172/+483
I may have broken memory sampling with this merge. Conflicts: doc/openocd.texi src/helper/command.c src/jtag/drivers/ftdi.c src/rtos/FreeRTOS.c Change-Id: I2b7e09b2d3b244db546c5212532e6b48fb66dca4
2021-05-02cortex_m: implement hit_watchpoint functionTarek BOCHKATI1-0/+30
this change aims to provide a better gdb debugging experience, by making gdb understand what's really happening. before this change when hitting a watchpoint - openocd reports "T05" to gdb - gdb displays: Program received signal SIGTRAP, Trace/breakpoint trap. after the change - openocd reports "T05watch:20000000;" to gdb - gdb displays: Hardware watchpoint 1: *0x20000000 Old value = 16000000 New value = 170000000 ... Change-Id: Iac3a85eadd86663617889001dd04513a4211ced9 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/6181 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-05-01Cleanup of config/includes.Tim Newsome9-0/+18
Remove a use of AH_BOTTOM from configure.ac. This macro is used by autoheader to add '#include' of some include file to the end of config.h.in and then to config.h. OpenOCD can be built with a custom config.h, so it's preferable to move these '#include' statement directly in the C files that need them dropping this unneeded dependency. It also causes problems when I want to use the gnulib library (which comes with its own Makefile, and does not have the same include path as the top-level Makefile). So this change touches a lot of files, but is actually really simple. It does not affect functionality at all. Change-Id: I52c70bf15eb2edc1dd10e0fde23b2bcd4caec000 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/6171 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-05-01target/image: report error if ELF file contains no loadable sectionsChristian Hoff1-2/+8
The existing code asserted in that case, which is not correct. This would allow the user to crash OpenOCD with a bad ELF file, which is not what we want. A proper error should be reported in that case and OpenOCD should not crash. Change-Id: Ied5a6a6fd4ee0fd163f3fe850d304a121ecbe33a Signed-off-by: Christian Hoff <christian.hoff@advantest.com> Reviewed-on: http://openocd.zylin.com/6172 Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li> Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-05-01target/image: allow loading of 64-bit ELF filesFlorian Meister2-58/+305
Change-Id: I9b88edacf5ffcc3c1caeab8c426693de0d92a695 Signed-off-by: Florian Meister <florian.meister@advantest.com> Signed-off-by: Christian Hoff <christian.hoff@advantest.com> Reviewed-on: http://openocd.zylin.com/5204 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Ooi, Cinly <cinly.ooi@intel.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-04-30cortex_m: mark FPU register as non-existent instead of playing with num_regsTarek BOCHKATI2-15/+11
Change-Id: Iac7c5bfbb95c8d9a8c6d65104d138692a44eca78 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/6015 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-04-30target/armv7m: change FPv4_SP and FPv5_SP/DP identifiers to uppercaseTomas Vanek2-6/+6
Change-Id: Ia421a973e5fb4767715c9f95c91745f8ca1de1da Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/6177 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-04-25target/arm_adi_v5: move DP register definitions to one blockTomas Vanek1-8/+9
DP and MEM-AP definitions were mixed. Change-Id: I2f691b2274c01e9090c1e5160c6903d3207e35c2 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/6138 Tested-by: jenkins
2021-04-25target/adi_v5_swd: remove double space from swd_cmd() parametersTomas Vanek1-4/+4
Change-Id: I6b68868947010512c4de76e5d37142f067e27b06 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/6137 Tested-by: jenkins
2021-04-25target/arm_adi_v5: add JTAG_TO_DORMANT sequenceTomas Vanek1-0/+1
Change-Id: Ie9e32e42a84cf88bf779e691a67c114eef1bb457 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/6136 Tested-by: jenkins
2021-04-25smp: move command deprecation to startup.tclAntonio Borneo2-34/+31
Commit 246782229f8f ("smp: replace commands smp_on/smp_off with "smp [on|off]"") deprecates some multi-word comments, when openocd was unable to properly handle mixes of multi-word commands and tcl procedures having a common initial word. This limitation is over, so move in startup.tcl the multi-word commands deprecation, making it easy to remove them after a grace period. Change-Id: Icb550d1fa7559b95692d2a1244880da6c90ec0b2 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5677 Tested-by: jenkins
2021-04-18helper/command: register full-name commands in jimAntonio Borneo3-4/+6
While still keeping the tree of struct command, stop registering commands in jim by the root "word" only. Register the full-name of the command and pass as private data the struct command of the command itself. Still use the tree of struct command to un-register the commands. Some "native" commands (.jim_handler) share the same handler, then the handler checks the command name to run the right code. Now argv[0] returns the full-name of the command, so check the name by looking in the struct command passed as private data. Change-Id: I5623c61cceee8a75f5d5a551ef3fbf5a303af6be Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5671 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2021-04-18helper/command: pass command prefix to command registrationAntonio Borneo1-2/+1
Replace the "struct command *parent" parameter with a string that contains the command prefix. This abstracts the openocd code from the knowledge of the tree of struct command. This also makes unused the function command_find_in_context(), so remove it. Change-Id: I598d60719cfdc1811ee6f6edfff8a116f82c7ed6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5668 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2021-04-18helper/command: override target only on target prefixed cmdsAntonio Borneo4-22/+6
In current code the current target is overridden whenever jim_handler_data is not NULL. This happens not only with target prefixed commands, but also with cti, dap and swo/tpiu prefixed commands. While this is not causing any run-time issue, by now, the behaviour is tricky and makes the code cryptic. Add a specific field to struct command for the target override so the content of jim_handler_data can be restricted to command specific data only (today only cti, dap and swo/tpiu). Extend the API register_commands() to specify the presence of either the command data or the override target. The new API makes obsolete calling command_set_handler_data() to set jim_handler_data, so remove it. Change-Id: Icc323faf754b0546a72208f90abd9e68ff2ef52f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5667 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2021-04-18helper/command: get current target from dedicated APIAntonio Borneo2-36/+54
Now that target override is uniformly implemented for all types of commands, there is no need for target-prefixed "native" commands (.jim_handler) to sneakily extract the overridden target from the struct command. Modify the commands to use the standard API get_current_target(). Change-Id: I732a09c3261e56524edd5217634fa409eb97a8c6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5666 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2021-04-18helper/command: always pass struct command as jim private dataAntonio Borneo3-21/+42
While registering a new command, jim accepts a pointer to command's private data that will be accessible during the command execution. Today openocd is not consistent and passes different private data depending on the command, and then even overwrites it: - "simple" commands (.handler) are registered with their own struct command pointer as command private data; - "native" commands (.jim_handler) at root level are registered with NULL command private data; - "native" commands (.jim_handler) not at root level are registered with the struct command pointer of their root command as command private data but, when executed, the command private data is overwritten by the value in field jim_handler_data taken from their struct command. Uniform the usage of command private data by always set it to the struct command pointer while registering the new commands. Note: for multi-word commands only the root command is registered, so command private data will be set to the struct command of the root command. This will change later in this series when the full- name of the command will be registered. Don't overwrite the command private data, but let the commands that needs jim_handler_data to get it directly through struct command. For sake of uniformity, let function command_set_handler_data() to set the field jim_handler_data also for "group" commands, even if such value will not be used. Now Jim_CmdPrivData() always returns a struct command pointer, so wrap it in the inline function jim_to_command() to gain compile time check on the returned type. While there, uniform the code to use the macro Jim_CmdPrivData() to access the command's private data pointer. Change-Id: Idba16242ba1f6769341b4030a49cdf35a5278695 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5664 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2021-04-18Aarch64:Switch to EL1 from EL0 before manipulate MMUCheng-Shiun Tsai1-0/+9
If current core is in EL0, it cannot use 'msr sctlr_el1, x0' Change-Id: I04e60e39e4c84f9d9de7cc87a8e438f5d2737dc3 Signed-off-by: Cheng-Shiun Tsai <cheng.shiun.tsai@gmail.com> Reviewed-on: http://openocd.zylin.com/6051 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2021-04-13Merge branch 'master' into from_upstreamTim Newsome37-1145/+1835
Conflicts: .github/workflows/snapshot.yml NEWS configure.ac contrib/loaders/checksum/riscv_crc.c jimtcl src/helper/time_support.h src/jtag/drivers/arm-jtag-ew.c src/rtos/FreeRTOS.c src/target/image.c src/target/riscv/riscv.c Change-Id: I043624ba540d4672fc123dddb2066bcb9c6b5a05
2021-04-11mem_ap: allow GDB connectionsAntonio Borneo1-3/+90
The target mem_ap is a convenient way to access buses, memory and peripherals behind an ARM AP. The current implementation provides only access through OpenOCD commands, because GDB remote protocol has to interact with a CPU and has to operate on CPU states and registers. Using GDB to access the memory is welcome, because GDB can resolve the symbol's address from an ELF file and can nicely display the content of complex struct and data types. Extend mem_ap target with the bare minimal support for a remote GDB connection, by emulating a fake basic ARM core. It means that only a GDB that has support for ARM can be used (either 'aarch64', 'arm' or 'multiarch' GDB). This is not seen as a big limitation, because the mem_ap target is mainly used on ARM based devices. Add a minimalist register description for the fake CPU. Fill the field 'debug_reason' as expected by GDB server. Call the target halted event to reply to GDB halt requests. For backward compatibility, don't open the GDB port by default. If needed, it has to be specified at 'target create' or 'configure' with the flag '-gdb-port'. Change-Id: I5a1b7adb749746516f5d4ffc6193c47b70132364 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6034 Tested-by: jenkins
2021-04-11target/aarch64: Add watchpoint supportLiming Sun3-6/+227
There are some breakpoint/watchpoint related code in armv8_dpm.c, but seems not working for aarch64. Target aarch64 has its own breakpoint implementation in aarch64.c. This commit follows the same logic to add watchpoint support for target aarch64. This commit also increases the size of stop_reason[] in function gdb_signal_reply() since the old size is too small to fit in a 64-bit address, such as ffff8000115e6980. Change-Id: I907dc0e648130e36b434220f570c37d0e8eb5ce1 Signed-off-by: Liming Sun <lsun@mellanox.com> Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com> Reviewed-on: http://openocd.zylin.com/4761 Tested-by: jenkins Reviewed-by: Liming Sun <limings@nvidia.com> Reviewed-by: Kevin Burke <kevinb@os.amperecomputing.com> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-04-02Update version check error message from 0.14 to 1.0. (#588)Ernie Edgar1-1/+1
2021-03-19target/arc: refactor ARC register numbers definesEvgeniy Didin3-8/+51
For Zephyr rtos support it is necessary to define general register numbers for architecture. There were some already in arc.h file. Let's define ARC registers numbers as a set instead of separate defines. Change-Id: I63742b8608f9556c2ec9bd2661a0fd9cf88e9b74 Signed-off-by: Evgeniy Didin <didin@synopsys.com> Reviewed-on: http://openocd.zylin.com/6105 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-19build: remove warnings with gcc 11Rene Kita1-3/+3
This removes some warnings which prevent a successful build with -Werror which is enabled by default. I'm using gcc 11, so maybe others are not getting this warnings yet. In src/flash/nor/numicro.c the debug messages were misleadingly indented. In src/target/arm920t.c the array size where smaller than expected from the receiving function. Change-Id: I66f5c6a63beb9f9416e73b726299297476c884d8 Signed-off-by: Rene Kita <git@rkta.de> Reviewed-on: http://openocd.zylin.com/6104 Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li> Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-19aarch64: handle semihosting in aarch32 stateTarek BOCHKATI2-8/+56
Change-Id: I0e868d617db126a2b258e27b11979b75b5bb72f5 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5860 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-19Implement CRC32 algorithm for RISC-V.Tim Newsome2-2/+81
Signed-off-by: Tim Newsome <tim@sifive.com> Change-Id: Id437f78e74e3d837ff203f84c4eeb996bfad9a01 Reviewed-on: http://openocd.zylin.com/6076 Reviewed-by: Jan Matyas <matyas@codasip.com> Reviewed-by: Marc Schink <dev@zapb.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2021-03-19aarch64: add support for "reset halt"Christian Hoff2-7/+108
Support halting the CPU directly after a reset. If halt is requested, the CPU stops directly at the reset vector, before any code is executed. This functionality was implemented using the Reset Catch debug event. Change-Id: If90d54c088442340376f0b588ba10267ea8e7327 Signed-off-by: Christian Hoff <christian.hoff@advantest.com> Reviewed-on: http://openocd.zylin.com/5947 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2021-03-19jtag: remove minidriver code and minidriver-dummyAntonio Borneo2-24/+1
With zy1000 removed, there is no other implementation that uses the minidriver, apart from the test/example minidriver-dummy. While the idea of the minidriver is probably still valid (that is to intercept jtag primitives before serialization), there is no current use case, no guarantee it is really working, and the way it was implemented (by macros and #if conditionals) is really hard to maintain and test. Let's let it rip in git history, from where it could eventually be taken back in a more modern implementation. The entry points of minidriver API are still in the code with the original names. Change-Id: I882e32cb26cf5842f9cba14e3badaf8948e3760d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6091 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-03-19oocd_trace: drop the code, deprecated in v0.10.0Antonio Borneo4-486/+0
The code for oocd_trace has been marked as deprecated in release v0.10.0, 4 years ago. Time to drop it! Change-Id: I989f8345dee4ff2369bcf5e2e2ace86bbd5aa6a5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6088 Tested-by: jenkins
2021-03-19target: remove handling of target's deprecated_nameAntonio Borneo2-10/+0
We do not have anymore any deprecated target name. Drop the code to handle deprecated target names and the placehold in struct target_type. This patch is separated from the patch that drops the remaining deprecated target names to be ready to revert this if there is any need in the future. Change-Id: I96fca7ffa39d8292f81e79f115ea45c4a30035d7 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6087 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-03-19target: remove target names already deprecated in v0.8.0Antonio Borneo3-3/+0
Some target name were marked as deprecated in release v0.7.0 and v0.8.0, almost 7 years ago, and replaced with more 'actual' names. We can reasonably expect that in these 7 years any user of OpenOCD has already migrated to v0.8.0 or to some newer release, thus has already updated any local/personal script to get rid of the deprecated message. Drop the target names already deprecated in v0.8.0. Change-Id: I7c7491496db1b302b4eb1e9fc6090b58d4acf05a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6086 Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-03-19startup.tcl: remove commands already deprecated in v0.7.0Antonio Borneo1-17/+0
Some command were already marked as deprecated in release v0.7.0, more then 7 years ago, and for some of them the depredation date is even earlier. We can reasonably expect that in these 7 years any user of OpenOCD has already migrated to v0.7.0 or to some following intermediate build, thus has already updated any local/personal script to get rid of the deprecated message. Drop the commands already deprecated in v0.7.0. Change-Id: I81cdc415ab855ebf30980ef5199f9780c5d7f932 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6085 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-03-19target/arm920t: remove command 'arm920t cp15i' deprecated in v0.4.0Antonio Borneo1-83/+0
The command 'arm920t cp15i' was marked as deprecated in release v0.4.0, almost 11 years ago. We can reasonably expect that in these years any user of OpenOCD has already migrated to v0.4.0 or to some newer release, thus has already updated any local/personal script. There is no run-time warning about the deprecation, but it is reported in the help and in the documentation. Drop the command already deprecated in v0.4.0. Change-Id: I755c4283e13e125558fcd73b15fe20498eae95ca Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6083 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-03-19target/arm720t: remove command 'arm720t cp15' deprecated in v0.4.0Antonio Borneo1-79/+0
The command 'arm720t cp15' was marked as deprecated in release v0.4.0, almost 11 years ago. We can reasonably expect that in these years any user of OpenOCD has already migrated to v0.4.0 or to some newer release, thus has already updated any local/personal script. There is no run-time warning about the deprecation, but it is reported in the help and in the documentation. Drop the command already deprecated in v0.4.0. Change-Id: I2b325d0312d96ca5e5f0f1bad13bb162b3b75c52 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6082 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-03-10cortex_m: avoid reading and writing non-existent registersTarek BOCHKATI3-6/+6
Change-Id: Iedc24352c8d3444372da06d00fcec9603540f950 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/6059 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10server: revert commit 7e6556b3cad8Antonio Borneo2-3/+2
With the removal of old tpiu code, commit 7e6556b3cad8 ("server: permit the add_service function to return the created service") http://openocd.zylin.com/5717/ can be reverted. Fix also the new calls to add_service(). Change-Id: Ib7f2dfc6a9e829239e20313e0f121911085fdc00 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6031 Tested-by: jenkins Reviewed-by: Adrian M Negreanu <adrian.negreanu@nxp.com>
2021-03-10armv7m_trace: get rid of the old tpiu codeAntonio Borneo7-382/+222
Remove all the old tpiu code and replace it with a wrapper that uses the new commands, prints-out the new commands and informs about the deprecation. All the code that handles the deprecated tpiu commands is enclosed between the comments /* START_DEPRECATED_TPIU */ and /* END_DEPRECATED_TPIU */ so will be easy to remove it in the future. Change-Id: I70b0486770128203b923346382d9a90b8ec08439 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6030 Tested-by: jenkins Reviewed-by: Adrian M Negreanu <adrian.negreanu@nxp.com>
2021-03-10arm_tpiu_swo: add support for independent TPIU and SWOAntonio Borneo3-0/+1009
This is supposed to replace big part of armv7m_trace.[ch], since TPIU is not only the one implemented in Cortex-M3 and M4. Change-Id: I7588d16cbefe9cdb371c52fb0aa5cdfb48518804 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5858 Tested-by: jenkins
2021-03-10itm: rework itm commands before 'init'Antonio Borneo3-6/+11
If the command 'itm port[s]' is issued before 'init', the ITM can not be programmed because OpenOCD cannot access the target yet. The configuration is recorded and applied after target examine. The current test to trigger the ITM delayed-programming is based on the TPIU configuration. This is allowed because the only use of ITM it so send data through TPIU. In case of system TPIU, not belonging anymore to the target, there is no more association between target ITM and system TPIU. Add a flag to record the pending ITM configuration requested before 'init' and test the flag to trigger the delayed-programming of the ITM. Change-Id: I101eb97a116d7925cd2ff068f3e8813fc008b08e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6029 Tested-by: jenkins