Antonio Borneo [Tue, 3 Jun 2025 08:34:29 +0000 (10:34 +0200)]
configure: hide build issue of amt_jtagaccel driver by disabling it
With commit d8a2f6dbcf5f ("configure.ac: show the Amontec
JTAG-Accelerator driver in the config summary") the driver
amt_jtagaccel is now build by default on Linux.
This highlights the dependency of some include files, dependency
that is not properly managed and that can cause build failure.
The driver is queued to be dropped soon, so there is no real
interest to fix the dependencies.
Change the default so the driver is not built if the user does not
require it at configure time.
Change-Id: Ifb74e2c802abda290efbf59ca4ce02048c94e6f8 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8939 Reviewed-by: R. Diez <rdiez-2006@rd10.de> Tested-by: jenkins
Antonio Borneo [Wed, 28 May 2025 14:58:44 +0000 (16:58 +0200)]
configure: fix for missing include files on Linux
By merging [1] and [2], the drivers 'xlnx-pcie-xvc' and 'linuxspidev'
are now build by default on Linux.
This highlights the dependency of some include files under subfolder
'linux' that are not installed by default in all Linux boxes.
Add the check in 'configure' for the presence of the include file
and conditionally enable the build of the driver.
Change-Id: Ie88645c3455ab07622f069a0cc7bf09d1a5a2c75 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Link: [1] 7214c8be46f7 ("configure: show adapter Xilinx XVC/PCIe in the configuration summary")
Link: [2] 83e0293f7ba3 ("Add Linux SPI device SWD adapter support")
Reviewed-on: https://review.openocd.org/c/openocd/+/8935 Tested-by: jenkins
Kevin Yang [Mon, 12 Oct 2020 20:22:47 +0000 (13:22 -0700)]
target/armv8: Handle modeswitch for aarch32 secure EL3
For aarch32 secure EL3
- Change target_el to 3 for SVC/ABT/IRQ/FIQ/UND/SYS for aarch32 secure
EL3
- Do not update SPSR for SYS, behavior is UNPREDICTABLE (ARMv8-A F5.1.121)
- Do not execute DRPS for SYS, behavior is UNPREDICTABLE (ARMv8-A
F5.1.51)
Change-Id: Ic1484665cd53afcccb5c20b152993a3f0407f8a2 Signed-off-by: Kevin Yang <kangyang@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/5854 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de> Reviewed-by: Plamena Marinova <pmarinova@hilscher.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Jonathan Bell [Wed, 21 May 2025 14:37:25 +0000 (15:37 +0100)]
tcl: fix broken Raspberry Pi website links
raspberrypi.com is the home for technical information, raspberrypi.org
is the Foundation's site (though there are intelligent redirects).
Several pages have moved around, fix these.
Also tweak a few comments for style and correctness.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
Change-Id: I7f52bcc362fb213b50987e3a42866fe4a6fec883
Reviewed-on: https://review.openocd.org/c/openocd/+/8885 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Jonathan Bell [Wed, 21 May 2025 14:26:20 +0000 (15:26 +0100)]
doc: bcm2835gpio: remove broken link and clarify usage
The peripheral address details have been removed from the documentation
part of the website (instead presented in the SoC datasheets).
Pi 5 GPIOs are provided by the RP1 southbridge, which requires the use
of libgpiod. The associated Linux driver for the GPIO interface must be
used when bitbashing on Pi 5, as the timing of pin state changes is not
guaranteed across the PCIe link without special treatment.
Using libgpiod, the typical maximum swclk speed is 1MHz.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
Change-Id: I8b2c44ec5edd71abaa0a763ba4d4f4603a211348
Reviewed-on: https://review.openocd.org/c/openocd/+/8884 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Jacek Wuwer [Wed, 24 Apr 2024 08:15:38 +0000 (10:15 +0200)]
jtag/vdebug: implement a polling mechanism
This change adds a polling mechanism to the driver. When not busy
the driver issues a wait, allowing the target to advance time.
The wait period gets adjusted to match the polling setting.
Change-Id: I67f481d05d7c5ce5352b5cb97de78dbaa97d82ae Signed-off-by: Jacek Wuwer <jacekmw8@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8221 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Marc Schink [Mon, 12 May 2025 04:47:22 +0000 (06:47 +0200)]
tcl/target: Move nordic configuration files
Move target configuration files into a dedicated vendor directory as
required by the new guideline for configuration files.
Note that the moved files are still accessible via the old path to ensure
backwards compatibility. This works because of the extended file search in
vendor folders.
Change-Id: If3935985769dc543e8c7d72cda590c9d79303abb Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8905 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Antonio Borneo [Wed, 21 May 2025 13:19:28 +0000 (15:19 +0200)]
startup.tcl: extend the file search in vendor folders
The TCL configuration files are going to be dispatched in vendor
specific folders.
Old user configuration files will fail to find the new files to
include, so a set of fallback files reporting the deprecation
should replace the renamed files.
To prevent such enormous proliferation of fallback files, extend
the search of files in the vendor folders too.
For non-trivial renames, a dedicated table is added in the file
tcl/file_renaming.cfg to track old --> new file names.
The deprecated message is then part of the extended search.
and
- path/to/a/certain/config_file
trigger search of:
- path/to/a/certain/${vendor}/config_file
among a possible vendors list.
This is a temporarily feature that should be removed as soon as
possible to prevent clashing on files with the same name.
The names in tcl/file_renaming.cfg are for demonstration purpose
only and should be dropped when the first real entries are added.
Change-Id: If4793fef27dc570d5df4ff4d77a5e36004f394f6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8929 Tested-by: jenkins
Lucien Dufour [Thu, 15 May 2025 12:31:25 +0000 (14:31 +0200)]
cortex_a: Use endianness for soft breakpoints
Fix endianness for cortex_r4 and cortex_r5 when inserting software
breakpoints. Because the cortex_a target is used by the cortex_r
architecture and some chips start in BE by default (e.g. TMS570)
Tim Newsome [Thu, 27 Oct 2022 21:42:23 +0000 (14:42 -0700)]
gdb_server: Operate on available targets.
When SMP is enabled, gdb will always use the first target in the SMP
group. That doesn't work when that first target is unavailable, but
others in the SMP group are still available.
For cases where gdb expects an operation to affect the entire group (run
control, memory access), find the first available target in an SMP group
and use that.
Imported from
https://github.com/riscv-collab/riscv-openocd/pull/767
Change-Id: I4bed600da3ac0fdfe4287d8fdd090a58452db501 Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8912 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tim Newsome [Thu, 27 Oct 2022 22:21:31 +0000 (15:21 -0700)]
target: Add TARGET_UNAVAILABLE state
This is added for future RISC-V changes. The RISC-V debug interface can
explicitly tell a debugger when a hart is unavailable. This is used for
instance when that hart is powered down (or yet to be powered up out of
reset).
Imported from
https://github.com/riscv-collab/riscv-openocd/pull/752
Change-Id: I8a062d59eea1e5b3c788281a75159592db024683 Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8911 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Bernhard Rosenkränzer <bero@baylibre.com>
Tomas Vanek [Sun, 18 May 2025 19:25:35 +0000 (21:25 +0200)]
server/gdb_server: do not discard Ctrl-C if _DEBUG_GDB_IO_
GDB server debug logging eat Ctrl-C when gdb user issues interrupt
in time of communication between OpenOCD and gdb.
E.g. Ctrl-C after `next` gdb command taking many
gdb remote protocol $vCont;s (steps)
Change-Id: I4a65446a9bb25a28e50566607b3dec116fa7d2cd Suggested-by: Tim Newsome <tim@sifive.com> Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8920 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 16 Dec 2023 16:39:12 +0000 (17:39 +0100)]
command: drop Jim Command handler, at last
With all OpenOCD commands converted to COMMAND_HANDLER, we can
drop the management of jim_handler commands.
Drop also from documentation the subsection on Jim Command
Registration.
Change-Id: I4d13abc7e384e64ecb155cb40bbbd52bb79ec672 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8901 Tested-by: jenkins
Antonio Borneo [Fri, 2 May 2025 14:10:39 +0000 (16:10 +0200)]
cortex-a: fix single-step on infinite loop
On ARMv7a/r the single-step is implemented through a HW breakpoint
that hits instructions at any address except the address of the
current instruction.
The method above fails in case of an infinite loop coded by a
single instruction that jumps on itself; in such case, the same
instruction (at the same address) is executed over and over and
the breakpoint never hits. In current code this case is wrongly
considered as an error.
Reduce the timeout while waiting for the HW breakpoint being hit,
then halt.
The jump on itself would be executed several times before the
timeout and the halt, but this is not an issue. There are few
"pathological" instructions in ARMv7a/r that jumps on itself and
that can have side effects if executed more than once. They are
listed in the code. We do not consider these as real use cases
generated by a compiler.
Document the method in the code.
Report that the single-step function is not properly managing the
HW breakpoints if it exits on error. To be fixed in the future.
Change-Id: I9641a4a3e2f68b83897ccf3a12d3c34e98a7805c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8871 Tested-by: jenkins
Walter Ji [Mon, 4 Mar 2024 09:29:15 +0000 (17:29 +0800)]
helper: add bitfield helper macros
This patch ports FIELD_{GET,PREP,FIT} macros and related macro
from FreeBSD, referenced file:
- `src/tree/sys/compat/linuxkpi/common/include/linux/bitfield.h`
Checkpatch-ignore: MACRO_ARG_REUSE
Change-Id: I6fdf4514d3f95d62fadf7654409a4878d470a600 Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8171 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
target: improve error messaging in `target create`
There are a couple of issues with the usage string for `target create`,
namely:
* `-chain-position` is allowed to be not the first option.
* `-chain-position` should be ommited alltogether on ARM targets when
DAP is specified.
Before the patch:
```
> openocd -c 'target create name testee'
...
target create name type '-chain-position' name [options ...]
```
After the patch:
```
> openocd -c 'target create name testee'
...
-chain-position ?name? required when creating target
> openocd -c 'target create'
...
target create name type [options ...]
```
Change-Id: Ia21a99ce6a4086e2e0676f5ef4685da3514a4f69 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8860 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
Daniel Goehring [Thu, 1 May 2025 02:38:15 +0000 (22:38 -0400)]
target: cget command fix for result output
Function target_configure() when processing a "cget" command needs
to print the result to the console. Currently the result is only printed
when an error occurs. To fix this, move the command print statement from
the error handling section to the common code section.
The code was tested by executing a "$target_name cget -dap" command
and reviewing the result.
Change-Id: Iff1999de8c8e9a837055ba95714137aa03e68d4b Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com> Fixes: 61890e3dc320 ("target: rewrite function target_configure() as COMMAND_HELPER")
Reviewed-on: https://review.openocd.org/c/openocd/+/8870 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Thu, 1 May 2025 17:38:42 +0000 (19:38 +0200)]
transport: fix incorrect statement
Commit 236208a5ff2d ("transport: use a bitmask for the transport")
has an incorrect C statement in place of a return.
The code is working thanks to the previous condition never true.
The issue has been detected by clang scan-build in OpenOCD ACI
since the missing return can make the following statement
dereferencing a NULL pointer.
Fix it!
Change-Id: I3bbe04d99ad9b1288f55ba3c45e2e487aef9ae40 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: 236208a5ff2d ("transport: use a bitmask for the transport")
Reviewed-on: https://review.openocd.org/c/openocd/+/8868 Tested-by: jenkins
Antonio Borneo [Sat, 19 Apr 2025 14:28:50 +0000 (16:28 +0200)]
target: armv7a: drop command 'cache_config l2x'
The command was already tagged as deprecated in 2015 with commit 0df557728216 ("armv7a: remove l1 flush all data handler") but has
never been removed.
An equivalent command 'cache l2x conf' was introduced at the same
time in commit cd440bd32a12 ("add armv7a_cache handlers").
Drop it and deprecate it.
Replace the old command in the Tcl script.
Change-Id: Ie24eccc99a78786903704d10ee1d9f6c924529b5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8857 Tested-by: jenkins
Chien Wong [Tue, 8 Apr 2025 12:33:56 +0000 (20:33 +0800)]
rtos/FreeRTOS: fix next pointer member offset in FreeRTOS lists
Currently, we are using offset of xListEnd.pxPrevious in List_t for
list_next_offset and offset of pxPrevious in ListItem_t for
list_elem_next_offset. This is confusing. Fix this.
As the related lists are doubly linked lists, only iteration order is
changed without breaking functionality.
Also document those offsets.
Change-Id: I8beacc235ee781ab4e3b415fccad7b72ec55b098 Signed-off-by: Chien Wong <m@xv97.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8833 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Marc Schink [Sat, 17 Aug 2024 10:35:30 +0000 (12:35 +0200)]
doc/manual: Add guideline for configuration files
The goal of this guideline is to have consistent and well-structured
configurations files. The focus of this patch is on filenames and
directory structure. A guideline for the content of the files should be
included in a subsequent patch.
This patch addresses a long outstanding task listed in 'Pending and Open
Tasks'.
Change-Id: Ib32dd8b9ed15c3f647cd8d74cfc79edf0e79a3df Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8854 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Mon, 23 Dec 2024 19:20:08 +0000 (20:20 +0100)]
stlink: simplify the use of deprecated HLA transport
Commit 34ec5536c0ba ("stlink: deprecate HLA support") makes hard
to use the still functional HLA transport with the stlink listed
in board config files.
Now that the prefixes 'hla_' and 'dapdirect_' has been dropped
from the transport name, allow overriding the transport by using
the 'stlink-hla' script in front of the board file, e.g.:
Revert the documentation changes of the change above.
Improve the documentation to explain how to use the compatibility
HLA mode.
Improve the error message in stlink driver to guide the user to
update the stlink firmware and to use the compatibility HLA mode.
Change-Id: I5d0bc7954511692cebe024bda2aaa72767b97681 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8679 Tested-by: jenkins
Antonio Borneo [Wed, 12 Feb 2025 15:30:46 +0000 (16:30 +0100)]
transport: allow transport name jtag/swd for hla and dapdirect
The transport used on adapter's wires is either 'jtag' or 'swd'
but, depending on the adapter, in the command 'transport select'
we have to use either 'jtag' or 'swd' or the similar 'hla_jtag',
'hla_swd', 'dapdirect_jtag' or 'dapdirect_swd'.
This becomes cumbersome when we just want to change adapter and we
get forced to modify the 'transport select' command too.
There is no reason for an adapter driver to support two of the
similar transports. In fact 'dapdirect' one is a superset of the
'hla', and the native 'jtag' or 'swd' is a superset of the
'dapdirect' one.
While the adapter could support more than one similar transports,
its adapter driver should only support the most complete of these
similar transports.
Modify the 'transport select' code to accept 'jtag' or 'swd' for
the 'dapdirect' and the 'hla' adapters too.
Issue a deprecated message for the old 'dapdirect' and 'hla'
transport names.
In command 'transport list', print only the transport names that
can be selected through 'transport select' skipping information
about 'dapdirect' and 'hla' versions and avoid duplicated entries.
This improvement was listed in the TODO file. Update it!
Change-Id: I626b50e7a94c141c042eab388cd1ffe77eb864c2 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8677 Tested-by: jenkins
Antonio Borneo [Sun, 22 Dec 2024 22:59:19 +0000 (23:59 +0100)]
transport: validate the transport id's from the driver
Verify that it contains only valid transports.
While JTAG and SWD are the more permissive transports, the
respective 'dapdirect' versions are slightly limited, and the
respective 'hla' versions are even more limited.
A driver should not provide two version of the same transport.
Verify that only one JTAG and only one SWD transport is present.
Verify that the preferred transport is valid too.
Change-Id: Iace2f881dd65fc763e81b33e6a7113961a7008af Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8676 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de> Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Antonio Borneo [Wed, 12 Feb 2025 15:39:18 +0000 (16:39 +0100)]
adapter: use bitmask for driver's transports
In every driver, replace the array of strings with a bitmask that
lists the supported transports.
Add an extra field to carry the former first listed transport as a
"preferred" transport. It would be used as default when no command
'transport select' is used. This keeps backward compatibility with
scripts that do not define the transport, relying on such default.
Antonio Borneo [Sun, 22 Dec 2024 16:06:12 +0000 (17:06 +0100)]
transport: use a bitmask for the transport
Move the transport's names in a local array in the transport
framework.
Replace the string struct transport::name, that identifies the
transport, with a bitmask where each bit corresponds to one of the
available transports.
Antonio Borneo [Sat, 4 Jan 2025 15:54:14 +0000 (16:54 +0100)]
transport: deprecate auto-selection of transport
Historically, if the user does not specify a transport, OpenOCD
select automatically the first transport listed in the adapter
driver.
This auto-selection can behave differently by changing adapter,
so the transport should be enforced in the configuration file.
Deprecate the auto-selection and print a warning message when a
transport gets auto-selected.
There are two cases:
- adapter offers one transport only. The code early auto-selects
the transport but does not print anything. If later the user
selects the transport then no deprecation will be printed during
'transport init';
- user runs 'transport select', e.g. in 'swj-dp' script, and this
triggers the auto-selection and the deprecated message.
Change-Id: I2e55b9dcc6da77ca937978fbfb36bc365b803f0d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8692 Reviewed-by: Jan Matyas <jan.matyas@codasip.com> Reviewed-by: zapb <dev@zapb.de> Tested-by: jenkins
Antonio Borneo [Sat, 4 Jan 2025 17:41:41 +0000 (18:41 +0100)]
adapter: list supported transports beside adapter name
Modify the command 'adapter list' to output the list of transports
supported by each adapter driver.
Drop the line number, as there is no real interest on it.
Format the output as a TCL dictionary indexed by the adapter name
and containing the transports in a TCL list. E.g:
dummy { jtag }
ftdi { jtag swd }
This format is easily handled by TCL scripts, e.g.:
dict get [adapter list] ftdi
Document the command output.
Change-Id: I69f73b71da2f1756866a63bc2c0ba33459a29063 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8691 Tested-by: jenkins
Tomas Vanek [Fri, 21 Mar 2025 20:30:13 +0000 (21:30 +0100)]
flash/nor/rp2xxx: fix LOG_xxx messages
Use proper format specifiers for uint16_t and uint32_t arguments.
Use LOG_TARGET_DEBUG instead of target->cmd_name as a parameter.
Use command_print() in command handler.
Drop dots and new lines at end of messages.
Change-Id: I37c7d3680a352210b1d7e69f2c9b4ba0efe6ec15 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reported-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8809 Tested-by: jenkins
Tomas Vanek [Sat, 17 Aug 2024 14:21:06 +0000 (16:21 +0200)]
tcl/target/rp2040: add flash size override and reset init event
Allow flash size override and suppress flash size detection
by setting FLASHSIZE Tcl variable.
reset-init event calls 'connect XIP' ROM API function to make
flash content accessible at the XIP mapping memory area.
Ported from rp2350.cfg
Change-Id: I9b352b1ef6d4c6d4b78a6b61e900ce01355c8eff Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8461 Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com> Tested-by: jenkins
Tomas Vanek [Fri, 16 Aug 2024 21:35:06 +0000 (23:35 +0200)]
flash/nor/rp2xxx: fix endianness error
struct rp2xxx_rom_call_batch_record consists of uint32_t in the host
endianness. Therefore it should be converted to the target endianness
not just simply copied by target_write_buffer().
Concatenate algo code, converted batch records and terminator
to the host resident buffer and copy it at once to the target and
save some adapter turnaround times.
While on it remove typedef rp2xxx_rom_call_batch_record_t
Change-Id: I0e698396003869bee5dde4141d48ddd7d62b3cbc Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8460 Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com> Tested-by: jenkins
Tomas Vanek [Fri, 16 Aug 2024 20:53:36 +0000 (22:53 +0200)]
flash/nor/rp2xxx: drop couple of Java-like const
The compiler knows what variable remains constant during its lifetime
and there is no need to emphasise constantness.
Change-Id: Ib515f96a3c77afea87274f33b8ccac7a71bfb932 Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8459 Tested-by: jenkins Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Tomas Vanek [Wed, 14 Aug 2024 15:43:13 +0000 (17:43 +0200)]
flash/nor/rp2xxx: minor code improvements
Add error messages and proper error propagation.
Type cleaning.
Use saved chip id.
Cosmetics: separating lines added.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I151e684e1fbfc9476ec429036caf85f4c9329547
Reviewed-on: https://review.openocd.org/c/openocd/+/8457 Tested-by: jenkins Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Tomas Vanek [Wed, 14 Aug 2024 09:29:21 +0000 (11:29 +0200)]
flash/nor/rp2040: refactoring: change rp2040 to rp2xxx
While on it use calloc() instead of malloc()/memset()
Drop useless implementation of rp2040_flash_free_driver_priv()
- exactly same as default_flash_free_driver_priv()
Code style fixes forced by checkpatch
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I5c56c4a7d586c0dcab164a45e8f6200ea9a3bd1d
Reviewed-on: https://review.openocd.org/c/openocd/+/8455 Tested-by: jenkins
Tomas Vanek [Tue, 13 Aug 2024 14:23:20 +0000 (16:23 +0200)]
tcl/target/rp2350: workarounds for ROM API issues
A0 chip: remove pad isolation
A2 chip: instead of reset init fixes we will fix the flash driver
with the following patch by Luke Wren:
8729: flash/nor/rp2xxx: fix flash operation after halt in RISC-V bootsel
https://review.openocd.org/c/openocd/+/8729
I don't have A1 version to test.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I9e9fab04ead929fe6e0a17c6c2f32a6f02e9beb9
Reviewed-on: https://review.openocd.org/c/openocd/+/8450 Tested-by: jenkins
Tomas Vanek [Wed, 17 Jul 2024 09:49:55 +0000 (11:49 +0200)]
flash/nor/rp2040: allow arbitrary ROM API call from Tcl
The new flash command could be handy for a reboot to BOOTSEL mode
and for making (Q)SPI flash content visible at 0x10xxxxxx
address mapping area after a rescue reset.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I1b532afcc41a4051298313e685658e86c02c53f9
Reviewed-on: https://review.openocd.org/c/openocd/+/8447 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Tomas Vanek [Tue, 6 Aug 2024 15:39:44 +0000 (17:39 +0200)]
flash/nor/rp2040: allow flash size override from cfg
Do not enforce hard-wired size 32 MiB
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I54608f75cc13996fda38ebd5d330e3b1893c2fd9
Reviewed-on: https://review.openocd.org/c/openocd/+/8446 Tested-by: jenkins Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Signed-off-by: Luke Wren <luke@raspberrypi.com>
Change-Id: I2b9db61e8ac837b6c6431aacf3b73ed3a1772fbc
Reviewed-on: https://review.openocd.org/c/openocd/+/8445 Tested-by: jenkins Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Luke Wren [Thu, 25 Jul 2024 09:55:41 +0000 (10:55 +0100)]
flash/nor/rp2040: Avoid ROM call timeout on long erases by splitting into chunks
Also add keep_alive() to erase/program to avoid nasty GDB message.
TV: Fixed style problems.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Signed-off-by: Luke Wren <luke@raspberrypi.com>
Change-Id: Ibb18775aeed192361ae1585bfdaad03760583cf3
Reviewed-on: https://review.openocd.org/c/openocd/+/8444 Tested-by: jenkins Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Luke Wren [Fri, 28 Jun 2024 15:41:48 +0000 (16:41 +0100)]
flash/nor/rp2040: Fix up ROM table lookup for RP2350 A2
which has 16-bit well-known pointers.
Change-Id: Ia0838a0b062f73a9c5751abb48f1b4d55100bd1d Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Signed-off-by: Luke Wren <luke@raspberrypi.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8443 Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com> Tested-by: jenkins
Antonio Borneo [Sun, 6 Apr 2025 12:59:50 +0000 (14:59 +0200)]
flash: stellaris: fix deprecated command
The driver directly runs a TCL command that has been renamed with
commit 4d99e77419e3 ("jtag/hla: Restructure commands"), while the
original name has been deprecated.
Junhui Liu [Wed, 26 Mar 2025 15:05:39 +0000 (23:05 +0800)]
tcl/target: Add RCPU support for Spacemit K1
Add support for the Real-Time CPU (RCPU) of K1, which is a 32-bit RISC-V
N308 High-Efficiency Processor Core designed by Nuclei System Technology
Co. Ltd.
The JTAG interface can be configured to connect to either X60s or RCPU
processors. To enable JTAG for RCPU, set TARGET to "rcpu".