aboutsummaryrefslogtreecommitdiff
path: root/src/server
AgeCommit message (Collapse)AuthorFilesLines
2025-03-05Merge up to a168c634126e9e6bb95c6e68b2db5afbb099abf7 from upstreamEvgeniy Naydanov1-12/+13
There was a bunch of conflicts due to commit 297844cf46c7de5faa9de1c4a9f223b505dc3e9c ("target: Use 'bool' data type in target_{step,resume}") Resolved by updating the corresponding data types throughout the codebase. Change-Id: I9574deeda754b2843b69b4afe80b293d4b357ddd Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2025-03-01gdb_server: fix invalid freeJim Paris1-1/+2
`gdb_service_free` calls `free(gdb_port_next)`, so this needs to be an allocated string. Otherwise we trip up detectors like Android's tagged pointers. Change-Id: Ib08ea55a38af4e15c4fbae95f10db0e3684ae1af Signed-off-by: Jim Paris <jimparis@meta.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8768 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2025-02-22target: Use 'bool' data type in target_{step,resume}Marc Schink1-11/+11
While at it, adapt data types of related functions and fix some coding style issues. Change-Id: I74db9258fc17b1ee8aa446f35ae722ea7c2f67e6 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8524 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2025-01-22Merge up to 26f2df80c3f9ac54fc488ed26f6320904881c0d4 from upstreamEvgeniy Naydanov2-16/+55
Conflicts: * `src/target/target.c` due to commit 4004db5d3a7e767aa4a6b7fddf92ac3370670c79 ("Make polling_interval unsigned.") Change-Id: I0a691dbebe300f3a53fb31bd1097a9aff5551a52
2025-01-12helper: list: rename macro clashing with sys/queue.hAntonio Borneo1-1/+1
The macro named LIST_HEAD() clashed with a macro of same name in the GNU libc file sys/queue.h. This causes a warning in MacOS build due to some other system file including sys/queue.h. Rename LIST_HEAD() as OOCD_LIST_HEAD(). Checkpatch-ignore: MACRO_ARG_REUSE Change-Id: Ic653edec77425a58251d64f56c9f5f6c645ba0cd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: Andrew Shelley <ashelley@btinternet.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8683 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Andy <andrewjohnshelley@gmail.com>
2024-12-22rtt server: fix for dropped data when target has no spacefanoush1-15/+54
rtt_write_channel may write less data than requested, default device buffer size for channel 0 is 16 bytes, so currently anything larger than this is dropped. This fix implements per connection buffer and uses the connection->input_pending flag to retry writes. Change-Id: I00c845fccb0248550ad0f0fd9cda7bac7976b92b Signed-off-by: fanoush <fanoush@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8360 Reviewed-by: zapb <dev@zapb.de> Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-11-12Merge up to fd62626dff25cf503a25040d3040b0a2bb9b2a76 from upstreamEvgeniy Naydanov3-17/+17
Conflicts are related to `unsigned`->`unisgned int` cleanup: * `src/jtag/drivers/ftdi.c` -- between 6749c70a3ae891552296888986e6eeae1e17f11a and a64dc23bf19fb4a7626fbda3c02693523ab5a75b. * `src/rtos/hwthread.c` -- between ef3e61bebc53f619f42bb06cfd194cd547cceb69 and 436e6f1770e4da6ec5b52724cfb637e8916b535a. * `src/target/target.c` and `.h` -- between 53ec10b61da5de553c01f92bddf80c076bd49331 and e72733d59025b5d595bf955b227e95e5db7305c7. * `src/target/riscv/*` -- due to 957eb741a0980408fe4d0682fccb99a183f90998 and fec3b224214e3784b0c00970d2421212402da880. Resolved by: * Changing the return type of `riscv_batch_get_dmi_read_op()` to `uint32_t`. * Using RISC-V OpenOCD's version in other cases. Change-Id: Ia6e2129c6fddb1dec26adcd936506af2539412ef
2024-11-02server: convert 'unsigned' to 'unsigned int'Mark Zhuang2-7/+7
Conversion done with checkpatch --fix-inplace -types UNSPECIFIED_INT Ignore the cast as they could be better addressed. Change-Id: Ib0cbd9388d61659f8d47c8f57c09baa6df123487 Signed-off-by: Mark Zhuang <mark.zhuang@spacemit.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8369 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-10-20gdb_server: Improve const correctnessJan Matyas2-6/+6
On several packet-handling functions, add "const" to arguments that represent read-only packet buffers. For instance on GCC 13.2.0, this code: const char *some_packet = "..."; gdb_put_packet(conn, some_packet, strlen(some_packet)); would prior to the fix produce warning: passing argument 2 of ‘gdb_put_packet’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] Change-Id: Idb62f57d37ed323c39de38982e57afdd3882e280 Signed-off-by: Jan Matyas <jan.matyas@codasip.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8517 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-10-05OpenOCD: drop comparison with true/falseAntonio Borneo1-4/+4
Fix checkpatch errors: ERROR:BOOL_COMPARISON: Using comparison to true/false is error prone While there, - drop useless parenthesis, - drop unnecessary else after a return. Change-Id: I1234737b3e65bd10df5e938d1c36f9abaf02d348 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8496 Reviewed-by: zapb <dev@zapb.de> Tested-by: jenkins
2024-10-03Merge up to 1173473f662bbdf6d1499654568256257eee6cdd from upstreamEvgeniy Naydanov3-30/+37
1ae6b07b45198618c3f0975fd49de59cf6c04e7a replaced `buf_cmp()` with `buf_eq()`, so a96a0a4e3993de7f7169a306aa0202e0f3e26f4f needs to be adjusted. Change-Id: I97f6a3518db9421dab2ae4dd2312f443e928b114
2024-09-21server/telnet: Restructure commandsMarc Schink2-7/+23
Use a command group 'telnet' with subcommands instead of individual commands with 'telnet_' prefix. Even though there is only one subcommand at the moment, make this change to ensure consistency with other commands. The old command is still available to ensure backwards compatibility, but are marked as deprecated. Change-Id: I5e88632fa0d0ce5a8129e9fcf5ae743fc5b093cb Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8378 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-09-21server/gdb_server: improve error handling for `Z/z` packetEvgeniy Naydanov1-23/+14
* Report errors for `z` packet. * Report not supported types as required by GDB Remote Protocol's documentation: > Implementation notes: A remote target shall return an empty string for an unrecognized breakpoint or watchpoint packet type. Link: https://sourceware.org/gdb/current/onlinedocs/gdb.html/Packets.html#insert-breakpoint-or-watchpoint-packet Change-Id: I9130400aca5dbc54fefb413ed74f27d75fe50640 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8488 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-08-20Merge up to ac63cd00d792331914db0b6edd3f427c30eec3fa from upstreamParshintsev Anatoly4-21/+113
- src/jtag/drivers/ftdi.c: ``` ++<<<<<<< HEAD + int i; + static const uint8_t zero; ++======= + uint8_t zero = 0; ++>>>>>>> ocd_upstream ``` Decided to choose the latter. - src/target/riscv/riscv-013.c: ``` ++<<<<<<< HEAD + int abs_chain_position; + /* The base address to access this DM on DMI */ + uint32_t base; ++======= + unsigned int abs_chain_position; + ++>>>>>>> ocd_upstream ``` Decided to choose the latter (abs_chain_position is unsigned now) - src/target/riscv/batch.c: ``` ++<<<<<<< HEAD ++======= + void dump_field(int idle, const struct scan_field *field) + { ... + } ++>>>>>>> ocd_upstream ``` dump_field function is not needed anymore Signed-off-by: Parshintsev Anatoly <anatoly.parshintsev@syntacore.com>
2024-08-06server/telnet: Always allow 'exit' commandMarc Schink1-1/+1
The telnet 'exit' command is only available in the execution phase of OpenOCD. Thus, a telnet session cannot be closed via 'exit' if OpenOCD is started with 'noinit'. Make the 'exit' command always available. Change-Id: I14447ecde63e579f1c523d606f048ad29cc84a35 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8379 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2024-07-13server/tcl: Restructure commandsMarc Schink2-4/+33
Use a command group 'tcl' with subcommands instead of individual commands with 'tcl_' prefix. The old commands are still available to ensure backwards compatibility, but are marked as deprecated. Change-Id: I1efd8a0e2c1403833f8cb656510a54d5ab0b2740 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8344 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-07-13server/gdb: Restructure commandsMarc Schink4-16/+79
Use a command group 'gdb' with subcommands instead of individual commands with 'gdb_' prefix. The old commands are still available to ensure backwards compatibility, but are marked as deprecated. Change-Id: I037dc58554e589d5710cf46924e0a00f863aa300 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8336 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-06-25Merge up to ad87fbd1cf28760795c4e18f3318a2d720e5a8a6 from upstreamEvgeniy Naydanov1-23/+29
Conflicts: * `doc/openocd.texi`: due to d382c95d57c0ad9ed2dcc83c95404babb7647708, resolved by selecting the upstream version. * `src/server/gdb_server.c`: between 944fe66f104e356c5fcd2b5c25200cebef9b389c and 92e8823ebdb6d01b41bb5d79af49501d525acd1d. Resolved by adopting the use of `LOG_TARGET_*`. * `src/target/target.c`: between 639e68a621b7ae8c4a296ca7e45b47075268fded and c5358c84ad0d3e7497498e0457cec7785f72910a, selected the version from `riscv-openocd`. Change-Id: Ic1327f25e147945e0ec82947a82452501e8ee5de
2024-06-23server/gdb: Use LOG_TARGET_xxx() to show target nameMarc Schink1-20/+18
The output "gdb port disabled" is confusing without reference to the target. Use LOG_TARGET_INFO() to output the target name. While at it, use LOG_TARGET_xxx() for all log statements where the target name is already used. Change-Id: I70b134145837db623e008a4a6c0be0008d9a0d87 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8313 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-06-08gdb_server: do not start multiple instances on "pipe"Paul Fertser1-1/+3
For configurations which include multiple targets and the "pipe" mode is requested only the first gdb_server instance should be enabled, otherwise GDB gets confusing replies, goes out of sync and the session fails in weird ways. Compile-tested only. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Change-Id: If8f13aa7b58e9b0dc6d5ae88cf75538b34cc1218 Reviewed-on: https://review.openocd.org/c/openocd/+/8222 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-06-08server: gdb: respect command gdb_report_register_access_errorAntonio Borneo1-2/+8
Commit 236c54c94a53 ("server/gdb_server.c: support unavailable registers") correctly returns a string of 'x' when the register is not available in the current target. While implementing this, it incorrectly drops the pre-existing feature of optionally ignoring errors while reading a register. This feature has a real use case documented in the OpenOCD manual in chapter 'Using GDB as a non-intrusive memory inspector', where GDB attaches to a target without halting it. For targets that need to be halted to read its registers, we need to hack the values of the registers returned to GDB; either returning 'xxxx' or an error causes GDB to drop the connection. Re-add the check on 'gdb_report_register_access_error' to keep the pre-existing behavior when a register error has to be ignored: - return a string of '0'; - drop a debug message. Change-Id: Ie65c92f259f92502e688914f334655b635874179 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: 236c54c94a53 ("server/gdb_server.c: support unavailable registers") Reviewed-on: https://review.openocd.org/c/openocd/+/8228 Tested-by: jenkins
2024-05-30Merge up to 437dde701c13e707e5fd912ef6403e09052e4d9b from upstreamEvgeniy Naydanov2-20/+21
Conflict in src/rtos/FreeRTOS.c due to fbea7d5d38d0dcbdd71cb574da9bd12c78b568cf -- resolved by replacing `target->type->name` with a call to `target_type_name()`. Change-Id: I56702c6133894458903de7a4d764903004aa8b86
2024-05-26server/gdb: Use 'bool' data type where appropriateMarc Schink1-13/+13
Change-Id: Ic23c5469334337963185b69fcabeedf70c2c7ae9 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8253 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-05-11gdb_server: enable keep-alive packets for qCRC packetParshintsev Anatoly1-0/+2
Change-Id: Ia384179bb83ad6b70bf385cc9d575e9ec58f76c7 Signed-off-by: Parshintsev Anatoly <anatoly.parshintsev@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8227 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-05-04ipdbg: fix double free of virtual-ir dataDaniel Anselmi1-7/+6
Fix possible double free and possible memory leak while creating an ipdbg hub. Change-Id: I6254663c27c4f38d46008c4dbff11aa27b84f399 Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/8085 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-03-28Merge up to a35e254c5383008cdacf7838a777f7f17af5eeb1 from upstreamEvgeniy Naydanov4-162/+387
Checkpatch-ignore: MACRO_ARG_REUSE, MACRO_ARG_PRECEDENCE Change-Id: Icd10f44d162054f8f32019a579ccbdda2cee7a91
2024-03-24gdb_server: drop useless check in gdb_keep_client_alive()Antonio Borneo1-5/+2
OpenOCD can send it's log to gdb, and gdb replies with 'OK'. Calls to LOG_XXX() are also present in the code that communicates with gdb. This can cause infinite nested calls. OpenOCD uses the flag 'gdb_con->busy' to protect the communication with gdb and prevent nested calls. There is no reason to check for 'gdb_con->busy' in the code for keep-alive, as keep_alive() is never called in this gdb server; the flag would eventually be set if the current keep_alive() will send something to gdb. Drop the flag 'gdb_con->busy' in gdb_keep_client_alive(). While there, document the use of 'gdb_con->busy'. Change-Id: I1ea20bf96abb5d2f1fcdba1e3861df257c396bb6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8166 Tested-by: jenkins
2024-03-24gdb_server: add async-notif keep-alive during memory read/writeAntonio Borneo1-6/+46
To avoid gdb to timeout, OpenOCD implements a keep-alive mechanism that consists in sending periodically to gdb empty strings embedded in the "O" remote reply packet. The main purpose of "O" packets is to forward in the gdb console the output of the remote execution; the gdb-remote puts in the "O" packet the string that gdb will print. It's use is restricted to few "running/execution" contexts listed in http://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html and this currently limits the keep-alive capabilities of OpenOCD. Long data transfer (memory R/W) can also cause gdb to timeout if the interface is too slow. In this case the usual keep-alive based on "O" packet cannot be used and, if used, would trigger a protocol error that causes the transfer to be dropped. The slow transfer rate can be simulated by adding some delay in the main loop of mem_ap_write() and mem_ap_read(), then using the gdb commands "dump" and "restore". In the wait loop during a memory R/W, gdb drops any extra character received from the gdb-remote that is not recognized as a valid reply to the memory command. Every dropped character re-initializes the timeout counter and could be used as keep-alive. From gdb 7.0 (released 2009-10-06), an asynchronous notification can also be received from gdb-remote during a memory R/W and has the effect to reset the timeout counter, thus can be used as keep-alive. The notification would be treated as "junk" extra characters by any gdb older than 7.0, being still valid as keep-alive. Check putpkt_binary() and getpkt_sane() in gdb commit 74531fed1f2d662debc2c209b8b3faddceb55960 Currently, only one notification packet ("Stop") is recognized by gdb, and gdb documentation reports that notification packets that are not recognized should be silently dropped. Use 'set debug remote 1' in gdb to dump the received notifications and the junk extra characters. Add a new level in enum gdb_output_flag for using the asynchronous notifications. Activate this new level during memory transfers. Send a custom "oocd_keepalive" notification packet as keep_alive. While there, drop a useless return in the switch/case, already managed in case of break. After this commit, the proper calls to keep_alive() have to be added in the loops that code the memory transfers. Of course, the keep_alive() should be placed during the wait for JTAG flush, not while locally queuing the JTAG elementary transfers. Change-Id: I9ca8e78630611597d15984bd0e8634c8fc3c32b9 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8165 Tested-by: jenkins
2024-03-16ipdbg: configurable queue size used between JTAG-Host and JTAG-HubDaniel Anselmi1-14/+54
Change-Id: I7941de02a968ccab730bfebd3483b8c3b84d7e53 Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7980 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-03-16ipdbg: split ipdbg command into multiple commandsDaniel Anselmi3-139/+280
To simplify the ipdbg start/stop command and be able to add additional commands in the future, we introduce the concept of a hub which has to be created before a ipdbg server can be started. The hub was created on the fly in previous versions. Change-Id: I55f317542d01a7324990b2cacd496a41fa5ff875 Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7979 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-03-09gdb_server: fix segfault with GDB command 'flash-erase'Antonio Borneo1-0/+7
Running the GDB command 'flash-erase' triggers sending the remote GDB commands 'vFlashErase' (one per flash bank) followed by one single 'vFlashDone', with no 'vFlashWrite' commands in between. This causes the field 'gdb_connection->vflash_image' to be NULL during the execution of 'vFlashDone', triggering a segmentation fault in OpenOCD. While parsing 'vFlashDone', check if any image to flash has been received. Change-Id: I443021c7a531255b60f2c44c2685e52e3c34b5c8 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8164 Tested-by: jenkins
2024-03-07Merge up to 07141132a7d787005c0829618a60b4a842be7847 from upstreamEvgeniy Naydanov1-7/+5
Change-Id: Ibca0c8093e2983e1ee199f79ed777f5136794195
2024-03-02gdb_server: don't send unrequested ACK at connectionAntonio Borneo1-3/+0
On 2008-03-05, before git's age, commit 6d9501467441 adds sending an ACK ('+' char) at GDB connection, before receiving any GDB remote command that requires to be ACK'ed. Neither the text added in the commit message ("added ACK upon connection (send +)") nor in the associated comment ("send ACK to GDB for debug request") provide an exhaustive explanation for sending this unsolicited ACK. This code has never been touched since its introduction. Analysis of GDB code doesn't show it's required, including old GDB code. Running gdbserver (from GDB package) and attaching it with "nc" shows that gdbserver does not send any ACK to a new connection. Same for lldb-server. Drop it! Change-Id: Id68c352ce44dd85a1ea3d67446e17e2a241ef058 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6768 Tested-by: jenkins Reviewed-by: Jan Matyas <jan.matyas@codasip.com> Reviewed-by: Anatoly P <anatoly.parshintsev@syntacore.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2024-02-17server/gdb-server: fix type error.wangyanwen1-4/+5
Fix flash operation error when addr-width > 32bit on any 32-bit OS and some 64-bit OS (windows). Change-Id: I199f1cc5128c45bd0bb155e37acb2fb6325dff88 Signed-off-by: wangyanwen <wangyanwen@nucleisys.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8095 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2024-01-29Merge pull request #1006 from en-sc/en-sc/break-ll-revertJan Matyas1-1/+0
Revert "break from long loops on shutdown request"
2024-01-29ipdbg: improve ipdbg-host speedDaniel Anselmi1-67/+209
By queuing multiple jtag transfers the connection speed between JTAG-Host and JTAG-Hub is improved. This is due to much less calls to OS functions. An improvement of about x30 has been measured with ftdi-based jtag adapters For this to work the JTAG-Host server needs to know if flow control is enabled on the JTAG-Hub ports. This is possible with newer JTAG-Hub/JtagCDC. For old JTAG-Hubs the queuing is not enabled so this change is backwards compatible. Change-Id: I8a5108adbe2a2c1e3d3620b5c9ff77a546bfc14e Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7978 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-01-26Revert "break from long loops on shutdown request"Evgeniy Naydanov1-1/+0
This reverts commits 2e920a212fbe2de705811d547c169c1ae1611a02 and 8dbb1250f587484774752e8610f04a98157ca10a. The reason is, after `openocd_is_shutdown_pending()` becomes true, arbitrary command may be executed: * In `target_destroy()` and the corresponding `target->type->deinit_target()`. * In user-specifyed `pre_shutdown_commands` list. Change-Id: Icd00d1d954cd45e255880a6f76c3a74c098d6a17 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2024-01-13ipdbg: improve ipdbg-host speedDaniel Anselmi1-67/+209
By queuing multiple jtag transfers the connection speed between JTAG-Host and JTAG-Hub is improved. This is due to much less calls to OS functions. An improvement of about x30 has been measured with ftdi-based jtag adapters For this to work the JTAG-Host server needs to know if flow control is enabled on the JTAG-Hub ports. This is possible with newer JTAG-Hub/JtagCDC. For old JTAG-Hubs the queuing is not enabled so this change is backwards compatible. Change-Id: I8a5108adbe2a2c1e3d3620b5c9ff77a546bfc14e Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7978 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-01-09break from long loops on shutdown requestEvgeniy Naydanov1-0/+1
In loops that typically take longer time to complete, check if there is a pending shutdown request. If so, terminate the loop. This allows to respond to a signal requesting a shutdown during some loops which do not return control to main OpenOCD loop. Change-Id: Iace0b58eddde1237832d0f9333a7c7b930565674 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2023-12-24break from long loops on shutdown requestEvgeniy Naydanov1-0/+1
In loops that typically take longer time to complete, check if there is a pending shutdown request. If so, terminate the loop. This allows to respond to a signal requesting a shutdown during some loops which do not return control to main OpenOCD loop. Change-Id: Iace0b58eddde1237832d0f9333a7c7b930565674 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8032 Reviewed-by: Jan Matyas <jan.matyas@codasip.com> Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-12-22Merge commit '16e9b9c44fa62ea6eec99d1fb7bc43a8f1cc2f7e' into from_upstreamTim Newsome1-3/+21
Conflicts: configure.ac tcl/target/gd32vf103.cfg Change-Id: I72bbb973249b7bbfa720696fa2c76a87a41a2e9c
2023-12-05Merge commit 'a9080087d82688043ca216d50926228d09631297' into from_upstreamTim Newsome1-13/+20
Change-Id: I83a33c1022f8d1a7670ded62f16ec999fc4ef525
2023-11-27Merge commit '4b1ea8511a7da9d7201df40302e3341c6e97ffdd' into from_upstreamTim Newsome1-19/+30
Change-Id: I59366e08a4ac7e443e426b5fd6727c649f1ac9d5
2023-11-24rtt_server: Add option for a message when client connectsThiemo van Engelen1-3/+21
This is useful when using the SEGGER RTT tooling, as the SEGGER RTT tool J-Link RTT Viewer version 7.84f requires that it receives a messages immediately after connecting. Otherwise it will give a timeout and it will not connect. Change-Id: I9240a1b6a93cd5c0fbd18292afb33b89013d78bf Signed-off-by: Thiemo van Engelen <tvanengelen@victronenergy.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7752 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-11-06Merge commit '05ee88915520d1dd82da94a016a9374a1f3a8129' into from_upstreamTim Newsome2-5/+33
Conflicts: src/jtag/drivers/xds110.c src/target/riscv/riscv.c src/target/riscv/riscv_semihosting.c tcl/target/esp_common.cfg Change-Id: If0c02817df03b7fd700cc84b4da2c02d36737d28
2023-10-27Merge commit '9f23a1d7c1e27c556ef9787b9d3f263f5c1ecf24' into from_upstreamTim Newsome2-34/+28
Conflicts: HACKING src/target/riscv/riscv-013.c Change-Id: I43ccb143cae8daa39212d66a8824ae3ad2af6fef
2023-10-27Merge pull request #942 from riscv/from_upstreamTim Newsome2-1/+23
From upstream
2023-10-25Remove an extra call to kept_alive()Jan Matyas1-1/+0
This incorrect extra call has been removed in upstream code already in March 2022, see https://review.openocd.org/c/openocd/+/6836 . Remove it from riscv-openocd as well. Change-Id: Ie341f5578c8bfdc518adf1e4bc134919ab76f803 Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
2023-10-23Merge commit 'e17fe4db0f256ee4fb97dcfd6b9f7f55c966b190' into from_upstreamTim Newsome2-1/+23
Conflicts: src/flash/nor/drivers.c src/target/riscv/riscv.c Change-Id: Ide3eded7e0d5b0b446bfd0873a32c00cc9f128bd
2023-10-16Merge commit '0384fe5d596f42388f8b84d42959d899f29388ab' into from_upstreamTim Newsome1-9/+9
Conflicts: .github/workflows/snapshot.yml src/rtos/FreeRTOS.c Change-Id: I4c9ff887b69140e0f61cb3f75a2f2c1a12071320