]> www.infradead.org Git - users/borneoa/openocd-next.git/log
users/borneoa/openocd-next.git
7 months agotarget/xtensa: Remove 'ERROR: ' prefix in error log
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
7 months agoconfigure.ac: switch from $host to $host_os
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
7 months agoconfigure.ac: enable the Dummy adapter by default
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>
7 months agortos: mqx: minor rework to avoid a cast
Antonio Borneo [Wed, 27 Nov 2024 08:25:01 +0000 (09:25 +0100)]
rtos: mqx: minor rework to avoid a cast

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
7 months agortos: mqx: replace malloc+strcpy with strdup
Paul Fertser [Tue, 26 Nov 2024 20:55:55 +0000 (22:55 +0200)]
rtos: mqx: replace malloc+strcpy with strdup

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
7 months agotarget: aarch64: fix out-of-bound access to array
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
7 months agodoc/manual: Add section about logging
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>
7 months agortt server: fix for dropped data when target has no space
fanoush [Mon, 2 Sep 2024 11:49:19 +0000 (13:49 +0200)]
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.

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>
7 months agojimtcl: Fix command not found
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>
7 months agoflash/nor/sfdp: Fix broken DEBUG log line on macOS
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>
8 months agotarget/xtensa: add maskisr command support for NX
Henrik Mau [Wed, 13 Nov 2024 15:43:23 +0000 (15:43 +0000)]
target/xtensa: add maskisr command support for NX

Add maskisr command support to Xtensa NX targets allowing masking
of interrupts during single stepping.

Change-Id: I3835479de8015f1a2842afd1aeab24829e385031
Signed-off-by: Henrik Mau <henrik.mau@analog.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8575
Reviewed-by: Ian Thompson <ianst@cadence.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
8 months agotarget/cortex_m: Use LOG_TARGET_xxx()
Marc Schink [Tue, 22 Oct 2024 16:22:36 +0000 (18:22 +0200)]
target/cortex_m: Use LOG_TARGET_xxx()

Use LOG_TARGET_xxx() for the remaining log messages.

Change-Id: If52e3935b57e4c39212ce6b5111ff65159de1373
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8580
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agotarget/breakpoints: Use LOG_TARGET_ERROR()
Marc Schink [Tue, 22 Oct 2024 15:31:20 +0000 (17:31 +0200)]
target/breakpoints: Use LOG_TARGET_ERROR()

Use LOG_TARGET_xxx() for the remaining log messages.

Change-Id: I4b86b206d17dead0662388e827204b40a7d29edd
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8579
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agortos: Remove 'ERROR: ' prefix in error log
Marc Schink [Wed, 23 Oct 2024 13:02:10 +0000 (15:02 +0200)]
rtos: 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: I8707342c602cea735c5a423b37ebe40a3aafb137
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8578
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agotarget/xtensa: Remove 'ERROR: ' prefix in error log
Marc Schink [Tue, 22 Oct 2024 15:32:37 +0000 (17:32 +0200)]
target/xtensa: Remove 'ERROR: ' prefix in error log

Remove the prefix since it is redundant.

Change-Id: I9c23c0479ba40be24e471309e720060cd03763ee
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8577
Tested-by: jenkins
Reviewed-by: Ian Thompson <ianst@cadence.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agoconfigure.ac: improve validation of some --enable-xxx options
R. Diez [Tue, 5 Nov 2024 13:40:50 +0000 (14:40 +0100)]
configure.ac: improve validation of some --enable-xxx options

Catch an invalid option like "--enable-buspirate=rubbish".
Also mention all valid values in the help text for those options.

Change-Id: Ib0fb8904132d07cc5cde421aa816ca6971a08769
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8540
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
8 months agoconfigure.ac: show the linuxgpiod adapter in the configuration summary
R. Diez [Sun, 3 Nov 2024 09:52:45 +0000 (10:52 +0100)]
configure.ac: show the linuxgpiod adapter in the configuration summary

List AC_ARG_ADAPTERS was missing a comma separating two of the elements.

Also verify that each adapter is set to either 'auto', 'yes' or 'no',
which should prevent such issues from going unnoticed in the future.

Change-Id: I0d407e03b1e5a3edc61d7dc93d5ffa70fe079b3c
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8534
Tested-by: jenkins
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agoenable the Bus Pirate adapter by default on most systems
R. Diez [Sat, 2 Nov 2024 22:34:23 +0000 (23:34 +0100)]
enable the Bus Pirate adapter by default on most systems

Also convert the Bus Pirate to the common PROCESS_ADAPTERS logic.

Change-Id: Ifa8ebcee380c16d7e308ba7a75dbffdb74208285
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8533
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Tested-by: jenkins
8 months agodriver: stlink: get adapter speed through adapter_get_speed_khz()
Antonio Borneo [Sun, 10 Nov 2024 13:30:25 +0000 (14:30 +0100)]
driver: stlink: get adapter speed through adapter_get_speed_khz()

The stlink driver, both in dapdirect and in HLA modes, pretends to
store locally the value of the adapter speed in order to use it
later-on during adapter initialization.
It doesn't work in dapdirect mode since the code to store locally
the value will not be executed until the adapter is already fully
initialized.

This cause an issue in dapdirect mode:
- due to the local value, still kept at -1, the adapter will be
  initialized to the lowest clock speed (5 KHz on stlink v2 in SWD
  mode);
- after the adapter initialization the framework will again set
  the speed with the value requested by the user.

Some target, like nRF51822, only accepts JTAG/SWD speed in a
defined range of frequencies. The initial speed of 5 KHz used by
dapdirect can be out of range, making the target debug port not
working.

The adapter framework already stores the value of speed and makes
it available through adapter_get_speed_khz().

Drop struct hl_interface_param::initial_interface_speed.
Let the code to use adapter_get_speed_khz().

Change-Id: Ie11bf0234574f2a9180d3d3a16efb78e08dfcd86
Reported-by: Andrzej Sierżęga <asier70@gmail.com>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8574
Reviewed-by: Andrzej Sierżęga <asier70@gmail.com>
Tested-by: jenkins
8 months agohelper/jim-nvp.h: Rework 'isconfigure' variable
Marc Schink [Mon, 21 Oct 2024 08:39:28 +0000 (10:39 +0200)]
helper/jim-nvp.h: Rework 'isconfigure' variable

Change the variable name to 'is_configure' to be compatible with the
coding style and use 'bool' as data type.

Change-Id: I8609f9807c8bd14eaf6c93acf63fd51b55c9bbbb
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8573
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agosemihosting: make local functions static
Antonio Borneo [Sat, 9 Nov 2024 18:21:30 +0000 (19:21 +0100)]
semihosting: make local functions static

The functions:
- semihosting_opcode_to_str();
- semihosting_write_fields();
- semihosting_set_field();
are not referenced outside the file.

Make them static.

Change-Id: Ia8d35554673145fdfe0e501543eb18919863039f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8551
Tested-by: jenkins
8 months agotarget: esirisc: make local functions static
Antonio Borneo [Sat, 9 Nov 2024 18:46:03 +0000 (19:46 +0100)]
target: esirisc: make local functions static

The function esirisc_jtag_get_eid() is not used outside the file.
Make it static.

The function esirisc_jtag_disable_debug() is never used.
Make it static and mark it as unused.

Change-Id: I5c99cbf77cc9c527b6e18a3f67caa24f8551d09c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8550
Tested-by: jenkins
8 months agotarget: aarch64: drop unused armv8_mmu_translate_va()
Antonio Borneo [Sat, 9 Nov 2024 18:12:46 +0000 (19:12 +0100)]
target: aarch64: drop unused armv8_mmu_translate_va()

The function is not used.
Drop it!

Change-Id: I1625e03714b5a842f668098191c39cce34f815e8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8549
Tested-by: jenkins
8 months agotarget: x86_32: make x86_32_common_read_io() static
Antonio Borneo [Sat, 9 Nov 2024 18:08:25 +0000 (19:08 +0100)]
target: x86_32: make x86_32_common_read_io() static

The function is not referenced outside the file.
Make it static.

Change-Id: Ic2552c040b6b46c0334851a4fc0fdaa400e11e4c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8548
Tested-by: jenkins
8 months agotarget: dsp563xx: make dsp563xx_once_reg_read_ex() static
Antonio Borneo [Sat, 9 Nov 2024 18:06:29 +0000 (19:06 +0100)]
target: dsp563xx: make dsp563xx_once_reg_read_ex() static

The function is not referenced outside the file.
Make it static.

Change-Id: Ifeccc5e38f3da4b4111422860bc1c1447d00f7fe
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8547
Tested-by: jenkins
8 months agopld: make get_pld_device_by_num() static
Antonio Borneo [Sat, 9 Nov 2024 17:54:14 +0000 (18:54 +0100)]
pld: make get_pld_device_by_num() static

The function is not referenced outside the file.
Make it static.

Change-Id: I5f2a2c70085b9158df8806432bb9ed09bb256ab5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8546
Tested-by: jenkins
8 months agortt: drop unused function rtt_started()
Antonio Borneo [Sat, 9 Nov 2024 17:51:52 +0000 (18:51 +0100)]
rtt: drop unused function rtt_started()

The function is not used.
Drop it!

Change-Id: I176c9d6ba077e36b762c14f9b877d5152992763c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8545
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
8 months agodriver: mpsse: make local functions static
Antonio Borneo [Sat, 9 Nov 2024 18:33:58 +0000 (19:33 +0100)]
driver: mpsse: make local functions static

The functions:
- mpsse_divide_by_5_config();
- mpsse_purge();
- mpsse_rtck_config();
- mpsse_set_divisor();
are not referenced outside the file.

Make them static.

Change-Id: Id6930183a3ce26693b2113f622046168ba289df8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8544
Tested-by: jenkins
8 months agojtag: driver: make local functions static
Antonio Borneo [Sat, 9 Nov 2024 18:39:11 +0000 (19:39 +0100)]
jtag: driver: make local functions static

The functions:
- interface_jtag_add_callback();
- interface_jtag_add_callback4();
are not referenced outside the file.

Make them static.

Change-Id: I84f738309d23c8d0b5329aa04436db750cf185e5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8543
Tested-by: jenkins
8 months agojtag: core: make local functions static
Antonio Borneo [Sat, 9 Nov 2024 18:29:43 +0000 (19:29 +0100)]
jtag: core: make local functions static

The functions:
- jtag_error_clear();
- jtag_tap_count();
are not referenced outside the file.

Make them static.

Change-Id: I00fcf06b1838b9f6c955c19772f1d41d486459e9
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8542
Tested-by: jenkins
8 months agoadapter: make adapter_config_khz() static
Antonio Borneo [Sat, 9 Nov 2024 17:49:11 +0000 (18:49 +0100)]
adapter: make adapter_config_khz() static

The function is not referenced outside the file.
Make it static.

Change-Id: I72e96624749ae4cc7f4566d737a88186e899616a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8541
Tested-by: jenkins
8 months agogitignore: drop ignoring files not generated anymore
Antonio Borneo [Fri, 11 Oct 2024 08:10:12 +0000 (10:10 +0200)]
gitignore: drop ignoring files not generated anymore

With the drop of the code for the probe zy1000 [1] and then the
drop of minidriver code [2], there are no more auto-generated
source files.

Remove them from the list of generated files to be ignored.

Change-Id: Iee65e21528674ea4cc94018e52126f882da4f07c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
[1] b0fe92dba7c0 ("zy1000: drop the code, deprecated in v0.10.0")
[2] 25218e893503 ("jtag: remove minidriver code and minidriver-dummy")
Reviewed-on: https://review.openocd.org/c/openocd/+/8522
Tested-by: jenkins
8 months agocheckpatch: exclude gerrit's Change-Id line from commit description
Antonio Borneo [Mon, 10 Apr 2023 10:02:55 +0000 (12:02 +0200)]
checkpatch: exclude gerrit's Change-Id line from commit description

Checkpatch rejects patches that have empty commit description and
logs them with:
WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one
But if the patch has a gerrit's Change-Id line placed before the
line Signed-off-by, then checkpatch considers the Change-Id line
as a valid commit description text.

Use the Change-Id tag as a marker of the end of the commit message,
thus not counting its line as part of the commit description.

This patch is not relevant for the Linux kernel development process
as gerrit is not involved and the Change-Id tag is rejected. But
other projects, like OpenOCD, base the development on gerrit and
reuse kernel's checkpatch with flag '--ignore GERRIT_CHANGE_ID'.

This patch has been refused [1] in Linux upstream because it has
not been considered relevant for that project.
Let's take it as another add-on in OpenOCD checkpatch.

Change-Id: I3b55b8fffa07ce67177c108e7c9554ca46674246
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Link: [1] https://lore.kernel.org/lkml/20230410100255.16755-1-borneo.antonio@gmail.com/
Reviewed-on: https://review.openocd.org/c/openocd/+/8539
Tested-by: jenkins
8 months agoMake bootstrap more robust
R. Diez [Fri, 1 Nov 2024 08:46:05 +0000 (09:46 +0100)]
Make bootstrap more robust

Change-Id: I67cc22752b34dd49c277e247f0b648047927a02b
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8532
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agoMakefile.am: generate ChangeLog with git log instead of git2cl
R. Diez [Fri, 1 Nov 2024 19:21:56 +0000 (20:21 +0100)]
Makefile.am: generate ChangeLog with git log instead of git2cl

git log is faster than git2cl and the result has a better format.

Change-Id: I465ca62e3e30fed230fe9661e82a987980c05459
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8531
Tested-by: jenkins
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agoautoconf: Add support for code coverage
Jan Matyas [Thu, 10 Oct 2024 18:35:19 +0000 (20:35 +0200)]
autoconf: Add support for code coverage

Add support for code coverage collection. This helps
developers to check if their test scenarios really exercised
all the OpenOCD functionality that they intended to test.

- Option --enable-gcov has been added to configure.ac
  which enables the coverage collection using Gcov. (Disabled
  by default.)

- The steps to collect and inspect the coverage have been
  described in HACKING file.

Change-Id: I259e401937a255e7ad7f155359a0b7787e4d0752
Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8521
Tested-by: jenkins
Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agotarget/breakpoints: fix types in `watchpoint_add_internal()`
Evgeniy Naydanov [Mon, 16 Sep 2024 15:01:17 +0000 (18:01 +0300)]
target/breakpoints: fix types in `watchpoint_add_internal()`

There was a conflict:
1. commit 2cd8ebf44d1a ("breakpoints: use 64-bit type for watchpoint mask
   and value")
2. commit 0bf3373e808a ("target/breakpoints: Use 'unsigned int' for
   length")

The second commit was created erlier, but merged later so the types of
`mask` and `value` became `uint32_t` in `watchpoint_add_internal()`.

This created a bug:
`WATCHPOINT_IGNORE_DATA_VALUE_MASK` is defined as `(~(uint64_t)0)`.
Truncation to uint32_t makes it so the comparisons with the constant
don't work.

Change-Id: I19c414c351f52aff72a60330d83c29db7bbca375
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8500
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Karl Palsson <karlp@tweak.au>
8 months agotcl/target/bl702: implement full software reset
Marek Kraus [Wed, 23 Oct 2024 14:27:33 +0000 (16:27 +0200)]
tcl/target/bl702: implement full software reset

In previous implementation, it was known that it does not perform
full reset, and that some peripherals, such as GLB core,
which handles among other stuff GPIOs, was not reset.

It was presumed, that full reset by software is not possible,
although, by accident, even when comment says that
CTRL_PWRON_RESET is set to 1, it is not
(value written into 0x40000018 supposed to be 0x7, not 0x6).

CTRL_PWRON_RESET indeed triggers full "power-on like" reset,
so this method is implemented in this commit.
There are some workarounds to make reset seamless, without any
error messages, which are described in comments of TCL script.

Only down-side of this reset is, that chip is halted after reset
bit later in BootROM than previous implementation,
but it's still good.

Change-Id: Ife2cdcc6a2d96a2e24039bfec149705baf046318
Signed-off-by: Marek Kraus <gamelaster@outlook.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8529
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
8 months agocontrib: convert 'unsigned' to 'unsigned int'
Mark Zhuang [Sat, 26 Oct 2024 02:30:18 +0000 (10:30 +0800)]
contrib: convert 'unsigned' to 'unsigned int'

Conversion done with
        checkpatch --fix-inplace -types UNSPECIFIED_INT

Change-Id: I0e31f87d437fcf3503736474f10a63f9c6be242b
Signed-off-by: Mark Zhuang <mark.zhuang@spacemit.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8368
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
8 months agotcl/target/renesas_rz_g2: Rename to renesas_rz and add RZ/V2L-G3S
MicBiso [Wed, 10 Apr 2024 10:38:09 +0000 (12:38 +0200)]
tcl/target/renesas_rz_g2: Rename to renesas_rz and add RZ/V2L-G3S

Rename file to get it more generic and add more targets belonging
to the same family.
Add support for two new devices: RZ/V2L and RZ/G3S

Change-Id: Idb7f4d81d2f95ad15ef686e940f43ed29f49f343
Signed-off-by: MicBiso <michele.bisogno.ct@renesas.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8211
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
8 months agoadapter/parport: Coding style changes
Marc Schink [Fri, 30 Aug 2024 09:22:17 +0000 (11:22 +0200)]
adapter/parport: Coding style changes

Apply some coding style changes according to the C style guide. The
patch is tested for regression with the 'wiggler' parallel port cable.

Change-Id: I43774f596831d8c46f90f18893418178041a930b
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8516
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
8 months agoadapter/bitbang: Use 'bool' data type for blink()
Marc Schink [Fri, 30 Aug 2024 09:06:13 +0000 (11:06 +0200)]
adapter/bitbang: Use 'bool' data type for blink()

Change-Id: I187f8944ad5fd92f28cbd32e447f9ec1a97e16d6
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8515
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
8 months agotcl/interface: Restructure parport config files
Marc Schink [Fri, 30 Aug 2024 08:47:55 +0000 (10:47 +0200)]
tcl/interface: Restructure parport config files

Provide cable specific configuration files like for the FTDI interface.
Depcrecate the old configuration files but keep them until the next
release for compatibility reasons.

Change-Id: I436bd60779a107120c9e1b1f0b8a69a39a240ad4
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8514
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
8 months agojtag: convert 'unsigned' to 'unsigned int'
Mark Zhuang [Sat, 26 Oct 2024 02:15:00 +0000 (10:15 +0800)]
jtag: convert 'unsigned' to 'unsigned int'

Conversion done with
        checkpatch --fix-inplace -types UNSPECIFIED_INT

Change-Id: I2c2d56aa98e89bcc6088a1bd51d70066d67d6dad
Signed-off-by: Mark Zhuang <mark.zhuang@spacemit.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8367
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agoflash: convert 'unsigned' to 'unsigned int'
Mark Zhuang [Sat, 26 Oct 2024 03:09:16 +0000 (11:09 +0800)]
flash: convert 'unsigned' to 'unsigned int'

Change-Id: I8e8da78385eed714524891b580e19a79cfb459d3
Signed-off-by: Mark Zhuang <mark.zhuang@spacemit.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8370
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agoserver: convert 'unsigned' to 'unsigned int'
Mark Zhuang [Sat, 26 Oct 2024 02:42:03 +0000 (10:42 +0800)]
server: convert 'unsigned' to 'unsigned int'

Conversion done with
        checkpatch --fix-inplace -types UNSPECIFIED_INT

Ignore the cast as they could be better addressed.

Change-Id: Ib0cbd9388d61659f8d47c8f57c09baa6df123487
Signed-off-by: Mark Zhuang <mark.zhuang@spacemit.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8369
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agotarget: riscv: convert 'unsigned' to 'unsigned int'
Mark Zhuang [Fri, 25 Oct 2024 14:15:29 +0000 (22:15 +0800)]
target: riscv: convert 'unsigned' to 'unsigned int'

Change-Id: I10b9abf9e42389eb91b210b8c2f01219ca9068cd
Signed-off-by: Mark Zhuang <mark.zhuang@spacemit.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8366
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 months agostlink: deprecate HLA support
Antonio Borneo [Sat, 12 Oct 2024 09:48:05 +0000 (11:48 +0200)]
stlink: deprecate HLA support

The STLink API that supports dap-direct is available from STLink
firmware v2j24, published in early 2015.
We can reasonably expect that any old STLink still in use today
has got at least one firmware update during the last 10 years.

Most of the board files in upstream OpenOCD still use the STLink
in HLA mode. This limits the test coverage of the dap-direct code,
which was introduced in OpenOCD v0.11.0.

- Rename interface/stlink.cfg as interface/stlink-hla.cfg to still
  provide support for HLA, adding a deprecated message.

- Rename interface/stlink-dap.cfg as interface/stlink.cfg to make
  dap-direct the default trasport.

- Add a redirect file interface/stlink-dap.cfg for users that have
  out-of-tree custom board files.

- Update all the board files to the new setup.

- Remove STLink HLA mentions from the documentation, while adding
  a reference to interface/stlink-hla.cfg

Checkpatch-ignore: LONG_LINE
Change-Id: I99366bb03cd3b83f8f408514e657f30e59813063
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8523
Tested-by: jenkins
Reviewed-by: Andrzej Sierżęga <asier70@gmail.com>
8 months agotarget: cortex_m: fix polling for target kept under reset
Antonio Borneo [Mon, 15 Jul 2024 09:56:36 +0000 (11:56 +0200)]
target: cortex_m: fix polling for target kept under reset

In multi-target SoC not all the targets are running simultaneously
and some target could be powered off or kept under reset.
Commit 4892e32294c6 ("target/cortex_m: allow poll quickly get out
of TARGET_RESET state") does not considers the case of a target
that is kept in reset and expects the target to change state from
TARGET_RESET immediately.
This causes OpenOCD to log continuously:
Info : [stm32mp15x.cm4] external reset detected
Info : [stm32mp15x.cm4] external reset detected
Info : [stm32mp15x.cm4] external reset detected

Read again dhcsr to detect the 'stable' reset status and quit,
waiting for next poll to re-check the target's status.

Change-Id: Ic66029b988404a1599bb99bc66d4a8845b8b02c6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 4892e32294c6 ("target/cortex_m: allow poll quickly get out of TARGET_RESET state")
Reviewed-on: https://review.openocd.org/c/openocd/+/8399
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
8 months agoconfigure: show adapter Xilinx XVC/PCIe in the configuration summary
R. Diez [Sat, 1 Jun 2024 19:20:31 +0000 (21:20 +0200)]
configure: show adapter Xilinx XVC/PCIe in the configuration summary

Adapter Xilinx XVC/PCIe was not appearing in the configuration summary
because of the wrong variable name: build_xlnx_pcie_xvc
instead of enable_xlnx_pcie_xvc.

Also build this adapter automatically on Linux.

Change-Id: I69ea92f550052b9ce55ce32597ac446a15a87388
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8312
Tested-by: jenkins
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
9 months agogdb_server: Improve const correctness
Jan Matyas [Mon, 30 Sep 2024 12:55:58 +0000 (14:55 +0200)]
gdb_server: Improve const correctness

On several packet-handling functions, add "const" to arguments
that represent read-only packet buffers.

For instance on GCC 13.2.0, this code:

const char *some_packet = "...";
gdb_put_packet(conn, some_packet, strlen(some_packet));

would prior to the fix produce warning:

passing argument 2 of ‘gdb_put_packet’ discards ‘const’
qualifier from pointer target type [-Wdiscarded-qualifiers]

Change-Id: Idb62f57d37ed323c39de38982e57afdd3882e280
Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8517
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
9 months agogitignore: Start ignoring ".vscode"
Jan Matyas [Thu, 3 Oct 2024 07:59:24 +0000 (09:59 +0200)]
gitignore: Start ignoring ".vscode"

To help the developers who use Visual Studio Code IDE,
ignore the ".vscode" folder in Git. This folder contains
local configuration of the VSCode workspace.

Change-Id: I1d54d8ce2bd0680f2fa1fb773bb33c786bdcc608
Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8518
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
9 months agoarm_adi_v5: Added Cortex-A55 debug unit identifier
Florian Fainelli [Tue, 6 Aug 2024 22:28:15 +0000 (15:28 -0700)]
arm_adi_v5: Added Cortex-A55 debug unit identifier

Add identifier of the Cortex-A55 debug unit.

Change-Id: I67336094a5153a3187cccc32c0e38d78ae4af542
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8430
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
9 months agotarget: riscv: remove non-trivial 'unsigned' cast
Antonio Borneo [Sun, 8 Sep 2024 19:47:31 +0000 (21:47 +0200)]
target: riscv: remove non-trivial 'unsigned' cast

Change the prototype of riscv_batch_get_dmi_read_op().
Now that 'target->smp' is unsigned, drop the cast.

Change-Id: I2a54268ed1e4bf0ea884b62cceb73f5c7451da78
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8484
Tested-by: jenkins
9 months agotarget: riscv: convert 'unsigned' to 'unsigned int'
Antonio Borneo [Sun, 8 Sep 2024 19:23:28 +0000 (21:23 +0200)]
target: riscv: convert 'unsigned' to 'unsigned int'

Conversion done with
checkpatch --fix-inplace -types UNSPECIFIED_INT

Ignore the cast as they could be better addressed.
Fix only minor additional checkpatch issue (spacing and line
length).

Change-Id: I11f10eddadc21e051c96eb3d4d4c0554a2cddd15
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8483
Tested-by: jenkins
9 months agocheckpatch: check SPDX in Makefile
Antonio Borneo [Mon, 7 Oct 2024 22:37:48 +0000 (00:37 +0200)]
checkpatch: check SPDX in Makefile

The firmware in contrib folder use Makefile for the build.
Force checkpatch to check these Makefile for the SPDX.

Change-Id: I815bf6df636c96a15f82c3d8a9de0c4f219303d2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8520
Tested-by: jenkins
9 months agohelper/align.h: Fix macro IS_PWR_OF_2
Jan Matyas [Fri, 27 Sep 2024 07:49:52 +0000 (09:49 +0200)]
helper/align.h: Fix macro IS_PWR_OF_2

Zero is not a power of two.

All functions that use IS_PWR_OF_2 were checked and the edge case
of IS_PWR_OF_2(0) does not occur anywhere at the moment. Therefore
the fix is safe.

Change-Id: I84d9f9c64c9a7df452ca6e99c2ee4169ccb2b0be
Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
Fixes: 9544cd653df1 ("helper: add align.h")
Reviewed-on: https://review.openocd.org/c/openocd/+/8511
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
9 months agojimtcl: update to version 0.83
Antonio Borneo [Fri, 27 Sep 2024 20:40:06 +0000 (22:40 +0200)]
jimtcl: update to version 0.83

New version tagged on 2024-08-28.

Change-Id: Id0cf82a692469ccf794c9680c5d5ac09ea26e6da
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8513
Tested-by: jenkins
9 months agoopenocd: fix build with jimtcl 0.83
Antonio Borneo [Fri, 27 Sep 2024 20:36:52 +0000 (22:36 +0200)]
openocd: fix build with jimtcl 0.83

In jimtcl 0.82, the include file jim.h included in turn stdio.h
This made redundant to include the former in openocd source files.
Since jimtcl 0.83, jim.h drops the include of stdio.h, causing
openocd build to fail.

Include stdio.h in the files that need it.

Change-Id: Ic81c9b273d7520f4d2d8c32bc3e0a6bcfffb67ed
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8512
Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li>
Tested-by: jenkins
9 months agoopenocd: build: allow more socket connections on Windows
Antonio Borneo [Sun, 22 Sep 2024 16:32:21 +0000 (18:32 +0200)]
openocd: build: allow more socket connections on Windows

Cross compiling OpenOCD for Windows forces the maximum number of
open files (including sockets) to 64. See in include file
psdk_inc/_fd_types.h:
#ifndef FD_SETSIZE
#define FD_SETSIZE 64
#endif

This limit is far lower than the default value 1024 used by Linux.

In pull request #644 [1] in risc-v fork it's reported that:
- each socket server of OpenOCD (GDB, telnet, ...) uses one FD;
- each active connection to a socket server uses another FD;
- multi-core devices with 32 or more cores, each having a GDB
  connection, already saturates the 64 available FD at the 26th
  GDB connection.

The patch [2] proposed and merged in risc-v fork adds the compile
flag
-DFD_SETSIZE=128
to all the host types. While this looks fine for Windows, it
reduces the default value for Linux and other OS.

Add the compile flag FD_SETSIZE only to cross compile for Windows.

Link: [1] https://github.com/riscv-collab/riscv-openocd/pull/644
Link: [2] https://github.com/riscv-collab/riscv-openocd/pull/644/commits/1bab4cfbc4f4
Change-Id: Ie43a792ac11a5e63e0407b68e3f270efea0c87be
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8503
Tested-by: jenkins
9 months agojtag: bcm2835gpio: fix macro definition
Antonio Borneo [Mon, 16 Sep 2024 08:58:37 +0000 (10:58 +0200)]
jtag: bcm2835gpio: fix macro definition

The macros trigger few errors with checkpatch:

ERROR:MACRO_ARG_REUSE: Macro argument reuse 'g' - possible
side-effects?

ERROR:TRAILING_STATEMENTS: trailing statements should be
on next line

ERROR:SPACING: spaces preferred around (several cases)

ERROR:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement
macros should not use a do {} while (0) loop

plus an empty line triggers

ERROR:BRACES: Blank lines aren't necessary before a close
brace '}'

Fix them!

Change-Id: I0690b68b511ed7f45a7e0909a0addd2822ba9fe8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8499
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
9 months agotarget: arm: drop casts commented-out
Antonio Borneo [Mon, 16 Sep 2024 11:49:04 +0000 (13:49 +0200)]
target: arm: drop casts commented-out

The function dpm->finish() returns a value that is almost always
ignored.
Drop the commented-out cast
/* (void) */

Change-Id: I7ff210a2693dd1877b7c7591705cdcd96a2c6125
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8498
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
9 months agoOpenOCD: drop comparison with true/false
Antonio Borneo [Mon, 16 Sep 2024 09:55:20 +0000 (11:55 +0200)]
OpenOCD: drop comparison with true/false

Fix checkpatch errors:

ERROR:BOOL_COMPARISON: Using comparison to true/false is
error prone

While there,
- drop useless parenthesis,
- drop unnecessary else after a return.

Change-Id: I1234737b3e65bd10df5e938d1c36f9abaf02d348
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8496
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
9 months agotarget: drop comparison to NULL
Antonio Borneo [Mon, 16 Sep 2024 09:37:05 +0000 (11:37 +0200)]
target: drop comparison to NULL

Fix checkpatch error:

ERROR:COMPARISON_TO_NULL: Comparison to NULL could be
written "cmd_ctx"

Change-Id: I3615fc427f8b160d44b6edbf7a066a086cab99bb
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8495
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
9 months agojtag: stlink_usb: drop comparison to NULL
Antonio Borneo [Mon, 16 Sep 2024 09:36:03 +0000 (11:36 +0200)]
jtag: stlink_usb: drop comparison to NULL

Fix checkpatch error:

ERROR:COMPARISON_TO_NULL: Comparison to NULL could be
written "handle"

Change-Id: I0ac12ccfc5fce4dd41266f83eb4b973a4e6a314d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8494
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
9 months agoOpenOCD: fix code alignment
Antonio Borneo [Mon, 16 Sep 2024 09:31:37 +0000 (11:31 +0200)]
OpenOCD: fix code alignment

Fix checkpatch errors:

ERROR:TABSTOP: Statements should start on a tabstop

Change-Id: Ia771e7b7fa2cc4ef0be7f52b670525175555c8e4
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8493
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
9 months agotarget: mem_ap: drop return from void function
Antonio Borneo [Mon, 16 Sep 2024 08:45:17 +0000 (10:45 +0200)]
target: mem_ap: drop return from void function

Checkpatch triggers the error

ERROR:RETURN_VOID: void function return statements are not
generally useful

Fix it!

Change-Id: I72d9fb8242d6a91c0aa481d5d023f0359c76a5ec
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8492
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
9 months agoflash: stm32l4x: fix open brace style
Antonio Borneo [Mon, 16 Sep 2024 08:42:47 +0000 (10:42 +0200)]
flash: stm32l4x: fix open brace style

Checkpatch triggers the error

ERROR:OPEN_BRACE: open brace '{' following function
definitions go on the next line

Fix it!

Change-Id: I0ce4585a6507eca094b82cdabdecf6fdbe7923b1
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8491
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
9 months agoopenocd: convert 'unsigned' to 'unsigned int'
Antonio Borneo [Sun, 8 Sep 2024 19:22:40 +0000 (21:22 +0200)]
openocd: convert 'unsigned' to 'unsigned int'

Conversion done with
checkpatch --fix-inplace -types UNSPECIFIED_INT

Ignore the cast as they could be better addressed.
Fix only minor additional checkpatch issue (spacing and line
length).

Change-Id: I4f936ffc4cedb153afa331cd293b08f4c913dc93
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8482
Tested-by: jenkins
9 months agojtag: convert 'unsigned' to 'unsigned int'
Antonio Borneo [Sun, 8 Sep 2024 19:21:35 +0000 (21:21 +0200)]
jtag: convert 'unsigned' to 'unsigned int'

Conversion done with
checkpatch --fix-inplace -types UNSPECIFIED_INT

Ignore the cast as they could be better addressed.
Fix only minor additional checkpatch issue (spacing and line
length).

Change-Id: I2c1ef03bbc828112cc5bea89463cff9fc0c1e94f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8481
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
9 months agotarget: convert 'unsigned' to 'unsigned int'
Antonio Borneo [Sun, 8 Sep 2024 19:20:48 +0000 (21:20 +0200)]
target: convert 'unsigned' to 'unsigned int'

Conversion done with
checkpatch --fix-inplace -types UNSPECIFIED_INT

Ignore the cast as they could be better addressed.
Fix only minor additional checkpatch issue (spacing and line
length).

Use Checkpatch-ignore below for the function pointers in the file
'armv7a_cache_l2x.h' that do not assign the identifier names to
the function arguments.
Most of these struct are unused and should be fixed or dropped.

Checkpatch-ignore: FUNCTION_ARGUMENTS

Change-Id: I8f27e68eb3502e431c1ba801b362358105f9f2dc
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8480
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
9 months agoflash: convert 'unsigned' to 'unsigned int'
Antonio Borneo [Sun, 8 Sep 2024 19:15:53 +0000 (21:15 +0200)]
flash: convert 'unsigned' to 'unsigned int'

Conversion done with
checkpatch --fix-inplace -types UNSPECIFIED_INT

Ignore the cast as they could be better addressed.
Fix only minor additional checkpatch issue (spacing and line
length).

Change-Id: Id808747855a02052f3738e2d232bff4dd99b27f1
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8479
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
9 months agotarget: use 'unsigned int' for smp group
Antonio Borneo [Sun, 8 Sep 2024 19:44:32 +0000 (21:44 +0200)]
target: use 'unsigned int' for smp group

Change the type to 'struct target::smp' and to the initialization
variable 'smp_group'.

Change-Id: I5f5a30a796aaf4e0014a38e81abdf4fb4afbdf48
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8478
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
9 months agoopenocd: fix conversion string for stdint values
Antonio Borneo [Sun, 8 Sep 2024 21:11:45 +0000 (23:11 +0200)]
openocd: fix conversion string for stdint values

Detected while converting 'unsigned' to 'unsigned int'.

Use the correct conversion string for stdint values.

Change-Id: I99f3dff4c64dfd7acf2bddb130b56e9ebe1e6c60
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8477
Tested-by: jenkins
9 months agotcl: update to new syntax of telnet command
Antonio Borneo [Sat, 21 Sep 2024 09:11:36 +0000 (11:11 +0200)]
tcl: update to new syntax of telnet command

Commit ad216136180e ("server/telnet: Restructure commands")
modifies the syntax.

sed -i 's/telnet_port/telnet port/'

Change-Id: If1ad34a1ec54824dbc124acd36a894862276a34f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8502
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
9 months agotarget/mips32: add dsp access support for gdb
Walter Ji [Thu, 22 Feb 2024 09:06:53 +0000 (17:06 +0800)]
target/mips32: add dsp access support for gdb

Change order of dsp register name array and removed hi0 and lo0
to comply with gdb definition of dsp in mips-dsp.xml, the regs
name array is now mapping corresponding dsp accumulator names
onto `mips32_regs` and `core_regs` instead of mapping to instr
arrays in dsp functions.
feature now requires a place to store cached dsp registers.
Add dsp registers to reg_list for gdb to access them.
Add dsp module enable detection to avoid DSP Disabled exception
while reading dsp accumulators.
Add dsp register reading procedure in `mips32_pracc_read_regs`
and writing procedure in `mips32_pracc_write_regs`.

Change-Id: Iacc335da030ab85989922c81aac7925b3dc17459
Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8476
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
9 months agojep106: update to revision JEP106BK Sep 2024
Antonio Borneo [Sat, 21 Sep 2024 08:07:52 +0000 (10:07 +0200)]
jep106: update to revision JEP106BK Sep 2024

Change-Id: Ica84e22b8d2da152cec39fc569c8333677c19490
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8501
Tested-by: jenkins
9 months agojtag: update constant names to follow code style guidelines
Parshintsev Anatoly [Tue, 10 Sep 2024 03:53:17 +0000 (06:53 +0300)]
jtag: update constant names to follow code style guidelines

Change-Id: Ib081433c67f3be0e5be0b39469680bcce079e0cc
Signed-off-by: Parshintsev Anatoly <anatoly.parshintsev@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8485
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
9 months agoHACKING: add info on ignoring check-patch checks
Antonio Borneo [Sun, 2 Apr 2023 18:47:41 +0000 (20:47 +0200)]
HACKING: add info on ignoring check-patch checks

Due to checkpatch internal state machine, the field 'Checkpatch-ignore:'
must be in the commit message before the 'Signed-off-by:' line.
Report it in the documentation and add that multiple 'Checkpatch-ignore:'
lines are allowed.

Change-Id: I770cdc4cb5b33bcf63c860c154ab3cbd4785ad20
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7572
Tested-by: jenkins
9 months agortos: chibios: fix version display
Antonio Borneo [Sun, 1 Sep 2024 12:45:36 +0000 (14:45 +0200)]
rtos: chibios: fix version display

The field 'struct chibios_chdebug::ch_version' is 16 bits wide, so
using le_to_h_u32() and be_to_h_u32() overflows in the following
fields of the struct.

Restrict the endianness conversion to 16 bits and use the target
endianness dependent target_buffer_get_u16().
Convert the 'struct chibios_chdebug::ch_version' to an array of
uint8_t.

Change-Id: Iaa80e9cb1a65c27512919398b8ffbf14e5c240cd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8473
Tested-by: jenkins
9 months agoflash/nor/atsame5: add PIC32CX-SG device IDs
Matt Trescott [Wed, 10 Jul 2024 18:46:28 +0000 (14:46 -0400)]
flash/nor/atsame5: add PIC32CX-SG device IDs

These devices are essentially the same as the E54 series with the
exception of immutable boot (SG41, SG61) and HSM (SG60, SG61), and some
bug fixes found only in E54 revision F. When the security features are
not enabled, they behave identically except for the different DIDs.

Signed-off-by: Matt Trescott <mtc@melexis.com>
Change-Id: Ic93313f3e20af0ed4a5768880d17b335a7b7bb04
Reviewed-on: https://review.openocd.org/c/openocd/+/8355
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
10 months agoserver/telnet: Restructure commands
Marc Schink [Mon, 24 Jun 2024 14:26:02 +0000 (16:26 +0200)]
server/telnet: Restructure commands

Use a command group 'telnet' with subcommands instead of individual
commands with 'telnet_' prefix. Even though there is only one subcommand
at the moment, make this change to ensure consistency with other commands.

The old command is still available to ensure backwards compatibility,
but are marked as deprecated.

Change-Id: I5e88632fa0d0ce5a8129e9fcf5ae743fc5b093cb
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8378
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 months agoserver/gdb_server: improve error handling for `Z/z` packet
Evgeniy Naydanov [Thu, 12 Sep 2024 12:16:45 +0000 (15:16 +0300)]
server/gdb_server: improve error handling for `Z/z` packet

* Report errors for `z` packet.
* Report not supported types as required by GDB Remote Protocol's
  documentation:
  > Implementation notes: A remote target shall return an empty string
    for an unrecognized breakpoint or watchpoint packet type.

Link: https://sourceware.org/gdb/current/onlinedocs/gdb.html/Packets.html#insert-breakpoint-or-watchpoint-packet
Change-Id: I9130400aca5dbc54fefb413ed74f27d75fe50640
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8488
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 months agobinarybuffer: Invert buf_cmp* return value and rename to buf_eq*
Jessica Clarke [Fri, 13 Sep 2024 17:10:48 +0000 (18:10 +0100)]
binarybuffer: Invert buf_cmp* return value and rename to buf_eq*

The current semantics are a bit confusing, as the return value looks
like memcmp (0/false being equal) but the bool return type means one
likely expects true to mean equal. Make this clearer by switching them
out for buf_eq* functions that do that instead.

Checkpatch-ignore: UNSPECIFIED_INT
Change-Id: Iee0c5af794316aab5327cb9c168051fabd3bc1cb
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8490
Tested-by: jenkins
Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 months agosrc/rtos/rtos_nuttx_stackings.c: Fix stack alignment for cortex-m targets
daniellizewski [Thu, 21 Mar 2024 13:58:34 +0000 (09:58 -0400)]
src/rtos/rtos_nuttx_stackings.c: Fix stack alignment for cortex-m targets

Backtraces performed by GDB on any thread other than the current
thread would fail if hardware 8 byte ISR stack alignment
was enabled on cortex_m targets. Stack reads now adjust
the stored SP to account for a potential offset introduced by hardware.
Fixed incorrect register offsets for cortex_m Nuttx frames by reading
the TCB info symbols to determine correct offsets.
Fixed offsets can no longer be used since the offsets have changed
multiple times for different Nuttx versions.
Tested on nuttx-12.1.0.
Tested using custom stm32h7 board and custom s32k148 board variants.
Built with CONFIG_ARCH_FPU enabled and disabled to
test FPU and non FPU frame logic.

Change-Id: Ifcbeefb0ddcfbcb528daa9d1d95732ca9584c9ef
Signed-off-by: daniellizewski <daniellizewski@geotab.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8180
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 months agoaarch64: Invalidate caches on reset
Peter Collingbourne [Thu, 1 Aug 2024 22:48:25 +0000 (15:48 -0700)]
aarch64: Invalidate caches on reset

When a target is reset we must invalidate register caches in order
to avoid showing stale register values or writing them back to
registers. Use EDPRSR.SR to detect a previous reset, and EDPRSR.R to
detect a current reset state.

Change-Id: Ia1e97d7154cf7789d392274eee475733086a835b
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8425
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 months agobinarybuffer: Fix inverted return value in buf_cmp
Jessica Clarke [Thu, 12 Sep 2024 19:12:05 +0000 (20:12 +0100)]
binarybuffer: Fix inverted return value in buf_cmp

This is the fast path for when there is a mismatch in the leading whole
bytes, which means we should return true to indicate not equal like all
the other cases here and in the surrounding functions. Otherwise we'll
incorrectly report _buf1 == _buf2 if and only if there are mismatches in
the leading whole bytes.

This was introduced during the refactor and optimisation referenced
below.

The only in-tree caller of this is jtag_check_value_inner, which will
just fail to catch some errors. However, downstream in riscv-openocd it
gets used in the riscv target to determine whether an IR scan is needed
to select the debug module, and with an IRLEN >= 8 this breaks resetting
if the encoding for the DMI isn't all-ones in its leading whole bytes
(to match BYPASS), since it will believe they are the same and not do an
IR scan, failing (with "At least one TAP shouldn't be in BYPASS mode")
in the subsequent DR scan due to the TAP still being recorded as having
bypass set (and really having an instruction of either BYPASS or
IDCODE).

Fixes: e4ee891759b0 ("improve buf_cmp and buf_cmp_mask helpers")
Change-Id: Ic4f7ed094429abc4c06a775eb847a8b3ddf2e2d6
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8489
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
10 months agoREADME: Use proper Markdown syntax
Marc Schink [Wed, 3 Jul 2024 13:16:27 +0000 (15:16 +0200)]
README: Use proper Markdown syntax

The README file contains a mixture of Markdown and non-Markdown syntax.
Refurbish the document and use only Markdown syntax according to the
specification in [1].

[1] https://www.markdownguide.org/

Change-Id: If58f4e2971dc798a03a78841226804ab1f2d33c8
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8387
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 months agodoc/xtensa: update supported architecture list
Ian Thompson [Tue, 3 Sep 2024 21:32:42 +0000 (14:32 -0700)]
doc/xtensa: update supported architecture list

- Xtensa LX8 is fully supported in addition to prior LX and NX cores.

Change-Id: I2f3f0a21ce1518b3ced6d241f0ab84c65af64423
Signed-off-by: Ian Thompson <ianst@cadence.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8362
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 months agotcl/target: Add SpacemiT Key Stone K1 config
liangzhen [Mon, 2 Sep 2024 12:21:48 +0000 (20:21 +0800)]
tcl/target: Add SpacemiT Key Stone K1 config

Add basic connection details with Key Stone K1

Change-Id: I3e51d4194cfd3b7fe8ae395e0aca0fa4799dfb73
Signed-off-by: liangzhen <zhen.liang@spacemit.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8361
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 months agocheckpatch: check for SPDX in linker scripts
Antonio Borneo [Mon, 2 Sep 2024 09:02:19 +0000 (11:02 +0200)]
checkpatch: check for SPDX in linker scripts

Current script does not enforces the check for the SPDX tag in the
linker scripts.
Add the extension '.ld' in the OpenOCD specific part.

Change-Id: I1cb6bc52e9dd86d99a26393085c7e2c9e8bac11f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8475
Tested-by: jenkins
10 months agotarget: add imx8mp and evk board support
Jiafei Pan [Tue, 18 Jun 2024 04:15:21 +0000 (12:15 +0800)]
target: add imx8mp and evk board support

Have verified with JLink:
openocd -f interface/jlink.cfg -f board/nxp_imx8mp-evk.cfg
-c "gdb_breakpoint_override hard"

Change-Id: I74f8766b8c5334ca5758c2672c283ff2405de4c3
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8352
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 months agoflash/nor/sfdp, stmqspi: use native type for buffer size
Tomas Vanek [Wed, 14 Aug 2024 07:17:36 +0000 (09:17 +0200)]
flash/nor/sfdp, stmqspi: use native type for buffer size

Two different sizes uint8_t and uint32_t was used for this value
without a good reason.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I4bb60cc5397ffd0d37e7034e3930e62793140c8d
Reviewed-on: https://review.openocd.org/c/openocd/+/8439
Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com>
Tested-by: jenkins
10 months agoflash/nor/sfdp: expose SFDP_MAGIC in sfdp.h
Tomas Vanek [Wed, 14 Aug 2024 07:15:46 +0000 (09:15 +0200)]
flash/nor/sfdp: expose SFDP_MAGIC in sfdp.h

Could be handy for dummy transfer size detection.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: Ibb485218f6c2ff9066910bb58be0fc614b77add3
Reviewed-on: https://review.openocd.org/c/openocd/+/8438
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com>
10 months agotarget/espressif: add profiling function for ESP32-S3
Richard Allen [Thu, 1 Aug 2024 01:53:52 +0000 (20:53 -0500)]
target/espressif: add profiling function for ESP32-S3

Use the TRAX interface DEBUGPC if available.
Otherwise use default stop-and-go profiling.

ESP32-S3, before this patch:
Internal: 8 samples/second
FT2232H: 12 samples/second

After this patch:
Internal: 18ksamples/second
FT2232H: 100ksamples/second

Change-Id: I681f0bccf4263c1e24f38be511e3b3aec8bf4d60
Signed-off-by: Richard Allen <rsaxvc@rsaxvc.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/8431
Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Ian Thompson <ianst@cadence.com>
Reviewed-by: Yurii Shutkin <yurii.shutkin@gmail.com>
10 months agortos: use target_buffer_get_u32()
Antonio Borneo [Sun, 1 Sep 2024 13:01:56 +0000 (15:01 +0200)]
rtos: use target_buffer_get_u32()

Simplify the code using the target endianness independent API.

Change-Id: I39f720d0db9cf24eb41d7f359e4321bbc2045658
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8474
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
10 months agobinarybuffer: add asserts for the number of requested bits for get/set functions
Parshintsev Anatoly [Sat, 3 Aug 2024 19:10:57 +0000 (22:10 +0300)]
binarybuffer: add asserts for the number of requested bits for get/set functions

Change-Id: Ieca5b4e690c9713ad60dc9d8c223c2d64822e2f5
Signed-off-by: Parshintsev Anatoly <anatoly.parshintsev@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8427
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 months agotcl/boards: Add support of LP-CC1352P7 board
Alexandre Bailon [Fri, 29 Mar 2024 20:14:54 +0000 (21:14 +0100)]
tcl/boards: Add support of LP-CC1352P7 board

This adds support of TI LP-CC1352P7 evaluation kit.

For further details, see https://www.ti.com/tool/LP-CC1352P7.

Change-Id: I4aba160dbf4920febb7897458d06450e7d134147
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8194
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Vaishnav M A <vaishnav@beagleboard.org>
10 months agotcl/target: Add support of CC1352P7
Alexandre Bailon [Fri, 29 Mar 2024 20:14:29 +0000 (21:14 +0100)]
tcl/target: Add support of CC1352P7

This adds support for TI CC13X2X7 / CC26X2X7 family.

For further details, see https://www.ti.com/lit/ug/swcu192/swcu192.pdf.

Change-Id: Ifd9b505716ddf0abbdd00f617e50a93a3d4fbe6a
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8193
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Vaishnav M A <vaishnav@beagleboard.org>
10 months agoflash/nor: Update cc26xx flash driver to support cc13x2x7
Alexandre Bailon [Fri, 29 Mar 2024 20:13:17 +0000 (21:13 +0100)]
flash/nor: Update cc26xx flash driver to support cc13x2x7

This updates the flash driver to support more than one bank.
This is required to support the cc1352p7 which has two banks.

This only have been tested on a cc1352p7.
The loader has been built using a gcc-arm-none-eabi-4_8-2014q3
toolchain.

Change-Id: Ia813421ececd96d6e2fd4dae910ad60fcc3d3c88
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8192
Tested-by: jenkins
Reviewed-by: Vaishnav M A <vaishnav@beagleboard.org>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>