aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2025-01-27Merge pull request #1202 from JanMatCodasip/fix-datatypes-around-batchEvgeniy Naydanov5-64/+124
Fix data types around batch.{c,h}
2025-01-27Merge pull request #1200 from ↵Evgeniy Naydanov1-7/+19
JanMatCodasip/jm-codasip/semihosting-3-warn-if-encountered-but-disabled RISC-V Semihosting 3 of 3: Warn if encountered but disabled
2025-01-27Merge pull request #1193 from en-sc/en-sc/not-busyEvgeniy Naydanov1-0/+9
target/riscv: clear `abstract_cmd_maybe_busy` after commands
2025-01-25helper/log: Fix build using _DEBUG_FREE_SPACE_Antonio Borneo1-3/+14
The glibc API 'mallinfo' is deprecated and the new 'mallinfo2' should be used from glibc 2.33 (2021-02-01). Throw an error when '--enable-malloc-logging' is used on systems that compile without glibc. Detect the glibc version and, for backward compatibility, define 'mallinfo2' as the old 'mallinfo'. Define a macro for the format of 'fordblks'. Change-Id: I68bff7b1b58f0ec2669db0b911f19c1c5a26ed30 Reported-by: Steven J. Hill <steven.hill@konsulko.com> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8589 Tested-by: jenkins
2025-01-25helper/options: handle errors in `-l`Evgeniy Naydanov1-1/+5
Before the patch an error in opening the log file (e.g. can't write a file) was ignored when specified via `-l`. E.g.: ``` > touch log > chmod -w log > openocd -l log -c shutdown ... failed to open output log "log" shutdown command invoked > echo $? 0 ``` After the patch: ``` ... > openocd -l log -c shutdown ... failed to open output log "log" > echo $? 1 ``` Change-Id: Ibab45f580dc46a499bf967c4afad071f9c2972a2 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8666 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-01-25helper/options: drop redundant argument checksEvgeniy Naydanov1-4/+2
In case the option is passed with a single `:` in `optstring` argument, the call to `getopt_long()` should return `?`. Therefore the check on `optarg` is redundand in case of `l` and `c`. Change-Id: I1ac176fdae449a34db0a0496b69a9ea65ccd6aec Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reported-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8718 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-01-25vdebug: Fix socket comparison warning on WindowsMarek Vrbka1-1/+1
On GCC version 13.2, the previous code emitted the following warning on Windows: openocd/src/jtag/drivers/vdebug.c:254:19: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare] 254 | if (hsock == INVALID_SOCKET) This patch fixes it and brings it in line with other socket handling code. Change-Id: I7e05f83c6905cfaf66b68e8988c783e80cee4a48 Signed-off-by: Marek Vrbka <marek.vrbka@codasip.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8717 Tested-by: jenkins Reviewed-by: Jan Matyas <jan.matyas@codasip.com> Reviewed-by: Jacek Wuwer <jacekmw8@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: R. Diez <rdiez-2006@rd10.de>
2025-01-25flash/nor/kinetis: fix assertion during flash writeTomas Vanek1-1/+16
If the device has at lest one FlexNVM bank and it is set as EE backup only, the bank has no protection blocks. kinetis_fill_fcf() collects protection data from all banks before flash write of the sector containing FCF block. In case it encountered a FlexNVM bank with no protection blocks assert failed. Failed flash write of previously erased FCF block could cause engaging debugging lock (if the device was run or reset). Skip banks with zero protection blocks. Replace assert() by LOG_ERROR() as we have to finish FCF write. Change-Id: Ibe7e7ec6d0db4453b8a53c8256987621b809c99d Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Suggested-by: Jasper v. Blanckenburg <jazzpi@users.sourceforge.net> Fixes: https://sourceforge.net/p/openocd/tickets/448/ Reviewed-on: https://review.openocd.org/c/openocd/+/8719 Tested-by: jenkins Reviewed-by: Jasper v. Blanckenburg <jasper@mezzo.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-01-25OpenOCD: fix code indentationAntonio Borneo17-83/+72
Fix checkpatch errors ERROR:SUSPECT_CODE_INDENT: suspect code indent for conditional statements Change-Id: I94d4fa5720c25dd2fb0334a824cd9026babcce4e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8497 Tested-by: jenkins
2025-01-25target: cortex_m: add support of ARMv8.1-M register 'vpr'Antonio Borneo3-1/+36
The register 'vpr' is present when MVFR1.MVE is not zero. For the moment, reuse the existing flag 'fp_feature'. To be reviewed for the case of MVE supported without floating point. The documentation of GDB [1] reports that the register 'vpr' should be represented as 3 fields. Tested on Cortex-M55 based STM32N6570. Change-Id: I8737a24d01a13eeb09a0f2075b96be400f9f91c6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Link: [1] https://sourceware.org/gdb/download/onlinedocs/gdb.html/ARM-Features.html#M_002dprofile-Vector-Extension-_0028MVE_0029 Reviewed-on: https://review.openocd.org/c/openocd/+/8681 Tested-by: jenkins
2025-01-25target: armv7m: add support of per register data_typeAntonio Borneo1-66/+71
Extend the struct armv7m_regs to include the optional pointer to a struct reg_data_type. Update armv7m_build_reg_cache() to check for the new optional field and to use it. Change-Id: I57c7f9abefd614308be8aa8419d687477b44679d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8680 Tested-by: jenkins
2025-01-24target/riscv: set VLENB/MTOPI/MTOPEI existence on 0.11 targetsEvgeniy Naydanov1-11/+38
commit 5f45b5bd73566028ee36c146803232b3dce77c52 ("target/riscv: reg cache entry is initialized before access") introduced an assertion in `riscv_reg_impl_gdb_regno_exist()`. Link: https://github.com/riscv-collab/riscv-openocd/blob/f82c5a7c048eb70fdc4dff6f53002fa1d3a1bda5/src/target/riscv/riscv_reg.c#L385-L389 This assertion fails on RISC-V Debug Spec. 0.11 targets. The commit is intended to fix this. Change-Id: I20b56df1517f4071f4b6e39c83178a29a9cf95b0 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2025-01-25target/riscv: move the dcsr modification out of program bufferliangzhen1-95/+64
when riscv virt2phys_mode is hw, reduce the use of unnecessary program buffers.
2025-01-23Makefile.am: fixed missing includes for make dist targetsAlexander Rumyantsev1-0/+3
Due to missing includes, make dist archives could not be built. Signed-off-by: Alexander Rumyantsev <cetygamer@gmail.com>
2025-01-22Add Linux SPI device SWD adapter supportRichard Pasek4-0/+629
To alleviate the need to bitbang SWD, I've written a SWD SPI implementation. This code is inspired by the work of luppy@appkaki.com as shown at github.com/lupyuen/openocd-spi but with the desire to be more generic. This implementation makes use of the more common 4 wire SPI port using full duplex transfers to be able to capture the SWD ACK bits when a SWD TX operation is in progress. TEST: Connects successfully with the following combinations: Hosts: Raspberry Pi 4B Unnamed Qualcomm SoC with QUPv3 based SPI port Targets: Raspberry Pi 2040 Nordic nRF52840 NXP RT500 Change-Id: Ic2f38a1806085d527e6f999a3d15aea6f32d1019 Signed-off-by: Richard Pasek <rpasek@google.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8645 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: zapb <dev@zapb.de> Tested-by: jenkins
2025-01-22Merge up to 26f2df80c3f9ac54fc488ed26f6320904881c0d4 from upstreamEvgeniy Naydanov43-411/+523
Conflicts: * `src/target/target.c` due to commit 4004db5d3a7e767aa4a6b7fddf92ac3370670c79 ("Make polling_interval unsigned.") Change-Id: I0a691dbebe300f3a53fb31bd1097a9aff5551a52
2025-01-22RISC-V Semihosting 3 of 3: Warn if encountered but disabledJan Matyas1-7/+19
If semihosting is disabled but there is a semihosting request encountered in the program, provide a clear hint to the user what happened and what can be done about it. Change-Id: I8fa7b821ca9a853cbc884f38d138fa5c8946c84c Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
2025-01-22Merge pull request #1199 from ↵Evgeniy Naydanov1-28/+73
JanMatCodasip/jm-codasip/semihosting-2-refactor-magic-seq-detection RISC-V Semihosting 2 of 3: Refactor magic sequence detection
2025-01-21Fix data types around batch.{c,h}Jan Matyas5-64/+124
Check that the value of dtmcs.abits is in the expected range. Make corrections of data types in batch.{c,h} and in related code. Some of the issues were found by activating "-Wconversion" in GCC, others by inspecting the code manually. This is an initial step towards being able to use "-Wconversion" on RISC-V target code, which will give us bit more confidence when refactoring or merging new patches. Changes made: - Check `dtmcs.abits` during examination. - DMI address is no larger than 32-bits per the debug spec. Changed address parameters of multiple functions from uint64_t to uint32_t. - The value passed to jtag_add_runtest() is now `unsigned int`, not `int`. No need for `assert(idle <= INT_MAX)` anymore. - `get_delay()` in batch.c can return an unsigned value. - Added few assertions around `field->num_bits` in batch.c. Change-Id: Ibfccd62d552063df6ab9b5a2d4ea4ed23617d3db Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
2025-01-20Remove target/riscv/asm.hJan Matyas5-44/+26
The file asm.h is only used by riscv-011.c. Remove the whole asm.h file and inline the two functions into riscv-011.c which is the only place of use. Change-Id: Ifa4b2b87ab9f3f50c78a75361003ce478bfd9d5f Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
2025-01-20RISC-V Semihosting 2 of 3: Refactor magic sequence detectionJan Matyas1-28/+73
Refactor (clean up) the code in riscv_semihosting.c by moving the magic sequence detection to its own function. Cleanup the debug prints denoting the semihosting outcome so that they are easier to understand when reading the OpenOCD's verbose (debug) log. Use le_to_h_u32() to convert memory buffer to instruction code because RISC-V instructions are always little endian. (target_buffer_get_u32() was incorrect for that reason.) Change-Id: I3a3ce991336ceeeff023d459d0e28558059554e0 Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
2025-01-15target/riscv: new `ebreak` controlsEvgeniy Naydanov5-65/+276
* Deprecate `riscv set_ebreak*` commands. * Introduce RISC-V-sepecific `configure` parameter `-ebreak` instead. * Separate controls for VS and VU modes. Change-Id: I0ff88318dcb52af6923eb9f20f9d0c056ad09cf0 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2025-01-12helper: list: rename macro clashing with sys/queue.hAntonio Borneo9-12/+12
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>
2025-01-12amend angie build definitions to fix make distR. Diez1-6/+9
"make dist" was broken because GNU Make was using a built-in rule to try to build angie from angie.c . This is a limitation in Automake when you add a whole subdir with the same name to EXTRA_DIST. The Automake doc actually discourages adding whole subdirs. Change-Id: I85ea4ecbd529b060c70f83bcfda7522e1730480d Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8600 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-01-12make bitbang_interface constR. Diez11-11/+11
Change-Id: I5e187250d231aeefc7a206b7f7917c3b2e858d5a Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8535 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2025-01-09target: free private_config if target initialisation failsTomas Vanek1-0/+3
Fixes private_config memory leak when xx_deinit_target() is not called Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Change-Id: Ie7cce7f24af24695e7d2c1cd1882474c6863b80d Reviewed-on: https://review.openocd.org/c/openocd/+/8642 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de> Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2025-01-09drivers/cmsis_dap_usb_bulk: allow waiting for bulk writeTomas Vanek1-2/+2
No driver directly working with the USB hardware needs additional time to complete the write op, they always return transfer complete status immediately after submitting the transfer. Although there is implemented correct waiting path in cmsis_dap_usb_write() it was marked by error logs to catch any suspicious behaviour during debugging of asynchronous libusb transfers. However there are drivers which need waiting to finish write op: at least usbipd-win, IP tunnelled USB driver, was reported to flood the log with the related errors. Change LOG_ERROR to LOG_DEBUG_IO in the code waiting to finish write op. Reported-by: Quentis Ghyll <quentisgh@gmail.com> Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Change-Id: Iedf2c96d851f22e694efaf13a2d6a2a408cee1ad Reviewed-on: https://review.openocd.org/c/openocd/+/8640 Tested-by: jenkins
2025-01-09drivers/cmsis_dap: use blocking flag instead of wait timeoutTomas Vanek4-31/+26
CMSIS-DAP bulk backend read op used two timeouts: transfer timeout used in libusb_fill_bulk_transfer() and wait timeout used optionally in libusb_handle_events_timeout_completed(). The real usage is limited to two cases only: 1) blocking read: the same timeout is used for both transfer and wait 2) non-blocking read: transfer timeout is used in libusb_fill_bulk_transfer(), libusb_handle_events_timeout_completed() is called with zero timeout. Use blocking flag as read op parameter to distinguish between these two cases. See also [1] Link: [1] 8596: jtag: cmsis_dap: include helper/time_support.h | https://review.openocd.org/c/openocd/+/8596 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Change-Id: Ia755f17dc72bb9ce8e02065fee6a064f8eec6661 Reviewed-on: https://review.openocd.org/c/openocd/+/8639 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2025-01-07RISC-V Semihosting 1 of 3: Remove dead codeJan Matyas1-10/+4
Variable `target->semihosting` is always initialized in risv_init_target() to a non-NULL value. For that reason, checks like `if (target->semihosting)` are redundant (dead code). Remove them to not confuse code readers. Replace them by assertions. Change-Id: I85ef52300e240cfcb0119db6169993bc4767de8f Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
2025-01-06flash/stm32l4x: add STM32C071xx supportDavid (Pololu)2-0/+18
I successfully programmed a NUCLEO-C071RB with these changes. Change-Id: Ib57a77fa18f8a0e8c882e2250d6111c588d76887 Signed-off-by: David (Pololu) <dev-david@pololu.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8525 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2024-12-30target/arc: Use LOG_TARGET_xxx()Marc Schink2-135/+135
Use LOG_TARGET_xxx() for log messages as it is used for other targets. While at it, rework the log messages, for example by removing spaces or punctuation marks at the end of the message. Change-Id: I3dd4314d354b5628144f98325540926981778616 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8665 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-12-30target/armv7m: Use LOG_TARGET_xxx()Marc Schink1-25/+27
Use LOG_TARGET_xxx() to indicate which target the message belongs to. Change-Id: Ib1cd37fe6eca2ea42095d2d371116446a936e20a Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8664 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-12-30target/esirisc: Use LOG_TARGET_xxx()Marc Schink2-140/+138
Use LOG_TARGET_xxx() for log messages as it is used for other targets. Change-Id: Ia7e9629d89f2e6cb3f9c156e74ac1a02960f9373 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8663 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-12-30target/mem_ap: Use LOG_TARGET_xxx()Marc Schink1-14/+14
Use LOG_TARGET_xxx() for log messages as it is used for other targets. Change-Id: I2f937c937a5c09d91dc82b4323be3276ab60b01a Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8662 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-12-30helper/log: Add LOG_TARGET_USER()Marc Schink1-0/+3
Add a target-related log function for user messages as it already exists for other log levels. Change-Id: I9076677d6451b900332583e748bab3f83df56d3b Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8661 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-12-29flash/nor/stm32l4x: Add support for STM32U0 seriesMarc Schink2-1/+39
Tested flash programming / erasing and write protection feature on the STM32U083RC microcontroller. Change-Id: I3af51452f76d1f046d34d61b22d51abe2d0db3e8 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8647 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2024-12-25target/riscv: clear `abstract_cmd_maybe_busy` after commandsEvgeniy Naydanov1-0/+9
If a sufficient delay was used before reading `abstractcs` during the batch execution, `dm->abstract_cmd_maybe_busy` was not cleared and the following call to `wait_for_idle_if_needed()` (e.g. on `resume`), would result in a call to `wait_for_idle()` performing a redundant read of `abstractcs`. While this is not a bug, it impedes the performance. Change-Id: I9d234ef6d53af96c60892d71247c10e631dfcc3b Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2024-12-22rtos/rtos: Remove 'ERROR: ' prefix in error logMarc Schink1-1/+1
Remove the prefix since it is redundant. Change-Id: Ib064d1031f5ad14ed7711c09bb5f5254d0054d59 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8633 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-12-22target/mips: Remove 'ERROR: ' prefix in error logMarc Schink2-7/+7
Remove the prefix since it is redundant. Change-Id: Ieecfb3583d484847514f1298e819ccf6d26abd84 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8632 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-12-22target/xtensa: Remove 'ERROR: ' prefix in error logMarc Schink1-1/+1
Remove the prefix since it is redundant. While at it, also get rid of the useless exclamation mark. Change-Id: I16fd6a88b533fac19b4c622cf9740fd32ba7892c Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8611 Reviewed-by: Richard Allen <rsaxvc@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-12-22rtos: mqx: minor rework to avoid a castAntonio Borneo1-2/+2
Change the type of task_name[] to char in order to drop a cast. Change-Id: I233fc862e972e52130fd4ffcb29a3da36f4f8923 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8599 Reviewed-by: Paul Fertser <fercerpav@gmail.com> Tested-by: jenkins
2024-12-22rtos: mqx: replace malloc+strcpy with strdupPaul Fertser1-2/+1
Using strcpy is potentially dangerous so just use a safer and easier way to do the same. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Change-Id: Id85f3b7f8af1eaf14c9951ae710546d2437c70b5 Reviewed-on: https://review.openocd.org/c/openocd/+/8597 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2024-12-22target: aarch64: fix out-of-bound access to arrayAntonio Borneo1-4/+18
The command 'arm core_state' uses the enum in 'arm->core_state' as an index in the table of strings to print the core state. With [1] the enum has been extended with the new state for AArch64 but not the corresponding table of strings. This causes an access after the limit of arm_state_strings[]. Rewrite the table using c99 array designators to better show the link between the enum list and the table. Add the function arm_core_state_string() to check for out-of-bound values allover the file. Change-Id: I06473c2c8088b38ee07118bcc9e49bc8eafbc6e2 Fixes: [1] 9cbfc9feb35c ("arm_dpm: Add new state ARM_STATE_AARCH64") Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8594 Tested-by: jenkins
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-12-21flash/nor/sfdp: Fix broken DEBUG log line on macOSPete Moore1-1/+1
https://review.openocd.org/c/openocd/+/8439 changed variable `words` from uint8_t to unsigned int in sfdp.c but failed to update the LOG_DEBUG line to reflect the new type. On macOS this caused: src/flash/nor/sfdp.c:107:28: error: format specifies type 'unsigned char' but the argument has type 'unsigned int' [-Werror,-Wformat] The formatting of the debug line has been updated to reflect the updated type. Change-Id: Ifc7ddb1279ab2603901c969d9c09af847f3a3caf Signed-off-by: Pete Moore <pmoore@mozilla.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8660 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-12-18Merge up to 133dd9d669e5b8beb7c7787b0be677621808e72d from upstreamEvgeniy Naydanov39-151/+119
Change-Id: Iaaf234da839cbed61684f4615135c9a42213c56a
2024-12-11Merge pull request #1181 from en-sc/en-sc/reg-invalidateEvgeniy Naydanov5-21/+80
target/riscv: clean-up register invalidation
2024-12-10target/riscv: clean-up register invalidationEvgeniy Naydanov5-21/+80
* Registers were not invalidated if the hart became unavailable. * Improved logging in the case register invalidation involves loss of information. Change-Id: Icfb5e190dd6dcb1a97e4d314d802466cab7a01e4 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2024-12-10target/riscv: replaced repeating ternary operator with variableFarid Khaydari1-33/+40
Replaced repeating ternary operator with variable Signed-off-by: Farid Khaydari <f.khaydari@syntacore.com>
2024-12-04target/riscv: use buf_get_uXX instead of manual bit shiftFarid Khaydari1-20/+8
Replaced manual bit shift with buf_get_u64/buf_get_u32 Signed-off-by: Farid Khaydari <f.khaydari@syntacore.com>