Shivasharan Nagalikar [Wed, 19 Feb 2025 08:28:43 +0000 (13:58 +0530)]
tcl/target/ti_k3: Add support for AM261
AM261[1] is a optimized cutdown of AM263P SoC. The key difference is
the reduced number of R5F cores which is now dropped down to 2, and
the DIE ID is different from AM263p, but all other definitions are
compatible, so reuse the definition.
Shivasharan Nagalikar [Wed, 19 Feb 2025 08:27:35 +0000 (13:57 +0530)]
tcl/target/ti_k3: Add support for AM263P
AM263P[1] adds additional features to AM263 SoC. [2] provides a
detailed list of differences, however, the key difference from
processor usage perspective is the increased SRAM and Remote L2(RL2)
Cache for improved performance of R5F. To differentiate the DIE ID
is different, however rest of the processor description remain
compatible to AM263, hence reuse the definition.
Shivasharan Nagalikar [Wed, 19 Feb 2025 08:23:03 +0000 (13:53 +0530)]
tcl/target/ti_k3: Add support for system reset using powerAP
TI K3 Debug systems have a Power Access Port (Power-AP) which allows
for functionality such as reset via debugger that using the SPREC
register. SoCs/Boards that do not have support for SRST or TRST can
make use of this to force a system reset via debug access.
Add basic connection details for TI's MSPM0 Launchpad series of
evaluation kits:
https://www.ti.com/tool/LP-MSPM0L1306
https://www.ti.com/tool/LP-MSPM0C1104
https://www.ti.com/tool/LP-MSPM0G3507
Change-Id: I33499f2d5fef846185ff6c330f9bfd0251117eb6 Co-developed-by: Henry Nguyen <h-nguyen8@ti.com> Signed-off-by: Henry Nguyen <h-nguyen8@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8386 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
flash/nor: Add basic support for TI's MSPM0L/G family
Add basic flashing support for Texas Instruments MSPM0L, C and G
family of Cortex-M0 based micro-controllers.
This initial basic flashing support allows for controlling protection,
erase, write and read of non-main flash region.
This has been tested with:
* Valgrind (3.22.0):
valgrind --leak-check=full --show-leak-kinds=all \
--track-origins=yes --verbose
* Ubuntu clang version 20.0.0
(++20241014053649+ed77df56f272-1~exp1~20241014053827.1987)
Valgrind-clean, no new Clang analyzer or sparse warnings have been
introduced.
Change-Id: I29b8055ea6da9c38c5b7b91bea1ec7581c5bc8ff Co-developed-by: Henry Nguyen <h-nguyen8@ti.com> Signed-off-by: Henry Nguyen <h-nguyen8@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8384 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: zapb <dev@zapb.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tomas Vanek [Mon, 17 Feb 2025 11:15:09 +0000 (12:15 +0100)]
drivers/cmsis_dap: fix misleading error selecting not compiled backend
If one of CMSIS-DAP backends was not compiled (due to
missing library or configure --disable-cmsis-dap) and
Tcl config explicitly selected it, a misleading message
"invalid backend argument to cmsis-dap backend <backend>"
was printed.
Create dummy backends in struct cmsis_dap_backend
to replace a not built backend.
Check for NULL open backend method to distinguish
the backend is dummy.
Rework 'cmsis-dap backend' command to honour dummy
backend. While on it print more helpful error messages.
Change-Id: I8f12aeaaecf19302032870bc232e5135c1d935e7 Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8760 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Jim Paris [Fri, 21 Feb 2025 17:33:45 +0000 (12:33 -0500)]
gdb_server: fix invalid free
`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
Marek Kraus [Sat, 23 Nov 2024 14:54:26 +0000 (15:54 +0100)]
tcl/target: add Bouffalo Lab BL602 and BL702L chip series support
BL602, BL702 and BL702L series of chips are sharing same architecture,
so they all need same software reset mechanism as well.
Only difference (in terms of configuration needed for JTAG) are TAP ID,
workarea address and size. This is addressed by creating bl602_common.cfg
tcl file, which contains all those common stuff between the chips.
The script is prefixed by bl602, as this was
first *publicly* available chip from Bouffalo with this architecture.
This patch also improves reset mechanism. Previous reset mechanism did not
worked properly when slower JTAG adapter was used (it attached too late).
New reset mechanism uses various methods to keep CPU in BootROM, until
the JTAG adapter does not attach again after reset. Additionally,
we trigger SW Reset by directly using DMI commands to write to register
with system bus method, to avoid getting error about unsuccessful write.
The new method works on both FT232H (8MHz JTAG clock) and
unnamed CMSIS-DAP dongle (1.5MHz JTAG clock).
Change-Id: I5be3694927793fd3f64c9ed4ee6ded2db0d25cae Signed-off-by: Marek Kraus <gamelaster@outlook.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8593 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tomas Vanek [Sat, 15 Feb 2025 07:11:02 +0000 (08:11 +0100)]
drivers/linuxspidev: fix compilation on Linux older than 3.15
Although the commit [1] which introduced SPI_IOC_WR_MODE32 is 10 years
old, some hardware may enforce old Linux because the vendor
didn't bother with system updates.
Change-Id: I76d0b38c8646b1be329418860916b9f01b90990d
Link: [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/include/uapi/linux/spi/spidev.h?h=linux-3.15.y&id=dc64d39b54c1e9db97a6fb1ca52598c981728157 Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8759 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Evgeniy Naydanov [Wed, 12 Feb 2025 18:12:30 +0000 (21:12 +0300)]
flash/nor/rsl10: drop unused `rsl10_info` in `rsl10_protect_check()`
`struct rsl10_info *chip` is only used in `rsl10_protect_check()` in an
assertion triggerring `-Wunused-variable` when compiled with `DNDEBUG`.
Drop it.
Antonio Borneo [Thu, 6 Feb 2025 10:48:30 +0000 (11:48 +0100)]
build: drop space after 'angie' folder name
The makefile consider the two white spaces between the end of the
folder name and the '#' character for the beginning of the comment
as part of the folder name.
This cause 'make install' to create a folder named 'angie ' that
is not welcome on all the OS.
Drop the comment and the space after the folder name.
Tomas Vanek [Mon, 3 Feb 2025 20:45:07 +0000 (21:45 +0100)]
jtag/core: fix segfault when adapter driver has no reset method
xlnx-pcie-xvc and linuxspidev adapter drivers does not implement
the reset method.
Although it is likely both adapters will implement the method in
the near future, avoid segfault and return an error instead.
Change-Id: If8ddf165dbc563cf6d64b2094968151075778ba7 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Fixes: commit 8850eb8f2c51 ("swd: get rid of jtag queue to assert/deassert srst")
Reviewed-on: https://review.openocd.org/c/openocd/+/8735 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
The Automake manual states: "The user can still extend or override
the flags provided there by defining the DISTCHECK_CONFIGURE_FLAGS
variable". Overriding variable DISTCHECK_CONFIGURE_FLAGS in Makefile.am
makes it impossible for the user to do that. I discovered this
when trying to pass --enable-internal-jimtcl to distcheck.
Change-Id: Ibe5b1f23ccf3fbaa21c48b574a1b3f3e9f6fb916 Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8724 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Daniel DeGrasse [Fri, 17 Jan 2025 03:33:48 +0000 (22:33 -0500)]
target/arc: allow reading memory while target runs
There is no reason that ARC can't support reading from memory over JTAG
while the target is executing, and this is in fact required for RTT
support. Remove this check from arc_mem_read and arc_mem_write
Change-Id: I2accfb4b99bf77c5473d133623e0eb0632cb45f6 Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8721 Tested-by: jenkins Reviewed-by: Evgeniy Didin <didin@synopsys.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Fri, 10 Jan 2025 16:11:24 +0000 (17:11 +0100)]
checkpatch: enable check for new typedefs
We should strictly check for every new typedef.
Let checkpatch detect them and let developer use
Checkpatch-ignore: NEW_TYPEDEFS
if it's really needed to add a new typedef.
With this change chackpatch will not complain for typedef on
function's type but only on enum, struct, variable's type.
Antonio Borneo [Fri, 10 Jan 2025 14:01:20 +0000 (15:01 +0100)]
target: esp_algorithm: drop useless typedefs
There is no need to use extra typedef for the functions in struct
esp_algorithm_run_data.
Declare the type of the functions in the struct.
Split the comment lines to stay in the line limits.
Richard Pasek [Thu, 30 Jan 2025 10:38:08 +0000 (05:38 -0500)]
driver/linuxspidev: Clear queue on allocation
SWD idle clocks are added to the queue by advancing the queue index
assuming the queue is zeroed. If the queue isn't zeroed, these idle
clocks end up being filled with junk data. Lets clear the queue and
associated buffers on queue allocation.
TEST: Connects successfully and ran the following TCL command:
dump_image /dev/null 0x20000000 0x42000
Host: Unnamed Qualcomm SoC with QUPv3 based SPI port
Target: RT500
Signed-off-by: Richard Pasek <rpasek@google.com>
Change-Id: Ie660c10c27c4d0937ab0629138935ddbf5aeb0ae Fixes: 83e0293f7ba3 ("Add Linux SPI device SWD adapter support")
Reviewed-on: https://review.openocd.org/c/openocd/+/8730 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Jonathon Reinhart <jrreinhart@google.com> Tested-by: jenkins
Tomas Vanek [Mon, 3 Feb 2025 19:28:49 +0000 (20:28 +0100)]
drivers/linuxspidev: fix use of uninitialized speed variable
Valgrind reported
== Syscall param ioctl(generic) points to uninitialised byte(s)
== at 0x4ABF990: ioctl (ioctl.S:26)
== by 0x19D00B: spidev_speed (linuxspidev.c:181)
== by 0x19D00B: spidev_init (linuxspidev.c:307)
Indeed, spidev_init() uses adapter_get_speed(), it calls
adapter_khz_to_speed() and it returns early without setting
the output parameter if adapter is not initialized.
Of course the adapter initialized flag is not set until
spidev_init() returns.
Simply drop this code as the adapter infrastructure initializes
adapter speed just after spidev_init() return.
Change-Id: I26f011ae59fc942a34d9bb517f467c22f735091d Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Fixes: 83e0293f7ba3 ("Add Linux SPI device SWD adapter support")
Reviewed-on: https://review.openocd.org/c/openocd/+/8733 Tested-by: jenkins Reviewed-by: Richard Pasek <rpasek@google.com>
Driver for DesignWare SPI controller, found on many SoCs (see compatible
list in Linux device tree bindings
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml). This
implementation only supports MIPS as it was the only one available for the
tests, however, adding support for other architectures should require only
few adjustments. Driver relies on flash/nor/spi.h to find Flash chip info.
Driver internal functions support 24bit addressing mode, but due to
limitations of flash/nor/spi.h, it is not used. The reported writing speed
is about 60kb/s.
Lint, sanitizer and valgrind reported warnings were not related to the
driver.
Marc Schink [Wed, 26 Jun 2024 13:50:45 +0000 (15:50 +0200)]
bootstrap: Do not set up Git submodules by default
Building OpenOCD with jimtcl and libjaylink Git submodules is deprecated
and will be removed in the upcoming releases. The remaining 'git2cl'
submodule is only required during the OpenOCD release process.
Only set up Git submodules when the 'with-submodules' argument is used,
for example during the OpenOCD release process or for the transition
period until all submodules are replaced by external dependencies.
We keep the existing 'nosubmodule' argument in order to not break
automatic testing with Jenkins.
Change-Id: Ia4fd765e3a2d6b2c40b084a1ffdf919d5f4f35bb Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8381 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Marc Schink [Tue, 2 Jul 2024 15:12:46 +0000 (17:12 +0200)]
Deprecate jimtcl Git submodule
jimtcl was integrated as Git submodule for convenience and probably also
because packages were not widely available at the time. Today, jimtcl is
available in many popular package repositories [1] and the integration
as Git submodule adds unnecessary complexity to the OpenOCD build
process. For details, see the discussion on the mailing list in [2].
Disable the jimtcl Git submodule by default and announce it as
deprecated feature that will be removed in the next release. This gives
package maintainers time to adapt to the change and, if necessary,
build a package for jimtcl.
Antonio Borneo [Tue, 20 Feb 2024 02:11:07 +0000 (20:11 -0600)]
helper/log: Fix build using _DEBUG_FREE_SPACE_
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
Antonio Borneo [Sun, 17 Nov 2024 20:35:45 +0000 (21:35 +0100)]
configure: make more robust the check for elf 64
The check if 'elf.h' defines the type 'Elf64_Ehdr' is currently
done through 'grep' on the file. While there is no false positive,
so far, such test could incorrectly find the text inside a comment
or in a block guarded by #if/#endif.
Use the autoconf macro AC_CHECK_TYPE() to detect if the type is
properly declared.
Change-Id: Ibb74db3d90ac6d1589b9dc1e5a7ae59e47945e78 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8591 Tested-by: jenkins
Evgeniy Naydanov [Tue, 17 Dec 2024 15:13:00 +0000 (18:13 +0300)]
helper/options: handle errors in `-l`
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
```
Marek Vrbka [Mon, 13 Jan 2025 09:28:15 +0000 (10:28 +0100)]
vdebug: Fix socket comparison warning on Windows
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>
Tomas Vanek [Fri, 17 Jan 2025 17:02:50 +0000 (18:02 +0100)]
flash/nor/kinetis: fix assertion during flash write
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>
Antonio Borneo [Mon, 30 Dec 2024 11:14:24 +0000 (12:14 +0100)]
target: cortex_m: add support of ARMv8.1-M register 'vpr'
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.
Richard Pasek [Wed, 11 Dec 2024 05:43:57 +0000 (00:43 -0500)]
Add Linux SPI device SWD adapter support
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
Antonio Borneo [Tue, 31 Dec 2024 13:47:02 +0000 (14:47 +0100)]
helper: list: rename macro clashing with sys/queue.h
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>
R. Diez [Thu, 28 Nov 2024 20:47:34 +0000 (21:47 +0100)]
amend angie build definitions to fix make dist
"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>
Tomas Vanek [Tue, 10 Dec 2024 07:53:49 +0000 (08:53 +0100)]
drivers/cmsis_dap_usb_bulk: allow waiting for bulk write
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.
Tomas Vanek [Tue, 10 Dec 2024 07:26:48 +0000 (08:26 +0100)]
drivers/cmsis_dap: use blocking flag instead of wait timeout
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>
Tomas Vanek [Fri, 25 Oct 2024 15:17:22 +0000 (17:17 +0200)]
tcl/interface: Find proper alias for RP1 on Raspberry Pi 5
Previously, Linux assigned gpiochip numbers sequentially depending on
when the chip driver was probed. As RP1 is on the end of a PCIe link, it
is probed later than the on-board chips (including expanders connected
over SPI/I2C). This meant that RP1's gpiochip assignment was at an
offset that could potentially change.
A downstream kernel patch now assigns fixed offsets for RP1 and the
onboard gpiochips. Query the device tree to get proper GPIO_CHIP index.
Change-Id: I759978d4b3021c815a7d9febb41961cd1d3d185c Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8650 Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com> Tested-by: jenkins
Marc Schink [Fri, 29 Nov 2024 20:29:18 +0000 (20:29 +0000)]
tcl/target: Add support for Nordic nRF54L series
The RISC-V coprocessor is currently not supported. It is attached to the
DAP via AP#2 but the AP implementation is unknown.
The nRFL54L series uses resistive RAM (RRAM) as non-volatile memory
which can be programmed directly. Since it does not fit in the current
flash memory infrastructure of OpenOCD there is no NVM support so far.
Change-Id: I9934af4fd3bb8b7272954fc4b17638c7dabbbee0 Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8609 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Marc Schink [Sat, 30 Nov 2024 14:32:09 +0000 (15:32 +0100)]
target/xtensa: Remove 'ERROR: ' prefix in error log
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
R. Diez [Fri, 29 Nov 2024 20:09:50 +0000 (21:09 +0100)]
configure.ac: switch from $host to $host_os
Suggested during review https://review.openocd.org/c/openocd/+/8533
Only the OS part was being checked anyway.
The aim is to facilitate merging all $host_os checks in the future.
Change-Id: Idce1d5872cf19ef423429fa0c3b2ff7ee3945332 Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8607 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
R. Diez [Fri, 29 Nov 2024 20:24:23 +0000 (21:24 +0100)]
configure.ac: enable the Dummy adapter by default
The Dummy adapter is useful when developing generic JimTcl code.
Besides, the distributed BUGS file states that you should
try to reproduce any crashes with the Dummy adapter, so
it does not make sense that it is not enabled by default.
Change-Id: I145de06de4d2c0011619b1b941200b63e200db23 Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8608 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Antonio Borneo [Fri, 22 Nov 2024 17:06:40 +0000 (18:06 +0100)]
target: aarch64: fix out-of-bound access to array
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
Marc Schink [Wed, 23 Oct 2024 13:42:16 +0000 (15:42 +0200)]
doc/manual: Add section about logging
The log messages are very inconsistent across the code base. Add a
guideline for log messages to help improve consistency. The guideline is
based on the most commonly used style in the current code base.
Change-Id: I076d68abe588dd04b59580379e97b82d537def23 Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8576 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
rtt server: fix for dropped data when target has no space
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.
Pete Moore [Mon, 16 Dec 2024 13:02:14 +0000 (14:02 +0100)]
jimtcl: Fix command not found
During the ./configure build stage, error './configure.gnu: line 1: -e:
command not found' can occur.
Problem: the -e flag with echo is not portable. While some shells support
it (e.g., Bash), others (e.g., POSIX /bin/sh on some systems) do not.
Solution: replacing echo -e with printf, since printf is POSIX-compliant
and works consistently across different shells.
Change-Id: I9efbba662599a61bbe1fc56a33dc1ee7ad58826c Signed-off-by: Pete Moore <pmoore@mozilla.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8653 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Pete Moore [Mon, 16 Dec 2024 15:55:06 +0000 (16:55 +0100)]
flash/nor/sfdp: Fix broken DEBUG log line on macOS
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>