Age | Commit message (Collapse) | Author | Files | Lines |
|
Merge up to afbd01b0a46f3a81fe6076c002ad66973dcfb64c from upstream
|
|
target/riscv: improve error messaging in case `sbasize` is zero
|
|
target/riscv: fix address translation in hypervisor mode
|
|
Add the necessary get_filed and add a comment to indicate
this section is for VU/VS mode
|
|
address translation don't need to care hstatus.HU
|
|
From: Sriram Shanmuga <sriramharshalee@gmail.com>
RISC-V Debug Specification v1.0 [3.14.22. System Bus Access Control and
Status (`sbcs`, at 0x38)] states in `sbasize` field description:
> Width of system bus addresses in bits. (0 indicates there is no bus
access support.)
Before the patch, the error message did not include the information
about `sbcs.sbasize` being zero wich made it quite undescriptive:
```
[riscv.cpu] Turning off memory sampling because it failed.
```
Fixes #1270
Change-Id: I5402dd57dc9a81f65ee4c67d24e11c366006427c
Signed-off-by: Sriram Shanmuga <sriramharshalee@gmail.com>
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
|
|
target/riscv: check nextdm address in abits range
|
|
Ubuntu 20.04 is no longer available.
See https://github.com/actions/runner-images/issues/11101
Checkpatch-ignore: BAD_SIGN_OFF
Change-Id: I0ec3e3342f9212a2a79d8dca6274e7db62ecedab
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
|
|
When abits not correctly configured, we hope to detect it
as soon as possible.
|
|
Ubuntu 20.04 is no longer available.
See https://github.com/actions/runner-images/issues/11101
Checkpatch-ignore: BAD_SIGN_OFF
Change-Id: I0ec3e3342f9212a2a79d8dca6274e7db62ecedab
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
|
|
Change-Id: I719167dc34a1a29ae32f8d4f27f2d3cd7a04e47b
|
|
- update runner to ubuntu-latest
- pass GITHUB_TOKEN to delete-tag-and-release as input
Change-Id: I83d69cfd7af7c44e67b1115ac843a0b41d6f87b9
Signed-off-by: Samuel Obuch <samuel.obuch@espressif.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8756
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
|
|
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>
|
|
Use 'Tcl' because it is the official spelling.
While at it, fix some misspellings of 'Jim Tcl'.
Change-Id: I2d96f63b0dbc96ae62fe00ae41d2eb16897250fb
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8853
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
Use 'Tcl' because it is the official spelling.
While at it, fix some misspellings of 'Jim Tcl'.
Change-Id: I084541a1cc0276d15a263b843ba740da04efc30a
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8852
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
Tested with NUCLEO-U083RC development board.
Change-Id: I5e7ed1a9a19dbab70ee3155f92d67874c33b1ac2
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8649
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
Also enable this adapter by default (auto).
Change-Id: I43b9f1a1873b381d015114da57efc1d78e6e7780
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8834
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
Also enable this driver by default (auto).
Change-Id: I7f592dd697c6ee150a81e151ff2333447cd9130d
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8835
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
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.:
openocd -f interface/stlink-hla.cfg -f board/st_nucleo_f4.cfg
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
|
|
Convert every transport select command:
- hla_swd -> swd
- dapdirect_swd -> swd
- hla_jtag -> jtag
- dapdirect_jtag -> jtag
Change-Id: I81971e06f7aefd21a570a4e098cf3822a775464b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8678
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
|
|
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
|
|
While this operation has no real interest so far, it will be used
later to avoid listing twice protocols with the same name.
Change-Id: I59f3634830f94dc992d28863cf29d5d869726918
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8685
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
|
|
No behavioral change, just use the list's helpers.
Change-Id: I69712648ef77689bfe6acc4811adad7293fb9009
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8684
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
|
|
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>
|
|
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.
Change-Id: I4976583f1a38fdcc1f85045023dc7c629001f743
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8675
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
|
|
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.
Change-Id: I6bdf7264d5979c355299f63fcf80bf54dcd95cee
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8674
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
|
|
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
|
|
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
|
|
Comments and output strings still reference the term 'interface',
while 'adapter driver' should be used.
While there, drop the useless test if CMD_ARGV[0] is an empty
string, as this is not possible when CMD_ARGC > 0.
Change-Id: I7b46b5dd3cec53d8b5b7559d941ee9ae3bd1d89b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8808
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
|
|
The file stm8.h is only included by stm8.c and provides some basic
declaration that can be simply part of the C file.
Drop the file stm8.h and move its content in stm8.c
Replace the macro 'STM8_NUM_CORE_REGS' with the existing macro
'STM8_NUM_REGS'.
While there:
- drop the useless include of "hello.h".
Change-Id: Iecd1a27f0630cdbbfd51033d34aa3d468aa63464
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8856
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
|
|
and use it instead of magic value.
Change-Id: I5d006aaf990d4ef3a82e622b1e41cd2bfec359f7
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reported-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8810
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
|
|
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
|
|
Calling ROM API set_bootrom_stack() function allows ROM API functionality
after OpenOCD halt or reset halt in RISC-V bootloder (emulated ARM code)
Change-Id: I3b255738d61876e876a94207804d9cbe1a7593c2
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: Luke Wren <luke@raspberrypi.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8729
Tested-by: jenkins
|
|
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
|
|
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
|
|
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>
|
|
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>
|
|
Namely the driver name changed from rp2040_flash and added RP2350 support.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I2ec9e62786002d71f655dbe0edc9f2e9ac4141b7
Reviewed-on: https://review.openocd.org/c/openocd/+/8456
Tested-by: jenkins
|
|
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
|
|
Invalidate cache and restore flash XIP mode after erase and also
in error cleanup after write/erase.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: If7e0c2d75f50f923e6bcbf0aa7bab53fe91b6cc8
Reviewed-on: https://review.openocd.org/c/openocd/+/8454
Tested-by: jenkins
|
|
While on it:
Define the names for the fixed flash page/sector sizes and use them
instead of magic values.
Fix memory leak on error return.
Partially backported from former upstream rp2040.c
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: If51c912f4d381ee47756a70f616ecdbee1ac0da7
Reviewed-on: https://review.openocd.org/c/openocd/+/8453
Tested-by: jenkins
|
|
Flash erase and write require this guard, unfortunately it is also
partially needed in the flash probe.
Partially backported from former upstream rp2040.c
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: Ie8a240e66c3ed68e08f872cbbfdd90a6d80e1f1e
Reviewed-on: https://review.openocd.org/c/openocd/+/8452
Tested-by: jenkins
|
|
Also keep size override by FLASHSIZE Tcl variable possible.
Partially backported from former upstream rp2040.c
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I224c3644450e8b46e35714bfc5436219ffdee563
Reviewed-on: https://review.openocd.org/c/openocd/+/8451
Tested-by: jenkins
|
|
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
|
|
RP2350 has 2 slots where either Cortex-M33 or RISC-V can be selected.
Tcl variable USE_CORE selects what cores will be configured for debug.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I56fe1aa94304bdfd1ec98bba57cc3fa792a35f69
Reviewed-on: https://review.openocd.org/c/openocd/+/8449
Tested-by: jenkins
|
|
RP2350 can switch either core to Cortex-M33 or RISC-V.
The different architectures have to be supported as
distinct targets in OpenOCD.
Introduce 'rp2xxx _switch target' Tcl command to adapt flash
bank to architecture changes.
Keep the target and priv pointers intact until a flash operation
is finished to prevent sudden change in the middle of write/erase.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I764354ab469e253042128958dfe70c09d04d6411
Reviewed-on: https://review.openocd.org/c/openocd/+/8448
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
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
|
|
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>
|
|
when erase region does not start at 0
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>
|
|
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>
|