You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(75) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(70) |
Feb
(20) |
Mar
(52) |
Apr
(149) |
May
(387) |
Jun
(466) |
Jul
(133) |
Aug
(87) |
Sep
(122) |
Oct
(140) |
Nov
(185) |
Dec
(105) |
| 2010 |
Jan
(85) |
Feb
(45) |
Mar
(75) |
Apr
(17) |
May
(41) |
Jun
(52) |
Jul
(33) |
Aug
(29) |
Sep
(36) |
Oct
(15) |
Nov
(26) |
Dec
(34) |
| 2011 |
Jan
(26) |
Feb
(25) |
Mar
(26) |
Apr
(29) |
May
(20) |
Jun
(27) |
Jul
(15) |
Aug
(32) |
Sep
(13) |
Oct
(64) |
Nov
(60) |
Dec
(10) |
| 2012 |
Jan
(64) |
Feb
(63) |
Mar
(39) |
Apr
(43) |
May
(54) |
Jun
(11) |
Jul
(30) |
Aug
(45) |
Sep
(11) |
Oct
(70) |
Nov
(24) |
Dec
(23) |
| 2013 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(40) |
May
(20) |
Jun
(24) |
Jul
(36) |
Aug
(25) |
Sep
(42) |
Oct
(40) |
Nov
(9) |
Dec
(21) |
| 2014 |
Jan
(29) |
Feb
(24) |
Mar
(60) |
Apr
(22) |
May
(22) |
Jun
(46) |
Jul
(11) |
Aug
(23) |
Sep
(26) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
| 2015 |
Jan
(28) |
Feb
(47) |
Mar
(33) |
Apr
(58) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(8) |
Sep
(12) |
Oct
(25) |
Nov
(58) |
Dec
(21) |
| 2016 |
Jan
(12) |
Feb
(40) |
Mar
(2) |
Apr
(1) |
May
(67) |
Jun
(2) |
Jul
(5) |
Aug
(36) |
Sep
|
Oct
(24) |
Nov
(17) |
Dec
(50) |
| 2017 |
Jan
(14) |
Feb
(16) |
Mar
(2) |
Apr
(35) |
May
(14) |
Jun
(16) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
(19) |
Nov
|
Dec
(16) |
| 2018 |
Jan
(55) |
Feb
(11) |
Mar
(34) |
Apr
(14) |
May
(4) |
Jun
(20) |
Jul
(39) |
Aug
(16) |
Sep
(17) |
Oct
(16) |
Nov
(20) |
Dec
(30) |
| 2019 |
Jan
(29) |
Feb
(24) |
Mar
(37) |
Apr
(26) |
May
(19) |
Jun
(21) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
| 2020 |
Jan
(47) |
Feb
(36) |
Mar
(54) |
Apr
(44) |
May
(37) |
Jun
(19) |
Jul
(32) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(32) |
Dec
(11) |
| 2021 |
Jan
(14) |
Feb
(5) |
Mar
(40) |
Apr
(32) |
May
(42) |
Jun
(31) |
Jul
(29) |
Aug
(47) |
Sep
(38) |
Oct
(17) |
Nov
(74) |
Dec
(33) |
| 2022 |
Jan
(11) |
Feb
(15) |
Mar
(40) |
Apr
(21) |
May
(39) |
Jun
(44) |
Jul
(19) |
Aug
(46) |
Sep
(79) |
Oct
(35) |
Nov
(21) |
Dec
(15) |
| 2023 |
Jan
(56) |
Feb
(13) |
Mar
(43) |
Apr
(28) |
May
(60) |
Jun
(15) |
Jul
(29) |
Aug
(28) |
Sep
(32) |
Oct
(21) |
Nov
(42) |
Dec
(39) |
| 2024 |
Jan
(35) |
Feb
(17) |
Mar
(28) |
Apr
(7) |
May
(14) |
Jun
(35) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(28) |
Nov
(38) |
Dec
(18) |
| 2025 |
Jan
(21) |
Feb
(28) |
Mar
(36) |
Apr
(35) |
May
(34) |
Jun
(58) |
Jul
(9) |
Aug
(54) |
Sep
(47) |
Oct
(15) |
Nov
(47) |
Dec
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-16 14:19:29
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via d4a64e3f38a9ad7a27554547c2720f17ed3580a3 (commit)
from fd62626dff25cf503a25040d3040b0a2bb9b2a76 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d4a64e3f38a9ad7a27554547c2720f17ed3580a3
Author: Jan Matyas <jan...@co...>
Date: Thu Oct 10 20:35:19 2024 +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...@co...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8521
Tested-by: jenkins
Reviewed-by: Evgeniy Naydanov <evg...@sy...>
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/.gitignore b/.gitignore
index 5de33077e..1b4e08ba3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,10 @@
src/jtag/minidriver_imp.h
src/jtag/jtag_minidriver.h
+# coverage files (gcov)
+*.gcda
+*.gcno
+
# OpenULINK driver files generated by SDCC
src/jtag/drivers/OpenULINK/*.rel
src/jtag/drivers/OpenULINK/*.asm
diff --git a/HACKING b/HACKING
index 9e8cd357f..8988b1617 100644
--- a/HACKING
+++ b/HACKING
@@ -92,6 +92,22 @@ patch:
make
@endcode
+- Code coverage analysis
+
+ By inspecting the code coverage, you can identify potential gaps in your testing
+ and use that information to improve your test scenarios.
+
+ Example usage:
+ @code
+ mkdir build-gcov; cd build-gcov
+ ../configure --enable-gcov [...]
+ make
+ # ... Now execute your test scenarios to collect OpenOCD code coverage ...
+ lcov --capture --directory ./src --output-file openocd-coverage.info
+ genhtml openocd-coverage.info --output-directory coverage_report
+ # ... Open coverage_report/index.html in a web browser ...
+ @endcode
+
Please consider performing these additional checks where appropriate
(especially Clang Static Analyzer for big portions of new code) and
mention the results (e.g. "Valgrind-clean, no new Clang analyzer
diff --git a/Makefile.am b/Makefile.am
index 2230e628f..ab0a2373d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,6 +38,7 @@ endif
# common flags used in openocd build
AM_CFLAGS = $(GCC_WARNINGS)
+AM_LDFLAGS =
AM_CPPFLAGS = $(HOST_CPPFLAGS)\
-I$(top_srcdir)/src \
@@ -51,6 +52,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/jimtcl \
else
AM_CPPFLAGS += $(JIMTCL_CFLAGS)
endif
+
+if USE_GCOV
+AM_CFLAGS += --coverage
+AM_LDFLAGS += --coverage
+endif
+
EXTRA_DIST += \
BUGS \
HACKING \
diff --git a/configure.ac b/configure.ac
index 9355ffb93..291e854a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,6 +171,9 @@ m4_define([DUMMY_ADAPTER],
m4_define([OPTIONAL_LIBRARIES],
[[[capstone], [Use Capstone disassembly framework], []]])
+m4_define([COVERAGE],
+ [[[gcov], [Collect coverage using gcov], []]])
+
AC_ARG_ENABLE([doxygen-html],
AS_HELP_STRING([--disable-doxygen-html],
[Disable building Doxygen manual as HTML.]),
@@ -199,6 +202,19 @@ AC_ARG_ENABLE([werror],
AS_HELP_STRING([--disable-werror], [Do not treat warnings as errors]),
[gcc_werror=$enableval], [gcc_werror=$gcc_warnings])
+AC_ARG_ENABLE([gcov],
+ AS_HELP_STRING([--enable-gcov], [Enable runtime coverage collection via gcov]),
+ [enable_gcov=$enableval], [enable_gcov=no])
+
+AS_IF([test "x$enable_gcov" = "xyes"], [
+ AC_DEFINE([USE_GCOV], [1], [1 to enable coverage collection using gcov.])
+ dnl When collecting coverage, disable optimizations.
+ dnl This overrides the "-O2" that autoconf uses by default:
+ CFLAGS+=" -O0"
+], [
+ AC_DEFINE([USE_GCOV], [0], [0 to leave coverage collection disabled.])
+])
+
# set default verbose options, overridden by following options
debug_usb_io=no
debug_usb_comms=no
@@ -787,6 +803,8 @@ AM_CONDITIONAL([INTERNAL_JIMTCL], [test "x$use_internal_jimtcl" = "xyes"])
AM_CONDITIONAL([HAVE_JIMTCL_PKG_CONFIG], [test "x$have_jimtcl_pkg_config" = "xyes"])
AM_CONDITIONAL([INTERNAL_LIBJAYLINK], [test "x$use_internal_libjaylink" = "xyes"])
+AM_CONDITIONAL([USE_GCOV], [test "x$enable_gcov" = "xyes"])
+
# Look for environ alternatives. Possibility #1: is environ in unistd.h or stdlib.h?
AC_MSG_CHECKING([for environ in unistd.h and stdlib.h])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -862,7 +880,8 @@ m4_foreach([adapter], [USB1_ADAPTERS,
LIBGPIOD_ADAPTERS,
LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS, SERIAL_PORT_ADAPTERS,
DUMMY_ADAPTER,
- OPTIONAL_LIBRARIES],
+ OPTIONAL_LIBRARIES,
+ COVERAGE],
[s=m4_format(["%-40s"], ADAPTER_DESC([adapter]))
AS_CASE([$ADAPTER_VAR([adapter])],
[auto], [
diff --git a/src/openocd.c b/src/openocd.c
index 7a5147050..9fd709e32 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -375,6 +375,13 @@ int openocd_main(int argc, char *argv[])
log_exit();
+#if USE_GCOV
+ /* Always explicitly dump coverage data before terminating.
+ * Otherwise coverage would not be dumped when exit_on_signal occurs. */
+ void __gcov_dump(void);
+ __gcov_dump();
+#endif
+
if (ret == ERROR_FAIL)
return EXIT_FAILURE;
else if (ret != ERROR_OK)
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 4 ++++
HACKING | 16 ++++++++++++++++
Makefile.am | 7 +++++++
configure.ac | 21 ++++++++++++++++++++-
src/openocd.c | 7 +++++++
5 files changed, 54 insertions(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-11 17:34:29
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via fd62626dff25cf503a25040d3040b0a2bb9b2a76 (commit)
from b68d23da3c3bc67cffc750fddd64a6be9c615fdb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fd62626dff25cf503a25040d3040b0a2bb9b2a76
Author: Evgeniy Naydanov <evg...@sy...>
Date: Mon Sep 16 18:01:17 2024 +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 <evg...@sy...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8500
Reviewed-by: Antonio Borneo <bor...@gm...>
Reviewed-by: Jan Matyas <jan...@co...>
Tested-by: jenkins
Reviewed-by: zapb <de...@za...>
Reviewed-by: Karl Palsson <ka...@tw...>
diff --git a/src/target/breakpoints.c b/src/target/breakpoints.c
index 2fbb69e07..9378abcb1 100644
--- a/src/target/breakpoints.c
+++ b/src/target/breakpoints.c
@@ -500,7 +500,7 @@ struct breakpoint *breakpoint_find(struct target *target, target_addr_t address)
}
static int watchpoint_add_internal(struct target *target, target_addr_t address,
- unsigned int length, enum watchpoint_rw rw, uint32_t value, uint32_t mask)
+ unsigned int length, enum watchpoint_rw rw, uint64_t value, uint64_t mask)
{
struct watchpoint *watchpoint = target->watchpoints;
struct watchpoint **watchpoint_p = &target->watchpoints;
-----------------------------------------------------------------------
Summary of changes:
src/target/breakpoints.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-09 21:06:47
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via b68d23da3c3bc67cffc750fddd64a6be9c615fdb (commit)
from bcebc84882116c5c08c9243297a925262b1c3f0f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b68d23da3c3bc67cffc750fddd64a6be9c615fdb
Author: Marek Kraus <gam...@ou...>
Date: Wed Oct 23 16:27:33 2024 +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 <gam...@ou...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8529
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/tcl/target/bl702.cfg b/tcl/target/bl702.cfg
index 6d4a048d9..5046cd189 100644
--- a/tcl/target/bl702.cfg
+++ b/tcl/target/bl702.cfg
@@ -34,6 +34,10 @@ $_TARGETNAME configure -work-area-phys 0x22020000 -work-area-size 0x10000 -work-
# Internal RC ticks on 32 MHz, so this speed should be safe to use.
adapter speed 4000
+# Debug Module's ndmreset resets only Trust Zone Controller, so we need to do SW reset instead.
+# CTRL_PWRON_RESET triggers full "power-on like" reset.
+# This means that pinmux configuration to access JTAG is reset as well, and configured back early
+# in BootROM.
$_TARGETNAME configure -event reset-assert-pre {
halt
@@ -55,6 +59,15 @@ $_TARGETNAME configure -event reset-assert-pre {
# Do reset
# In GLB_SWRST_CFG2, clear CTRL_SYS_RESET, CTRL_CPU_RESET and CTRL_PWRON_RESET
mmw 0x40000018 0x0 0x00000007
+
+ # Since this full software reset resets GPIO pinmux as well, we will lose access
+ # to JTAG right away after writing to register. This chip doesn't support abstract
+ # memory access, so when this is done by progbuf or sysbus, OpenOCD will fail to read
+ # if write was successful or not, and will print error about that. Since receiving of
+ # this error is expected, we will turn off log printing for a moment,
+ set lvl [lindex [debug_level] 1]
+ debug_level -1
# In GLB_SWRST_CFG2, set CTRL_SYS_RESET, CTRL_CPU_RESET and CTRL_PWRON_RESET to 1
- mmw 0x40000018 0x6 0x0
+ catch {mmw 0x40000018 0x7 0x0}
+ debug_level $lvl
}
-----------------------------------------------------------------------
Summary of changes:
tcl/target/bl702.cfg | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-09 21:05:55
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via bcebc84882116c5c08c9243297a925262b1c3f0f (commit)
from 40d58ce5290a51c58615c4f95912b69fa7975aea (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bcebc84882116c5c08c9243297a925262b1c3f0f
Author: Mark Zhuang <mar...@sp...>
Date: Sat Oct 26 10:30:18 2024 +0800
contrib: convert 'unsigned' to 'unsigned int'
Conversion done with
checkpatch --fix-inplace -types UNSPECIFIED_INT
Change-Id: I0e31f87d437fcf3503736474f10a63f9c6be242b
Signed-off-by: Mark Zhuang <mar...@sp...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8368
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/contrib/itmdump.c b/contrib/itmdump.c
index e7523d9bc..7c93a3963 100644
--- a/contrib/itmdump.c
+++ b/contrib/itmdump.c
@@ -43,9 +43,9 @@ unsigned int dump_swit;
* NOTE that this specific encoding could be space-optimized; and that
* trace data streams could also be history-sensitive.
*/
-static void show_task(int port, unsigned data)
+static void show_task(int port, unsigned int data)
{
- unsigned code = data >> 16;
+ unsigned int code = data >> 16;
char buf[16];
if (dump_swit)
@@ -77,7 +77,7 @@ static void show_task(int port, unsigned data)
static void show_reserved(FILE *f, char *label, int c)
{
- unsigned i;
+ unsigned int i;
if (dump_swit)
return;
@@ -96,9 +96,9 @@ static void show_reserved(FILE *f, char *label, int c)
printf("\n");
}
-static bool read_varlen(FILE *f, int c, unsigned *value)
+static bool read_varlen(FILE *f, int c, unsigned int *value)
{
- unsigned size;
+ unsigned int size;
unsigned char buf[4];
*value = 0;
@@ -135,8 +135,8 @@ err:
static void show_hard(FILE *f, int c)
{
- unsigned type = c >> 3;
- unsigned value;
+ unsigned int type = c >> 3;
+ unsigned int value;
char *label;
if (dump_swit)
@@ -230,16 +230,16 @@ static void show_hard(FILE *f, int c)
*/
struct {
int port;
- void (*show)(int port, unsigned data);
+ void (*show)(int port, unsigned int data);
} format[] = {
{ .port = 31, .show = show_task, },
};
static void show_swit(FILE *f, int c)
{
- unsigned port = c >> 3;
- unsigned value = 0;
- unsigned i;
+ unsigned int port = c >> 3;
+ unsigned int value = 0;
+ unsigned int i;
if (port + 1 == dump_swit) {
if (!read_varlen(f, c, &value))
@@ -272,7 +272,7 @@ static void show_swit(FILE *f, int c)
static void show_timestamp(FILE *f, int c)
{
- unsigned counter = 0;
+ unsigned int counter = 0;
char *label = "";
bool delayed = false;
diff --git a/contrib/loaders/flash/fespi/riscv_fespi.c b/contrib/loaders/flash/fespi/riscv_fespi.c
index 17ae2fd22..08fb09477 100644
--- a/contrib/loaders/flash/fespi/riscv_fespi.c
+++ b/contrib/loaders/flash/fespi/riscv_fespi.c
@@ -103,7 +103,7 @@ static void fespi_disable_hw_mode(volatile uint32_t *ctrl_base);
static void fespi_enable_hw_mode(volatile uint32_t *ctrl_base);
static int fespi_wip(volatile uint32_t *ctrl_base);
static int fespi_write_buffer(volatile uint32_t *ctrl_base,
- const uint8_t *buffer, unsigned offset, unsigned len,
+ const uint8_t *buffer, unsigned int offset, unsigned int len,
uint32_t flash_info);
/* Can set bits 3:0 in result. */
@@ -113,7 +113,7 @@ static int fespi_write_buffer(volatile uint32_t *ctrl_base,
* after pprog_cmd
*/
int flash_fespi(volatile uint32_t *ctrl_base, uint32_t page_size,
- const uint8_t *buffer, unsigned offset, uint32_t count,
+ const uint8_t *buffer, unsigned int offset, uint32_t count,
uint32_t flash_info)
{
int result;
@@ -163,12 +163,12 @@ err:
return result;
}
-static uint32_t fespi_read_reg(volatile uint32_t *ctrl_base, unsigned address)
+static uint32_t fespi_read_reg(volatile uint32_t *ctrl_base, unsigned int address)
{
return ctrl_base[address / 4];
}
-static void fespi_write_reg(volatile uint32_t *ctrl_base, unsigned address, uint32_t value)
+static void fespi_write_reg(volatile uint32_t *ctrl_base, unsigned int address, uint32_t value)
{
ctrl_base[address / 4] = value;
}
@@ -188,7 +188,7 @@ static void fespi_enable_hw_mode(volatile uint32_t *ctrl_base)
/* Can set bits 7:4 in result. */
static int fespi_txwm_wait(volatile uint32_t *ctrl_base)
{
- unsigned timeout = TIMEOUT;
+ unsigned int timeout = TIMEOUT;
while (timeout--) {
uint32_t ip = fespi_read_reg(ctrl_base, FESPI_REG_IP);
@@ -209,7 +209,7 @@ static void fespi_set_dir(volatile uint32_t *ctrl_base, bool dir)
/* Can set bits 11:8 in result. */
static int fespi_tx(volatile uint32_t *ctrl_base, uint8_t in)
{
- unsigned timeout = TIMEOUT;
+ unsigned int timeout = TIMEOUT;
while (timeout--) {
uint32_t txfifo = fespi_read_reg(ctrl_base, FESPI_REG_TXFIFO);
@@ -224,7 +224,7 @@ static int fespi_tx(volatile uint32_t *ctrl_base, uint8_t in)
/* Can set bits 15:12 in result. */
static int fespi_rx(volatile uint32_t *ctrl_base, uint8_t *out)
{
- unsigned timeout = TIMEOUT;
+ unsigned int timeout = TIMEOUT;
while (timeout--) {
uint32_t value = fespi_read_reg(ctrl_base, FESPI_REG_RXFIFO);
@@ -252,7 +252,7 @@ static int fespi_wip(volatile uint32_t *ctrl_base)
if (result != ERROR_OK)
return result | ERROR_STACK(0x20000);
- unsigned timeout = TIMEOUT;
+ unsigned int timeout = TIMEOUT;
while (timeout--) {
result = fespi_tx(ctrl_base, 0);
if (result != ERROR_OK)
@@ -273,7 +273,7 @@ static int fespi_wip(volatile uint32_t *ctrl_base)
/* Can set bits 23:20 in result. */
static int fespi_write_buffer(volatile uint32_t *ctrl_base,
- const uint8_t *buffer, unsigned offset, unsigned len,
+ const uint8_t *buffer, unsigned int offset, unsigned int len,
uint32_t flash_info)
{
int result = fespi_tx(ctrl_base, SPIFLASH_WRITE_ENABLE);
@@ -304,7 +304,7 @@ static int fespi_write_buffer(volatile uint32_t *ctrl_base,
if (result != ERROR_OK)
return result | ERROR_STACK(0x600000);
- for (unsigned i = 0; i < len; i++) {
+ for (unsigned int i = 0; i < len; i++) {
result = fespi_tx(ctrl_base, buffer[i]);
if (result != ERROR_OK)
return result | ERROR_STACK(0x700000);
-----------------------------------------------------------------------
Summary of changes:
contrib/itmdump.c | 24 ++++++++++++------------
contrib/loaders/flash/fespi/riscv_fespi.c | 20 ++++++++++----------
2 files changed, 22 insertions(+), 22 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 21:07:08
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 40d58ce5290a51c58615c4f95912b69fa7975aea (commit)
from 3b261fb155dd9165c39fc848bd66aae2e5dea370 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 40d58ce5290a51c58615c4f95912b69fa7975aea
Author: MicBiso <mic...@re...>
Date: Wed Apr 10 12:38:09 2024 +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 <mic...@re...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8211
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/tcl/target/renesas_rz_g2.cfg b/tcl/target/renesas_rz.cfg
similarity index 70%
rename from tcl/target/renesas_rz_g2.cfg
rename to tcl/target/renesas_rz.cfg
index a3d5f48fb..a0489de3d 100644
--- a/tcl/target/renesas_rz_g2.cfg
+++ b/tcl/target/renesas_rz.cfg
@@ -1,23 +1,25 @@
# SPDX-License-Identifier: GPL-2.0-or-later
-# Renesas RZ/G2 SOCs
+# Renesas RZ SOCs
# - There are a combination of Cortex-A57s, Cortex-A53s, Cortex-A55, Cortex-R7
# and Cortex-M33 for each SOC
-# - Each SOC can boot through the Cortex-A5x cores
+# - Each SOC can boot through the Cortex-A5x cores or the Cortex-M33
-# Supported RZ/G2 SOCs and their cores:
+# Supported RZ SOCs and their cores:
# RZ/G2H: Cortex-A57 x4, Cortex-A53 x4, Cortex-R7
# RZ/G2M: Cortex-A57 x2, Cortex-A53 x4, Cortex-R7
# RZ/G2N: Cortex-A57 x2, Cortex-R7
# RZ/G2E: Cortex-A53 x2, Cortex-R7
# RZ/G2L: Cortex-A55 x2, Cortex-M33
+# RZ/V2L: Cortex-A55 x2, Cortex-M33
# RZ/G2LC: Cortex-A55 x2, Cortex-M33
# RZ/G2UL: Cortex-A55 x1, Cortex-M33
+# RZ/G3S: Cortex-A55 x1, Cortex-M33 x2
# Usage:
# There are 2 configuration options:
# SOC: Selects the supported SOC. (Default 'G2L')
-# BOOT_CORE: Selects the booting core. 'CA57', 'CA53' or 'CA55'
+# BOOT_CORE: Selects the booting core. 'CA57', 'CA53', 'CA55' or CM33
transport select jtag
reset_config trst_and_srst srst_gates_jtag
@@ -77,6 +79,13 @@ switch $_soc {
set _boot_core CA55
set _ap_num 0
}
+ V2L {
+ set _CHIPNAME r9a07g054l
+ set _num_ca55 2
+ set _num_cm33 1
+ set _boot_core CA55
+ set _ap_num 0
+ }
G2LC {
set _CHIPNAME r9a07g044c
set _num_ca55 2
@@ -91,6 +100,13 @@ switch $_soc {
set _boot_core CA55
set _ap_num 0
}
+ G3S {
+ set _CHIPNAME r9a08g045s
+ set _num_ca55 1
+ set _num_cm33 2
+ set _boot_core CA55
+ set _ap_num 0
+ }
default {
error "'$_soc' is invalid!"
}
@@ -112,16 +128,16 @@ if { [info exists DAP_TAPID] } {
set _DAP_TAPID 0x6ba00477
}
-echo "\t$_soc - $_num_ca57 CA57(s), $_num_ca55 CA55(s), $_num_ca53 CA53(s), $_num_cr7 CR7(s), \
- $_num_cm33 CM33(s)"
+echo "\t$_soc - $_num_ca57 CA57(s), $_num_ca55 CA55(s), $_num_ca53 CA53(s), \
+ $_num_cr7 CR7(s), $_num_cm33 CM33(s)"
echo "\tBoot Core - $_boot_core\n"
set _DAPNAME $_CHIPNAME.dap
# TAP and DAP
-jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID \
- -ignore-version
+jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf \
+ -expected-id $_DAP_TAPID -ignore-version
dap create $_DAPNAME -chain-position $_CHIPNAME.cpu
echo "$_CHIPNAME.cpu"
@@ -133,8 +149,8 @@ set CA53_DBGBASE {0x80C10000 0x80D10000 0x80E10000 0x80F10000}
set CA53_CTIBASE {0x80C20000 0x80D20000 0x80E20000 0x80F20000}
set CR7_DBGBASE 0x80910000
set CR7_CTIBASE 0x80918000
-set CM33_DBGBASE 0xE000E000
-set CM33_CTIBASE 0xE0042000
+set CM33_DBGBASE {0xE000E000 0xE010E000}
+set CM33_CTIBASE {0xE0042000 0xE0142000}
set smp_targets ""
@@ -145,7 +161,8 @@ proc setup_a5x {core_name dbgbase ctibase num boot} {
cti create $_CTINAME -dap $::_DAPNAME -ap-num $::_ap_num \
-baseaddr [lindex $ctibase $_core]
target create $_TARGETNAME aarch64 -dap $::_DAPNAME \
- -ap-num $::_ap_num -dbgbase [lindex $dbgbase $_core] -cti $_CTINAME
+ -ap-num $::_ap_num -dbgbase [lindex $dbgbase $_core] \
+ -cti $_CTINAME
if { $_core > 0 || $boot == 0 } {
$_TARGETNAME configure -defer-examine
}
@@ -160,13 +177,29 @@ proc setup_cr7 {dbgbase ctibase} {
target create $_TARGETNAME cortex_r4 -dap $::_DAPNAME \
-ap-num 1 -dbgbase $dbgbase -defer-examine
}
-
-proc setup_cm33 {dbgbase ctibase} {
- set _TARGETNAME $::_CHIPNAME.m33
- set _CTINAME $_TARGETNAME.cti
- cti create $_CTINAME -dap $::_DAPNAME -ap-num 2 -baseaddr $ctibase
- target create $_TARGETNAME cortex_m -dap $::_DAPNAME \
- -ap-num 2 -dbgbase $dbgbase -defer-examine
+proc setup_cm33 {dbgbase ctibase num boot} {
+ if { $::_soc == "G2L" || $::_soc == "V2L" \
+ || $::_soc == "G2LC" || $::_soc == "G2UL" } {
+ set _ap_num 2
+ } elseif { $::_soc == "G3S" } {
+ set _ap_num 3
+ }
+ for { set _core 0 } { $_core < $num } { incr _core } {
+ if { $num <= 1 } {
+ set _TARGETNAME $::_CHIPNAME.m33
+ } else {
+ set _TARGETNAME $::_CHIPNAME.m33.$_core
+ }
+ set _CTINAME $_TARGETNAME.cti
+ cti create $_CTINAME -dap $::_DAPNAME -ap-num $_ap_num \
+ -baseaddr [lindex $ctibase $_core]
+ target create $_TARGETNAME cortex_m -dap $::_DAPNAME \
+ -ap-num $_ap_num -dbgbase [lindex $dbgbase $_core]
+ if { $boot == 0 } {
+ $_TARGETNAME configure -defer-examine
+ }
+ incr $_ap_num
+ }
}
# Organize target list based on the boot core
@@ -180,12 +213,17 @@ if { $_boot_core == "CA57" } {
setup_cr7 $CR7_DBGBASE $CR7_CTIBASE
} elseif { $_boot_core == "CA55" } {
setup_a5x a55 $CA55_DBGBASE $CA55_CTIBASE $_num_ca55 1
- setup_cm33 $CM33_DBGBASE $CM33_CTIBASE
+ setup_cm33 $CM33_DBGBASE $CM33_CTIBASE $_num_cm33 0
+} elseif { $_boot_core == "CM33" } {
+ setup_a5x a55 $CA55_DBGBASE $CA55_CTIBASE $_num_ca55 0
+ setup_cm33 $CM33_DBGBASE $CM33_CTIBASE $_num_cm33 1
}
+
echo "SMP targets:$smp_targets"
eval "target smp $smp_targets"
-if { $_soc == "G2L" || $_soc == "G2LC" || $_soc == "G2UL" } {
+if { $_soc == "G2L" || $_soc == "V2L" || $_soc == "G2LC" \
+|| $_soc == "G2UL" || $_soc == "G3S"} {
target create $_CHIPNAME.axi_ap mem_ap -dap $_DAPNAME -ap-num 1
}
-----------------------------------------------------------------------
Summary of changes:
tcl/target/{renesas_rz_g2.cfg => renesas_rz.cfg} | 78 ++++++++++++++++++------
1 file changed, 58 insertions(+), 20 deletions(-)
rename tcl/target/{renesas_rz_g2.cfg => renesas_rz.cfg} (70%)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 21:06:35
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 3b261fb155dd9165c39fc848bd66aae2e5dea370 (commit)
from 337db329c9c30a58ffa08c01691f12dd95890cbb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3b261fb155dd9165c39fc848bd66aae2e5dea370
Author: Marc Schink <de...@za...>
Date: Fri Aug 30 11:22:17 2024 +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 <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8516
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/src/jtag/drivers/parport.c b/src/jtag/drivers/parport.c
index d03d3b89c..bdd338895 100644
--- a/src/jtag/drivers/parport.c
+++ b/src/jtag/drivers/parport.c
@@ -45,21 +45,31 @@
#include <windows.h>
#endif
-/* parallel port cable description
- */
+// Parallel port cable description.
struct cable {
const char *name;
- uint8_t TDO_MASK; /* status port bit containing current TDO value */
- uint8_t TRST_MASK; /* data port bit for TRST */
- uint8_t TMS_MASK; /* data port bit for TMS */
- uint8_t TCK_MASK; /* data port bit for TCK */
- uint8_t TDI_MASK; /* data port bit for TDI */
- uint8_t SRST_MASK; /* data port bit for SRST */
- uint8_t OUTPUT_INVERT; /* data port bits that should be inverted */
- uint8_t INPUT_INVERT; /* status port that should be inverted */
- uint8_t PORT_INIT; /* initialize data port with this value */
- uint8_t PORT_EXIT; /* de-initialize data port with this value */
- uint8_t LED_MASK; /* data port bit for LED */
+ // Status port bit containing current TDO value.
+ uint8_t tdo_mask;
+ // Data port bit for TRST.
+ uint8_t trst_mask;
+ // Data port bit for TMD.
+ uint8_t tms_mask;
+ // Data port bit for TCK.
+ uint8_t tck_mask;
+ // Data port bit for TDI.
+ uint8_t tdi_mask;
+ // Data port bit for SRST.
+ uint8_t srst_mask;
+ // Data port bits that should be inverted.
+ uint8_t output_invert;
+ // Status port that should be inverted.
+ uint8_t input_invert;
+ // Initialize data port with this value.
+ uint8_t port_init;
+ // De-initialize data port with this value.
+ uint8_t port_exit;
+ // Data port bit for LED.
+ uint8_t led_mask;
};
static const struct cable cables[] = {
@@ -87,15 +97,14 @@ static const struct cable cables[] = {
{ NULL, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
};
-/* configuration */
+// Configuration variables.
static char *parport_cable;
static uint16_t parport_port;
static bool parport_exit;
static uint32_t parport_toggling_time_ns = 1000;
static int wait_states;
-/* interface variables
- */
+// Interface variables.
static const struct cable *cable;
static uint8_t dataport_value;
@@ -116,7 +125,7 @@ static bb_value_t parport_read(void)
data = inb(statusport);
#endif
- if ((data ^ cable->INPUT_INVERT) & cable->TDO_MASK)
+ if ((data ^ cable->input_invert) & cable->tdo_mask)
return BB_HIGH;
else
return BB_LOW;
@@ -125,7 +134,7 @@ static bb_value_t parport_read(void)
static inline void parport_write_data(void)
{
uint8_t output;
- output = dataport_value ^ cable->OUTPUT_INVERT;
+ output = dataport_value ^ cable->output_invert;
#if PARPORT_USE_PPDEV == 1
ioctl(device_handle, PPWDATA, &output);
@@ -143,19 +152,19 @@ static int parport_write(int tck, int tms, int tdi)
int i = wait_states + 1;
if (tck)
- dataport_value |= cable->TCK_MASK;
+ dataport_value |= cable->tck_mask;
else
- dataport_value &= ~cable->TCK_MASK;
+ dataport_value &= ~cable->tck_mask;
if (tms)
- dataport_value |= cable->TMS_MASK;
+ dataport_value |= cable->tms_mask;
else
- dataport_value &= ~cable->TMS_MASK;
+ dataport_value &= ~cable->tms_mask;
if (tdi)
- dataport_value |= cable->TDI_MASK;
+ dataport_value |= cable->tdi_mask;
else
- dataport_value &= ~cable->TDI_MASK;
+ dataport_value &= ~cable->tdi_mask;
while (i-- > 0)
parport_write_data();
@@ -163,33 +172,32 @@ static int parport_write(int tck, int tms, int tdi)
return ERROR_OK;
}
-/* (1) assert or (0) deassert reset lines */
+// (1) assert or (0) deassert reset lines.
static int parport_reset(int trst, int srst)
{
LOG_DEBUG("trst: %i, srst: %i", trst, srst);
if (trst == 0)
- dataport_value |= cable->TRST_MASK;
+ dataport_value |= cable->trst_mask;
else if (trst == 1)
- dataport_value &= ~cable->TRST_MASK;
+ dataport_value &= ~cable->trst_mask;
if (srst == 0)
- dataport_value |= cable->SRST_MASK;
+ dataport_value |= cable->srst_mask;
else if (srst == 1)
- dataport_value &= ~cable->SRST_MASK;
+ dataport_value &= ~cable->srst_mask;
parport_write_data();
return ERROR_OK;
}
-/* turn LED on parport adapter on (true) or off (true) */
static int parport_led(bool on)
{
if (on)
- dataport_value |= cable->LED_MASK;
+ dataport_value |= cable->led_mask;
else
- dataport_value &= ~cable->LED_MASK;
+ dataport_value &= ~cable->led_mask;
parport_write_data();
@@ -204,7 +212,7 @@ static int parport_speed(int speed)
static int parport_khz(int khz, int *jtag_speed)
{
- if (khz == 0) {
+ if (!khz) {
LOG_DEBUG("RCLK not supported");
return ERROR_FAIL;
}
@@ -248,10 +256,10 @@ static int parport_get_giveio_access(void)
#endif
static struct bitbang_interface parport_bitbang = {
- .read = &parport_read,
- .write = &parport_write,
- .blink = &parport_led,
- };
+ .read = &parport_read,
+ .write = &parport_write,
+ .blink = &parport_led,
+};
static int parport_init(void)
{
@@ -268,7 +276,7 @@ static int parport_init(void)
}
while (cur_cable->name) {
- if (strcmp(cur_cable->name, parport_cable) == 0) {
+ if (!strcmp(cur_cable->name, parport_cable)) {
cable = cur_cable;
break;
}
@@ -280,7 +288,7 @@ static int parport_init(void)
return ERROR_JTAG_INIT_FAILED;
}
- dataport_value = cable->PORT_INIT;
+ dataport_value = cable->port_init;
#if PARPORT_USE_PPDEV == 1
if (device_handle > 0) {
@@ -332,7 +340,7 @@ static int parport_init(void)
#endif /* not __FreeBSD__, __FreeBSD_kernel__ */
#else /* not PARPORT_USE_PPDEV */
- if (parport_port == 0) {
+ if (!parport_port) {
parport_port = 0x378;
LOG_WARNING("No parport port specified, using default '0x378' (LPT1)");
}
@@ -351,7 +359,7 @@ static int parport_init(void)
}
LOG_DEBUG("...privileges granted");
- /* make sure parallel port is in right mode (clear tristate and interrupt */
+ // Make sure parallel port is in right mode (clear tristate and interrupt.
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
outb(parport_port + 2, 0x0);
#else
@@ -378,7 +386,7 @@ static int parport_quit(void)
return ERROR_FAIL;
if (parport_exit) {
- dataport_value = cable->PORT_EXIT;
+ dataport_value = cable->port_exit;
parport_write_data();
}
@@ -388,13 +396,13 @@ static int parport_quit(void)
return ERROR_OK;
}
-COMMAND_HANDLER(parport_handle_parport_port_command)
+COMMAND_HANDLER(parport_handle_port_command)
{
if (CMD_ARGC == 1) {
- /* only if the port wasn't overwritten by cmdline */
- if (parport_port == 0)
+ // Only if the port wasn't overwritten by cmdline.
+ if (!parport_port) {
COMMAND_PARSE_NUMBER(u16, CMD_ARGV[0], parport_port);
- else {
+ } else {
LOG_ERROR("The parport port was already configured!");
return ERROR_FAIL;
}
@@ -405,14 +413,14 @@ COMMAND_HANDLER(parport_handle_parport_port_command)
return ERROR_OK;
}
-COMMAND_HANDLER(parport_handle_parport_cable_command)
+COMMAND_HANDLER(parport_handle_cable_command)
{
- if (CMD_ARGC == 0)
+ if (!CMD_ARGC)
return ERROR_OK;
- /* only if the cable name wasn't overwritten by cmdline */
+ // Only if the cable name wasn't overwritten by cmdline.
if (!parport_cable) {
- /* REVISIT first verify that it's listed in cables[] ... */
+ // TODO: REVISIT first verify that it's listed in cables[].
parport_cable = malloc(strlen(CMD_ARGV[0]) + sizeof(char));
if (!parport_cable) {
LOG_ERROR("Out of memory");
@@ -421,7 +429,7 @@ COMMAND_HANDLER(parport_handle_parport_cable_command)
strcpy(parport_cable, CMD_ARGV[0]);
}
- /* REVISIT it's probably worth returning the current value ... */
+ // TODO: REVISIT it's probably worth returning the current value.
return ERROR_OK;
}
@@ -436,7 +444,7 @@ COMMAND_HANDLER(parport_handle_write_on_exit_command)
return ERROR_OK;
}
-COMMAND_HANDLER(parport_handle_parport_toggling_time_command)
+COMMAND_HANDLER(parport_handle_toggling_time_command)
{
if (CMD_ARGC == 1) {
uint32_t ns;
@@ -445,7 +453,7 @@ COMMAND_HANDLER(parport_handle_parport_toggling_time_command)
if (retval != ERROR_OK)
return retval;
- if (ns == 0) {
+ if (!ns) {
LOG_ERROR("0 ns is not a valid parport toggling time");
return ERROR_FAIL;
}
@@ -453,9 +461,11 @@ COMMAND_HANDLER(parport_handle_parport_toggling_time_command)
parport_toggling_time_ns = ns;
retval = adapter_get_speed(&wait_states);
if (retval != ERROR_OK) {
- /* if adapter_get_speed fails then the clock_mode
- * has not been configured, this happens if parport_toggling_time is
- * called before the adapter speed is set */
+ /*
+ * If adapter_get_speed fails then the clock_mode has
+ * not been configured, this happens if toggling_time is
+ * called before the adapter speed is set.
+ */
LOG_INFO("no parport speed set - defaulting to zero wait states");
wait_states = 0;
}
@@ -470,7 +480,7 @@ COMMAND_HANDLER(parport_handle_parport_toggling_time_command)
static const struct command_registration parport_subcommand_handlers[] = {
{
.name = "port",
- .handler = parport_handle_parport_port_command,
+ .handler = parport_handle_port_command,
.mode = COMMAND_CONFIG,
.help = "Display the address of the I/O port (e.g. 0x378) "
"or the number of the '/dev/parport' device used. "
@@ -479,11 +489,11 @@ static const struct command_registration parport_subcommand_handlers[] = {
},
{
.name = "cable",
- .handler = parport_handle_parport_cable_command,
+ .handler = parport_handle_cable_command,
.mode = COMMAND_CONFIG,
.help = "Set the layout of the parallel port cable "
"used to connect to the target.",
- /* REVISIT there's no way to list layouts we know ... */
+ // TODO: REVISIT there's no way to list layouts we know.
.usage = "[layout]",
},
{
@@ -496,7 +506,7 @@ static const struct command_registration parport_subcommand_handlers[] = {
},
{
.name = "toggling_time",
- .handler = parport_handle_parport_toggling_time_command,
+ .handler = parport_handle_toggling_time_command,
.mode = COMMAND_CONFIG,
.help = "Displays or assigns how many nanoseconds it "
"takes for the hardware to toggle TCK.",
-----------------------------------------------------------------------
Summary of changes:
src/jtag/drivers/parport.c | 130 ++++++++++++++++++++++++---------------------
1 file changed, 70 insertions(+), 60 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 21:06:05
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 337db329c9c30a58ffa08c01691f12dd95890cbb (commit)
from f4d81cd4d49336f695b8d4b00aa0afdbc6ea22cd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 337db329c9c30a58ffa08c01691f12dd95890cbb
Author: Marc Schink <de...@za...>
Date: Fri Aug 30 11:06:13 2024 +0200
adapter/bitbang: Use 'bool' data type for blink()
Change-Id: I187f8944ad5fd92f28cbd32e447f9ec1a97e16d6
Signed-off-by: Marc Schink <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8515
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/src/jtag/drivers/am335xgpio.c b/src/jtag/drivers/am335xgpio.c
index cfe41c3be..9bb7ea7d1 100644
--- a/src/jtag/drivers/am335xgpio.c
+++ b/src/jtag/drivers/am335xgpio.c
@@ -275,10 +275,10 @@ static int am335xgpio_swdio_read(void)
return get_gpio_value(&adapter_gpio_config[ADAPTER_GPIO_IDX_SWDIO]);
}
-static int am335xgpio_blink(int on)
+static int am335xgpio_blink(bool on)
{
if (is_gpio_config_valid(&adapter_gpio_config[ADAPTER_GPIO_IDX_LED]))
- set_gpio_value(&adapter_gpio_config[ADAPTER_GPIO_IDX_LED], on);
+ set_gpio_value(&adapter_gpio_config[ADAPTER_GPIO_IDX_LED], on ? 1 : 0);
return ERROR_OK;
}
diff --git a/src/jtag/drivers/bcm2835gpio.c b/src/jtag/drivers/bcm2835gpio.c
index b8d91bf38..2c2061dae 100644
--- a/src/jtag/drivers/bcm2835gpio.c
+++ b/src/jtag/drivers/bcm2835gpio.c
@@ -419,10 +419,10 @@ static void bcm2835gpio_munmap(void)
}
}
-static int bcm2835gpio_blink(int on)
+static int bcm2835gpio_blink(bool on)
{
if (is_gpio_config_valid(ADAPTER_GPIO_IDX_LED))
- set_gpio_value(&adapter_gpio_config[ADAPTER_GPIO_IDX_LED], on);
+ set_gpio_value(&adapter_gpio_config[ADAPTER_GPIO_IDX_LED], on ? 1 : 0);
return ERROR_OK;
}
diff --git a/src/jtag/drivers/bitbang.c b/src/jtag/drivers/bitbang.c
index 17e01a233..42234a6f7 100644
--- a/src/jtag/drivers/bitbang.c
+++ b/src/jtag/drivers/bitbang.c
@@ -309,7 +309,7 @@ int bitbang_execute_queue(struct jtag_command *cmd_queue)
retval = ERROR_OK;
if (bitbang_interface->blink) {
- if (bitbang_interface->blink(1) != ERROR_OK)
+ if (bitbang_interface->blink(true) != ERROR_OK)
return ERROR_FAIL;
}
@@ -377,7 +377,7 @@ int bitbang_execute_queue(struct jtag_command *cmd_queue)
cmd = cmd->next;
}
if (bitbang_interface->blink) {
- if (bitbang_interface->blink(0) != ERROR_OK)
+ if (bitbang_interface->blink(false) != ERROR_OK)
return ERROR_FAIL;
}
@@ -396,7 +396,7 @@ static void bitbang_swd_exchange(bool rnw, uint8_t buf[], unsigned int offset, u
{
if (bitbang_interface->blink) {
/* FIXME: we should manage errors */
- bitbang_interface->blink(1);
+ bitbang_interface->blink(true);
}
for (unsigned int i = offset; i < bit_cnt + offset; i++) {
@@ -418,7 +418,7 @@ static void bitbang_swd_exchange(bool rnw, uint8_t buf[], unsigned int offset, u
if (bitbang_interface->blink) {
/* FIXME: we should manage errors */
- bitbang_interface->blink(0);
+ bitbang_interface->blink(false);
}
}
diff --git a/src/jtag/drivers/bitbang.h b/src/jtag/drivers/bitbang.h
index dc941796e..82405eb8a 100644
--- a/src/jtag/drivers/bitbang.h
+++ b/src/jtag/drivers/bitbang.h
@@ -45,7 +45,7 @@ struct bitbang_interface {
int (*write)(int tck, int tms, int tdi);
/** Blink led (optional). */
- int (*blink)(int on);
+ int (*blink)(bool on);
/** Sample SWDIO and return the value. */
int (*swdio_read)(void);
diff --git a/src/jtag/drivers/dummy.c b/src/jtag/drivers/dummy.c
index 1b1e57392..4fe598fe3 100644
--- a/src/jtag/drivers/dummy.c
+++ b/src/jtag/drivers/dummy.c
@@ -72,7 +72,7 @@ static int dummy_reset(int trst, int srst)
return ERROR_OK;
}
-static int dummy_led(int on)
+static int dummy_led(bool on)
{
return ERROR_OK;
}
diff --git a/src/jtag/drivers/linuxgpiod.c b/src/jtag/drivers/linuxgpiod.c
index 1926ed9ae..fa14e42d6 100644
--- a/src/jtag/drivers/linuxgpiod.c
+++ b/src/jtag/drivers/linuxgpiod.c
@@ -178,14 +178,14 @@ static int linuxgpiod_swd_write(int swclk, int swdio)
return ERROR_OK;
}
-static int linuxgpiod_blink(int on)
+static int linuxgpiod_blink(bool on)
{
int retval;
if (!is_gpio_config_valid(ADAPTER_GPIO_IDX_LED))
return ERROR_OK;
- retval = gpiod_line_set_value(gpiod_line[ADAPTER_GPIO_IDX_LED], on);
+ retval = gpiod_line_set_value(gpiod_line[ADAPTER_GPIO_IDX_LED], on ? 1 : 0);
if (retval < 0)
LOG_WARNING("Fail set led");
return retval;
diff --git a/src/jtag/drivers/parport.c b/src/jtag/drivers/parport.c
index d26a51048..d03d3b89c 100644
--- a/src/jtag/drivers/parport.c
+++ b/src/jtag/drivers/parport.c
@@ -183,8 +183,8 @@ static int parport_reset(int trst, int srst)
return ERROR_OK;
}
-/* turn LED on parport adapter on (1) or off (0) */
-static int parport_led(int on)
+/* turn LED on parport adapter on (true) or off (true) */
+static int parport_led(bool on)
{
if (on)
dataport_value |= cable->LED_MASK;
@@ -364,7 +364,7 @@ static int parport_init(void)
return ERROR_FAIL;
if (parport_write(0, 0, 0) != ERROR_OK)
return ERROR_FAIL;
- if (parport_led(1) != ERROR_OK)
+ if (parport_led(true) != ERROR_OK)
return ERROR_FAIL;
bitbang_interface = &parport_bitbang;
@@ -374,7 +374,7 @@ static int parport_init(void)
static int parport_quit(void)
{
- if (parport_led(0) != ERROR_OK)
+ if (parport_led(false) != ERROR_OK)
return ERROR_FAIL;
if (parport_exit) {
diff --git a/src/jtag/drivers/remote_bitbang.c b/src/jtag/drivers/remote_bitbang.c
index edd36f2e6..91a8532b7 100644
--- a/src/jtag/drivers/remote_bitbang.c
+++ b/src/jtag/drivers/remote_bitbang.c
@@ -251,7 +251,7 @@ static int remote_bitbang_sleep(unsigned int microseconds)
return remote_bitbang_flush();
}
-static int remote_bitbang_blink(int on)
+static int remote_bitbang_blink(bool on)
{
char c = on ? 'B' : 'b';
return remote_bitbang_queue(c, FLUSH_SEND_BUF);
-----------------------------------------------------------------------
Summary of changes:
src/jtag/drivers/am335xgpio.c | 4 ++--
src/jtag/drivers/bcm2835gpio.c | 4 ++--
src/jtag/drivers/bitbang.c | 8 ++++----
src/jtag/drivers/bitbang.h | 2 +-
src/jtag/drivers/dummy.c | 2 +-
src/jtag/drivers/linuxgpiod.c | 4 ++--
src/jtag/drivers/parport.c | 8 ++++----
src/jtag/drivers/remote_bitbang.c | 2 +-
8 files changed, 17 insertions(+), 17 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 21:05:25
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via f4d81cd4d49336f695b8d4b00aa0afdbc6ea22cd (commit)
from 99f60d5e594278b876142a957090d8649d5e6c44 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f4d81cd4d49336f695b8d4b00aa0afdbc6ea22cd
Author: Marc Schink <de...@za...>
Date: Fri Aug 30 10:47:55 2024 +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 <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8514
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/tcl/interface/parport.cfg b/tcl/interface/parport.cfg
index b9fceeb85..8fb1c148b 100644
--- a/tcl/interface/parport.cfg
+++ b/tcl/interface/parport.cfg
@@ -5,17 +5,6 @@
#
# Addresses: 0x378/LPT1 or 0x278/LPT2 ...
#
+echo "DEPRECATED: use interface/parport/wiggler.cfg instead of deprecated interface/parport.cfg"
-if { [info exists PARPORTADDR] } {
- set _PARPORTADDR $PARPORTADDR
-} else {
- if {$tcl_platform(platform) eq "windows"} {
- set _PARPORTADDR 0x378
- } {
- set _PARPORTADDR 0
- }
-}
-
-adapter driver parport
-parport port $_PARPORTADDR
-parport cable wiggler
+source [find interface/parport/wiggler.cfg]
diff --git a/tcl/interface/parport_dlc5.cfg b/tcl/interface/parport/dlc5.cfg
similarity index 100%
copy from tcl/interface/parport_dlc5.cfg
copy to tcl/interface/parport/dlc5.cfg
diff --git a/tcl/interface/parport.cfg b/tcl/interface/parport/wiggler.cfg
similarity index 100%
copy from tcl/interface/parport.cfg
copy to tcl/interface/parport/wiggler.cfg
diff --git a/tcl/interface/parport_dlc5.cfg b/tcl/interface/parport_dlc5.cfg
index 24acea7a9..83f3b56c4 100644
--- a/tcl/interface/parport_dlc5.cfg
+++ b/tcl/interface/parport_dlc5.cfg
@@ -5,13 +5,6 @@
#
# http://www.xilinx.com/itp/xilinx4/data/docs/pac/appendixb.html
#
+echo "DEPRECATED: use interface/parport/dlc5.cfg instead of deprecated interface/parport_dlc5.cfg"
-if { [info exists PARPORTADDR] } {
- set _PARPORTADDR $PARPORTADDR
-} else {
- set _PARPORTADDR 0
-}
-
-adapter driver parport
-parport port $_PARPORTADDR
-parport cable dlc5
+source [find interface/parport/dlc5.cfg]
-----------------------------------------------------------------------
Summary of changes:
tcl/interface/parport.cfg | 15 ++-------------
tcl/interface/{parport_dlc5.cfg => parport/dlc5.cfg} | 0
tcl/interface/{parport.cfg => parport/wiggler.cfg} | 0
tcl/interface/parport_dlc5.cfg | 11 ++---------
4 files changed, 4 insertions(+), 22 deletions(-)
copy tcl/interface/{parport_dlc5.cfg => parport/dlc5.cfg} (100%)
copy tcl/interface/{parport.cfg => parport/wiggler.cfg} (100%)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 21:04:08
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 99f60d5e594278b876142a957090d8649d5e6c44 (commit)
from b95633b30c35058005f7d69578773944e32e98e5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 99f60d5e594278b876142a957090d8649d5e6c44
Author: Mark Zhuang <mar...@sp...>
Date: Sat Oct 26 10:15:00 2024 +0800
jtag: convert 'unsigned' to 'unsigned int'
Conversion done with
checkpatch --fix-inplace -types UNSPECIFIED_INT
Change-Id: I2c2d56aa98e89bcc6088a1bd51d70066d67d6dad
Signed-off-by: Mark Zhuang <mar...@sp...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8367
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/jtag/hla/hla_interface.c b/src/jtag/hla/hla_interface.c
index f284278dd..e826f7910 100644
--- a/src/jtag/hla/hla_interface.c
+++ b/src/jtag/hla/hla_interface.c
@@ -76,7 +76,7 @@ int hl_interface_init_target(struct target *t)
if (res != ERROR_OK)
return res;
- unsigned ii, limit = t->tap->expected_ids_cnt;
+ unsigned int ii, limit = t->tap->expected_ids_cnt;
int found = 0;
for (ii = 0; ii < limit; ii++) {
@@ -264,7 +264,7 @@ COMMAND_HANDLER(hl_interface_handle_vid_pid_command)
return ERROR_COMMAND_SYNTAX_ERROR;
}
- unsigned i;
+ unsigned int i;
for (i = 0; i < CMD_ARGC; i += 2) {
COMMAND_PARSE_NUMBER(u16, CMD_ARGV[i], hl_if.param.vid[i / 2]);
COMMAND_PARSE_NUMBER(u16, CMD_ARGV[i + 1], hl_if.param.pid[i / 2]);
-----------------------------------------------------------------------
Summary of changes:
src/jtag/hla/hla_interface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 21:03:52
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via b95633b30c35058005f7d69578773944e32e98e5 (commit)
from 114ad468ca6be45e25cfc1a521f04f959cc76159 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b95633b30c35058005f7d69578773944e32e98e5
Author: Mark Zhuang <mar...@sp...>
Date: Sat Oct 26 11:09:16 2024 +0800
flash: convert 'unsigned' to 'unsigned int'
Change-Id: I8e8da78385eed714524891b580e19a79cfb459d3
Signed-off-by: Mark Zhuang <mar...@sp...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8370
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/flash/nand/mx3.h b/src/flash/nand/mx3.h
index b272962b4..648cd86cc 100644
--- a/src/flash/nand/mx3.h
+++ b/src/flash/nand/mx3.h
@@ -86,10 +86,10 @@ enum mx_nf_finalize_action {
};
struct mx3_nf_flags {
- unsigned target_little_endian:1;
- unsigned nand_readonly:1;
- unsigned one_kb_sram:1;
- unsigned hw_ecc_enabled:1;
+ unsigned int target_little_endian:1;
+ unsigned int nand_readonly:1;
+ unsigned int one_kb_sram:1;
+ unsigned int hw_ecc_enabled:1;
};
struct mx3_nf_controller {
diff --git a/src/flash/nand/mxc.h b/src/flash/nand/mxc.h
index ae2c03a75..e9dc0a2f3 100644
--- a/src/flash/nand/mxc.h
+++ b/src/flash/nand/mxc.h
@@ -138,11 +138,11 @@ enum mxc_nf_finalize_action {
};
struct mxc_nf_flags {
- unsigned target_little_endian:1;
- unsigned nand_readonly:1;
- unsigned one_kb_sram:1;
- unsigned hw_ecc_enabled:1;
- unsigned biswap_enabled:1;
+ unsigned int target_little_endian:1;
+ unsigned int nand_readonly:1;
+ unsigned int one_kb_sram:1;
+ unsigned int hw_ecc_enabled:1;
+ unsigned int biswap_enabled:1;
};
struct mxc_nf_controller {
-----------------------------------------------------------------------
Summary of changes:
src/flash/nand/mx3.h | 8 ++++----
src/flash/nand/mxc.h | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 21:03:37
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 114ad468ca6be45e25cfc1a521f04f959cc76159 (commit)
from 134e56338d365319380092a7bc5becf82c6d47f2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 114ad468ca6be45e25cfc1a521f04f959cc76159
Author: Mark Zhuang <mar...@sp...>
Date: Sat Oct 26 10:42:03 2024 +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 <mar...@sp...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8369
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 579a388d2..c572f392a 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -116,7 +116,7 @@ static int gdb_error(struct connection *connection, int retval);
static char *gdb_port;
static char *gdb_port_next;
-static void gdb_log_callback(void *priv, const char *file, unsigned line,
+static void gdb_log_callback(void *priv, const char *file, unsigned int line,
const char *function, const char *string);
static void gdb_sig_halted(struct connection *connection);
@@ -360,7 +360,7 @@ static void gdb_log_incoming_packet(struct connection *connection, const char *p
struct gdb_connection *gdb_connection = connection->priv;
/* Avoid dumping non-printable characters to the terminal */
- const unsigned packet_len = strlen(packet);
+ const unsigned int packet_len = strlen(packet);
const char *nonprint = find_nonprint_char(packet, packet_len);
if (nonprint) {
/* Does packet at least have a prefix that is printable?
@@ -1203,7 +1203,7 @@ static void gdb_target_to_reg(struct target *target,
int i;
for (i = 0; i < str_len; i += 2) {
- unsigned t;
+ unsigned int t;
if (sscanf(tstr + i, "%02x", &t) != 1) {
LOG_ERROR("BUG: unable to convert register value");
exit(-1);
@@ -1948,8 +1948,8 @@ static int gdb_memory_map(struct connection *connection,
compare_bank);
for (unsigned int i = 0; i < target_flash_banks; i++) {
- unsigned sector_size = 0;
- unsigned group_len = 0;
+ unsigned int sector_size = 0;
+ unsigned int group_len = 0;
p = banks[i];
@@ -3469,7 +3469,7 @@ static int gdb_fileio_response_packet(struct connection *connection,
return ERROR_OK;
}
-static void gdb_log_callback(void *priv, const char *file, unsigned line,
+static void gdb_log_callback(void *priv, const char *file, unsigned int line,
const char *function, const char *string)
{
struct connection *connection = priv;
diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c
index a596afef0..7818af2db 100644
--- a/src/server/telnet_server.c
+++ b/src/server/telnet_server.c
@@ -93,7 +93,7 @@ static int telnet_output(struct command_context *cmd_ctx, const char *line)
return telnet_outputline(connection, line);
}
-static void telnet_log_callback(void *priv, const char *file, unsigned line,
+static void telnet_log_callback(void *priv, const char *file, unsigned int line,
const char *function, const char *string)
{
struct connection *connection = priv;
-----------------------------------------------------------------------
Summary of changes:
src/server/gdb_server.c | 12 ++++++------
src/server/telnet_server.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 21:03:12
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 134e56338d365319380092a7bc5becf82c6d47f2 (commit)
from 34ec5536c0ba3315bc5a841244bbf70141ccfbb4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 134e56338d365319380092a7bc5becf82c6d47f2
Author: Mark Zhuang <mar...@sp...>
Date: Fri Oct 25 22:15:29 2024 +0800
target: riscv: convert 'unsigned' to 'unsigned int'
Change-Id: I10b9abf9e42389eb91b210b8c2f01219ca9068cd
Signed-off-by: Mark Zhuang <mar...@sp...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8366
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 6c9ed317b..658c1fd9d 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -50,8 +50,7 @@ static bool riscv013_is_halted(struct target *target);
static enum riscv_halt_reason riscv013_halt_reason(struct target *target);
static int riscv013_write_debug_buffer(struct target *target, unsigned int index,
riscv_insn_t d);
-static riscv_insn_t riscv013_read_debug_buffer(struct target *target, unsigned
- index);
+static riscv_insn_t riscv013_read_debug_buffer(struct target *target, unsigned int index);
static int riscv013_execute_debug_buffer(struct target *target);
static void riscv013_fill_dmi_write_u64(struct target *target, char *buf, int a, uint64_t d);
static void riscv013_fill_dmi_read_u64(struct target *target, char *buf, int a);
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/riscv-013.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 21:01:42
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 34ec5536c0ba3315bc5a841244bbf70141ccfbb4 (commit)
from 3ce0962f2c525595bcbd0bd5da73673e236fc42d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 34ec5536c0ba3315bc5a841244bbf70141ccfbb4
Author: Antonio Borneo <bor...@gm...>
Date: Sat Oct 12 11:48:05 2024 +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 <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8523
Tested-by: jenkins
Reviewed-by: Andrzej SierżÄga <as...@gm...>
diff --git a/doc/openocd.texi b/doc/openocd.texi
index 97396c7b7..9b5cfbb83 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -2489,7 +2489,7 @@ This command is only available if your libusb1 is at least version 1.0.16.
Specifies the @var{serial_string} of the adapter to use.
If this command is not specified, serial strings are not checked.
Only the following adapter drivers use the serial string from this command:
-arm-jtag-ew, cmsis_dap, esp_usb_jtag, ft232r, ftdi, hla (stlink, ti-icdi), jlink, kitprog, opendus,
+arm-jtag-ew, cmsis_dap, esp_usb_jtag, ft232r, ftdi, hla (ti-icdi), jlink, kitprog, opendus,
openjtag, osbdm, presto, rlink, st-link, usb_blaster (ublast2), usbprog, vsllink, xds110.
@end deffn
@@ -3206,7 +3206,7 @@ version reported is V2.J21.S4.
Currently Not Supported.
@end deffn
-@deffn {Config Command} {hla layout} (@option{stlink}|@option{icdi}|@option{nulink})
+@deffn {Config Command} {hla layout} (@option{icdi}|@option{nulink})
Specifies the adapter layout to use.
@end deffn
@@ -3214,15 +3214,6 @@ Specifies the adapter layout to use.
Pairs of vendor IDs and product IDs of the device.
@end deffn
-@deffn {Config Command} {hla stlink_backend} (usb | tcp [port])
-@emph{ST-Link only:} Choose between 'exclusive' USB communication (the default backend) or
-'shared' mode using ST-Link TCP server (the default port is 7184).
-
-@emph{Note:} ST-Link TCP server is a binary application provided by ST
-available from @url{https://www.st.com/en/development-tools/st-link-server.html,
-ST-LINK server software module}.
-@end deffn
-
@deffn {Command} {hla command} command
Execute a custom adapter-specific command. The @var{command} string is
passed as is to the underlying adapter layout handler.
@@ -3232,9 +3223,12 @@ passed as is to the underlying adapter layout handler.
@anchor{st_link_dap_interface}
@deffn {Interface Driver} {st-link}
This is a driver that supports STMicroelectronics adapters ST-LINK/V2
-(from firmware V2J24), STLINK-V3 and STLINK-V3PWR, thanks to a new API that provides
+(from 2015 firmware V2J24), STLINK-V3 and STLINK-V3PWR, thanks to a new API that provides
directly access the arm ADIv5 DAP.
+The older API that requires HLA transport is deprecated and will be dropped
+from OpenOCD. In mean time it's still available by using @file{interface/stlink-hla.cfg}.
+
The new API provide access to multiple AP on the same DAP, but the
maximum number of the AP port is limited by the specific firmware version
(e.g. firmware V2J29 has 3 as maximum AP number, while V2J32 has 8).
@@ -10677,7 +10671,7 @@ baud with our custom divisor to get 12MHz)
@item OpenOCD invocation line:
@example
openocd -f interface/stlink.cfg \
--c "transport select hla_swd" \
+-c "transport select dapdirect_swd" \
-f target/stm32l1.cfg \
-c "stm32l1.tpiu configure -protocol uart" \
-c "stm32l1.tpiu configure -traceclk 24000000 -pin-freq 12000000" \
diff --git a/tcl/board/st_b-l475e-iot01a.cfg b/tcl/board/st_b-l475e-iot01a.cfg
index e75c99d7a..3f3db125c 100644
--- a/tcl/board/st_b-l475e-iot01a.cfg
+++ b/tcl/board/st_b-l475e-iot01a.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 96KB
set WORKAREASIZE 0x18000
diff --git a/tcl/board/st_nucleo_8l152r8.cfg b/tcl/board/st_nucleo_8l152r8.cfg
index 7cb8bcecd..681b5a243 100644
--- a/tcl/board/st_nucleo_8l152r8.cfg
+++ b/tcl/board/st_nucleo_8l152r8.cfg
@@ -3,7 +3,7 @@
# This is a ST NUCLEO 8L152R8 board with a single STM8L152R8T6 chip.
# http://www.st.com/en/evaluation-tools/nucleo-8l152r8.html
-source [find interface/stlink-dap.cfg]
+source [find interface/stlink.cfg]
transport select swim
diff --git a/tcl/board/st_nucleo_8s208rb.cfg b/tcl/board/st_nucleo_8s208rb.cfg
index 0d3c0c912..0f6bde215 100644
--- a/tcl/board/st_nucleo_8s208rb.cfg
+++ b/tcl/board/st_nucleo_8s208rb.cfg
@@ -3,7 +3,7 @@
# This is a ST NUCLEO 8S208RB board with a single STM8S208RBT6 chip.
# https://www.st.com/en/evaluation-tools/nucleo-8s208rb.html
-source [find interface/stlink-dap.cfg]
+source [find interface/stlink.cfg]
transport select swim
diff --git a/tcl/board/st_nucleo_f0.cfg b/tcl/board/st_nucleo_f0.cfg
index 31a95f59d..00c131fd6 100644
--- a/tcl/board/st_nucleo_f0.cfg
+++ b/tcl/board/st_nucleo_f0.cfg
@@ -10,7 +10,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32f0x.cfg]
diff --git a/tcl/board/st_nucleo_f103rb.cfg b/tcl/board/st_nucleo_f103rb.cfg
index 9815d4546..892bdda99 100644
--- a/tcl/board/st_nucleo_f103rb.cfg
+++ b/tcl/board/st_nucleo_f103rb.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32f1x.cfg]
diff --git a/tcl/board/st_nucleo_f3.cfg b/tcl/board/st_nucleo_f3.cfg
index 883372494..38f49e3d5 100644
--- a/tcl/board/st_nucleo_f3.cfg
+++ b/tcl/board/st_nucleo_f3.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32f3x.cfg]
diff --git a/tcl/board/st_nucleo_f4.cfg b/tcl/board/st_nucleo_f4.cfg
index a1908e403..7617a1758 100644
--- a/tcl/board/st_nucleo_f4.cfg
+++ b/tcl/board/st_nucleo_f4.cfg
@@ -8,7 +8,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32f4x.cfg]
diff --git a/tcl/board/st_nucleo_f7.cfg b/tcl/board/st_nucleo_f7.cfg
index 9c5b36ea4..41f8b2129 100644
--- a/tcl/board/st_nucleo_f7.cfg
+++ b/tcl/board/st_nucleo_f7.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32f7x.cfg]
diff --git a/tcl/board/st_nucleo_g0.cfg b/tcl/board/st_nucleo_g0.cfg
index f8e67a043..f22a7e397 100644
--- a/tcl/board/st_nucleo_g0.cfg
+++ b/tcl/board/st_nucleo_g0.cfg
@@ -12,7 +12,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32g0x.cfg]
diff --git a/tcl/board/st_nucleo_g4.cfg b/tcl/board/st_nucleo_g4.cfg
index 8e583e77d..309f7a4c8 100644
--- a/tcl/board/st_nucleo_g4.cfg
+++ b/tcl/board/st_nucleo_g4.cfg
@@ -12,7 +12,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32g4x.cfg]
diff --git a/tcl/board/st_nucleo_h743zi.cfg b/tcl/board/st_nucleo_h743zi.cfg
index b857b00e0..be2d42fb8 100644
--- a/tcl/board/st_nucleo_h743zi.cfg
+++ b/tcl/board/st_nucleo_h743zi.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32h7x_dual_bank.cfg]
diff --git a/tcl/board/st_nucleo_h745zi.cfg b/tcl/board/st_nucleo_h745zi.cfg
index ad563b7d3..84865f422 100644
--- a/tcl/board/st_nucleo_h745zi.cfg
+++ b/tcl/board/st_nucleo_h745zi.cfg
@@ -2,7 +2,7 @@
# This is an ST NUCLEO-H745ZI-Q board with single STM32H745ZITx chip.
-source [find interface/stlink-dap.cfg]
+source [find interface/stlink.cfg]
transport select dapdirect_swd
# STM32H745xx devices are dual core (Cortex-M7 and Cortex-M4)
diff --git a/tcl/board/st_nucleo_l073rz.cfg b/tcl/board/st_nucleo_l073rz.cfg
index 10fac5ef8..317c86e21 100644
--- a/tcl/board/st_nucleo_l073rz.cfg
+++ b/tcl/board/st_nucleo_l073rz.cfg
@@ -4,7 +4,7 @@
# http://www.st.com/en/evaluation-tools/nucleo-l073rz.html
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
set WORKAREASIZE 0x2000
diff --git a/tcl/board/st_nucleo_l1.cfg b/tcl/board/st_nucleo_l1.cfg
index 50688d2b6..d7474d0fe 100644
--- a/tcl/board/st_nucleo_l1.cfg
+++ b/tcl/board/st_nucleo_l1.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32l1x_dual_bank.cfg]
diff --git a/tcl/board/st_nucleo_l4.cfg b/tcl/board/st_nucleo_l4.cfg
index 8c63d8cbf..b0a75afe0 100644
--- a/tcl/board/st_nucleo_l4.cfg
+++ b/tcl/board/st_nucleo_l4.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32l4x.cfg]
diff --git a/tcl/board/st_nucleo_l5.cfg b/tcl/board/st_nucleo_l5.cfg
index 6450f08b8..626914aa7 100644
--- a/tcl/board/st_nucleo_l5.cfg
+++ b/tcl/board/st_nucleo_l5.cfg
@@ -3,7 +3,7 @@
# This is for STM32L5 Nucleo Dev Boards.
# http://www.st.com/en/evaluation-tools/stm32-mcu-nucleo.html
-source [find interface/stlink-dap.cfg]
+source [find interface/stlink.cfg]
transport select dapdirect_swd
diff --git a/tcl/board/st_nucleo_wb55.cfg b/tcl/board/st_nucleo_wb55.cfg
index 29b7ec98d..ab7307c68 100644
--- a/tcl/board/st_nucleo_wb55.cfg
+++ b/tcl/board/st_nucleo_wb55.cfg
@@ -6,7 +6,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32wbx.cfg]
diff --git a/tcl/board/stm320518_eval_stlink.cfg b/tcl/board/stm320518_eval_stlink.cfg
index 153f7e5cb..997bb4af9 100644
--- a/tcl/board/stm320518_eval_stlink.cfg
+++ b/tcl/board/stm320518_eval_stlink.cfg
@@ -8,7 +8,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 8KB
set WORKAREASIZE 0x2000
diff --git a/tcl/board/stm3220g_eval_stlink.cfg b/tcl/board/stm3220g_eval_stlink.cfg
index d5296720c..4233d04f1 100644
--- a/tcl/board/stm3220g_eval_stlink.cfg
+++ b/tcl/board/stm3220g_eval_stlink.cfg
@@ -8,7 +8,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 128KB
set WORKAREASIZE 0x20000
diff --git a/tcl/board/stm3241g_eval_stlink.cfg b/tcl/board/stm3241g_eval_stlink.cfg
index d2d579077..3bccd2866 100644
--- a/tcl/board/stm3241g_eval_stlink.cfg
+++ b/tcl/board/stm3241g_eval_stlink.cfg
@@ -8,7 +8,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 128KB
set WORKAREASIZE 0x20000
diff --git a/tcl/board/stm32429i_eval_stlink.cfg b/tcl/board/stm32429i_eval_stlink.cfg
index be3c48226..7d04aa7f3 100644
--- a/tcl/board/stm32429i_eval_stlink.cfg
+++ b/tcl/board/stm32429i_eval_stlink.cfg
@@ -8,7 +8,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 128KB
set WORKAREASIZE 0x20000
diff --git a/tcl/board/stm32439i_eval_stlink.cfg b/tcl/board/stm32439i_eval_stlink.cfg
index 7a1a396fc..b9ea084df 100644
--- a/tcl/board/stm32439i_eval_stlink.cfg
+++ b/tcl/board/stm32439i_eval_stlink.cfg
@@ -8,7 +8,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 128KB
set WORKAREASIZE 0x20000
diff --git a/tcl/board/stm32f0discovery.cfg b/tcl/board/stm32f0discovery.cfg
index 60fb4a65e..398ecc103 100644
--- a/tcl/board/stm32f0discovery.cfg
+++ b/tcl/board/stm32f0discovery.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
set WORKAREASIZE 0x2000
source [find target/stm32f0x.cfg]
diff --git a/tcl/board/stm32f3discovery.cfg b/tcl/board/stm32f3discovery.cfg
index f28e11f6a..73c349a6e 100644
--- a/tcl/board/stm32f3discovery.cfg
+++ b/tcl/board/stm32f3discovery.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32f3x.cfg]
diff --git a/tcl/board/stm32f412g-disco.cfg b/tcl/board/stm32f412g-disco.cfg
index 757b25d75..30a9537f0 100644
--- a/tcl/board/stm32f412g-disco.cfg
+++ b/tcl/board/stm32f412g-disco.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 128KB
set WORKAREASIZE 0x20000
diff --git a/tcl/board/stm32f413h-disco.cfg b/tcl/board/stm32f413h-disco.cfg
index 6abf49551..c82d0d434 100644
--- a/tcl/board/stm32f413h-disco.cfg
+++ b/tcl/board/stm32f413h-disco.cfg
@@ -10,7 +10,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 128KB
set WORKAREASIZE 0x20000
diff --git a/tcl/board/stm32f429disc1.cfg b/tcl/board/stm32f429disc1.cfg
index 657aa1986..0a8e7ef4e 100644
--- a/tcl/board/stm32f429disc1.cfg
+++ b/tcl/board/stm32f429disc1.cfg
@@ -7,7 +7,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32f4x.cfg]
diff --git a/tcl/board/stm32f429discovery.cfg b/tcl/board/stm32f429discovery.cfg
index d1b5f5a11..865602ab6 100644
--- a/tcl/board/stm32f429discovery.cfg
+++ b/tcl/board/stm32f429discovery.cfg
@@ -7,7 +7,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 128KB
set WORKAREASIZE 0x20000
diff --git a/tcl/board/stm32f469discovery.cfg b/tcl/board/stm32f469discovery.cfg
index cca25b7f0..c9acbbbd0 100644
--- a/tcl/board/stm32f469discovery.cfg
+++ b/tcl/board/stm32f469discovery.cfg
@@ -7,7 +7,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 128KB
set WORKAREASIZE 0x20000
diff --git a/tcl/board/stm32f469i-disco.cfg b/tcl/board/stm32f469i-disco.cfg
index 7ce57f6e7..63c42c64e 100644
--- a/tcl/board/stm32f469i-disco.cfg
+++ b/tcl/board/stm32f469i-disco.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 128KB
set WORKAREASIZE 0x20000
diff --git a/tcl/board/stm32f4discovery.cfg b/tcl/board/stm32f4discovery.cfg
index 714f1e903..d96e2dbd3 100644
--- a/tcl/board/stm32f4discovery.cfg
+++ b/tcl/board/stm32f4discovery.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 64KB
set WORKAREASIZE 0x10000
diff --git a/tcl/board/stm32f723e-disco.cfg b/tcl/board/stm32f723e-disco.cfg
index 2dee2f902..020795620 100644
--- a/tcl/board/stm32f723e-disco.cfg
+++ b/tcl/board/stm32f723e-disco.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 128KB
set WORKAREASIZE 0x20000
diff --git a/tcl/board/stm32f746g-disco.cfg b/tcl/board/stm32f746g-disco.cfg
index fed1d8ec9..75ff4ec1e 100644
--- a/tcl/board/stm32f746g-disco.cfg
+++ b/tcl/board/stm32f746g-disco.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 256KB
set WORKAREASIZE 0x40000
diff --git a/tcl/board/stm32f769i-disco.cfg b/tcl/board/stm32f769i-disco.cfg
index 2969bb927..cd6383a70 100644
--- a/tcl/board/stm32f769i-disco.cfg
+++ b/tcl/board/stm32f769i-disco.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 256KB
set WORKAREASIZE 0x40000
diff --git a/tcl/board/stm32f7discovery.cfg b/tcl/board/stm32f7discovery.cfg
index 4cc22ea62..6fd6c64b3 100644
--- a/tcl/board/stm32f7discovery.cfg
+++ b/tcl/board/stm32f7discovery.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK/V2-1
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 256KB
set WORKAREASIZE 0x40000
diff --git a/tcl/board/stm32h735g-disco.cfg b/tcl/board/stm32h735g-disco.cfg
index 4097ae28b..327a36418 100644
--- a/tcl/board/stm32h735g-disco.cfg
+++ b/tcl/board/stm32h735g-disco.cfg
@@ -7,7 +7,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
set CHIPNAME stm32h735igk6
diff --git a/tcl/board/stm32h745i-disco.cfg b/tcl/board/stm32h745i-disco.cfg
index 1c0bc6748..9da1daefc 100644
--- a/tcl/board/stm32h745i-disco.cfg
+++ b/tcl/board/stm32h745i-disco.cfg
@@ -7,7 +7,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
set CHIPNAME stm32h745xih6
diff --git a/tcl/board/stm32h747i-disco.cfg b/tcl/board/stm32h747i-disco.cfg
index e0a348ef0..7f8eda8c4 100644
--- a/tcl/board/stm32h747i-disco.cfg
+++ b/tcl/board/stm32h747i-disco.cfg
@@ -7,7 +7,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
set CHIPNAME stm32h747xih6
diff --git a/tcl/board/stm32h750b-disco.cfg b/tcl/board/stm32h750b-disco.cfg
index efb32b1df..8b254f21f 100644
--- a/tcl/board/stm32h750b-disco.cfg
+++ b/tcl/board/stm32h750b-disco.cfg
@@ -7,7 +7,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
set CHIPNAME stm32h750xbh6
diff --git a/tcl/board/stm32h7b3i-disco.cfg b/tcl/board/stm32h7b3i-disco.cfg
index 58ad9f781..df0d0a6f2 100644
--- a/tcl/board/stm32h7b3i-disco.cfg
+++ b/tcl/board/stm32h7b3i-disco.cfg
@@ -7,7 +7,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
set CHIPNAME stm32h7b3lih6q
diff --git a/tcl/board/stm32h7x3i_eval.cfg b/tcl/board/stm32h7x3i_eval.cfg
index b9c4c74c2..508f10d5d 100644
--- a/tcl/board/stm32h7x3i_eval.cfg
+++ b/tcl/board/stm32h7x3i_eval.cfg
@@ -8,7 +8,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32h7x_dual_bank.cfg]
diff --git a/tcl/board/stm32l0discovery.cfg b/tcl/board/stm32l0discovery.cfg
index c711d9c8a..59aed3405 100644
--- a/tcl/board/stm32l0discovery.cfg
+++ b/tcl/board/stm32l0discovery.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
set WORKAREASIZE 0x2000
source [find target/stm32l0.cfg]
diff --git a/tcl/board/stm32l476g-disco.cfg b/tcl/board/stm32l476g-disco.cfg
index a32d20fb3..fe33ffefb 100644
--- a/tcl/board/stm32l476g-disco.cfg
+++ b/tcl/board/stm32l476g-disco.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 96KB
set WORKAREASIZE 0x18000
diff --git a/tcl/board/stm32l496g-disco.cfg b/tcl/board/stm32l496g-disco.cfg
index 1ba2299ca..823fa6e38 100644
--- a/tcl/board/stm32l496g-disco.cfg
+++ b/tcl/board/stm32l496g-disco.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 96KB
set WORKAREASIZE 0x18000
diff --git a/tcl/board/stm32l4discovery.cfg b/tcl/board/stm32l4discovery.cfg
index f08955078..64a456b61 100644
--- a/tcl/board/stm32l4discovery.cfg
+++ b/tcl/board/stm32l4discovery.cfg
@@ -8,7 +8,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
source [find target/stm32l4x.cfg]
diff --git a/tcl/board/stm32l4p5g-disco.cfg b/tcl/board/stm32l4p5g-disco.cfg
index 20d781a1a..33bb9a766 100644
--- a/tcl/board/stm32l4p5g-disco.cfg
+++ b/tcl/board/stm32l4p5g-disco.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 96KB
set WORKAREASIZE 0x18000
diff --git a/tcl/board/stm32l4r9i-disco.cfg b/tcl/board/stm32l4r9i-disco.cfg
index f364ad3d5..cbb86669f 100644
--- a/tcl/board/stm32l4r9i-disco.cfg
+++ b/tcl/board/stm32l4r9i-disco.cfg
@@ -6,7 +6,7 @@
# This is for using the onboard STLINK
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
# increase working area to 96KB
set WORKAREASIZE 0x18000
diff --git a/tcl/board/stm32ldiscovery.cfg b/tcl/board/stm32ldiscovery.cfg
index d760edaba..e39b52295 100644
--- a/tcl/board/stm32ldiscovery.cfg
+++ b/tcl/board/stm32ldiscovery.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
set WORKAREASIZE 0x4000
source [find target/stm32l1.cfg]
diff --git a/tcl/board/stm32mp13x_dk.cfg b/tcl/board/stm32mp13x_dk.cfg
index 6328ddb4c..08377ca76 100644
--- a/tcl/board/stm32mp13x_dk.cfg
+++ b/tcl/board/stm32mp13x_dk.cfg
@@ -3,7 +3,7 @@
# board MB1635x
# http://www.st.com/en/evaluation-tools/stm32mp135f-dk.html
-source [find interface/stlink-dap.cfg]
+source [find interface/stlink.cfg]
transport select dapdirect_swd
diff --git a/tcl/board/stm32mp15x_dk2.cfg b/tcl/board/stm32mp15x_dk2.cfg
index 9503428d1..0e71e05ee 100644
--- a/tcl/board/stm32mp15x_dk2.cfg
+++ b/tcl/board/stm32mp15x_dk2.cfg
@@ -4,7 +4,7 @@
# http://www.st.com/en/evaluation-tools/stm32mp157a-dk1.html
# http://www.st.com/en/evaluation-tools/stm32mp157c-dk2.html
-source [find interface/stlink-dap.cfg]
+source [find interface/stlink.cfg]
transport select dapdirect_swd
diff --git a/tcl/board/stm32vldiscovery.cfg b/tcl/board/stm32vldiscovery.cfg
index 30e35b981..57852bfd4 100644
--- a/tcl/board/stm32vldiscovery.cfg
+++ b/tcl/board/stm32vldiscovery.cfg
@@ -5,7 +5,7 @@
source [find interface/stlink.cfg]
-transport select hla_swd
+transport select dapdirect_swd
set WORKAREASIZE 0x2000
source [find target/stm32f1x.cfg]
diff --git a/tcl/interface/stlink-dap.cfg b/tcl/interface/stlink-dap.cfg
index 99c81c180..009fdb7e0 100644
--- a/tcl/interface/stlink-dap.cfg
+++ b/tcl/interface/stlink-dap.cfg
@@ -1,22 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
-#
-# STMicroelectronics ST-LINK/V1, ST-LINK/V2, ST-LINK/V2-1, STLINK-V3 in-circuit
-# debugger/programmer
-#
-# This new interface driver creates a ST-Link wrapper for ARM-DAP named "dapdirect"
-# Old ST-LINK/V1 and ST-LINK/V2 pre version V2J24 don't support "dapdirect"
-#
-# SWIM transport is natively supported
-#
+echo "WARNING: interface/stlink-dap.cfg is deprecated, please switch to interface/stlink.cfg"
+source [find interface/stlink.cfg]
-adapter driver st-link
-st-link vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b 0x0483 0x374d 0x0483 0x374e 0x0483 0x374f 0x0483 0x3752 0x0483 0x3753 0x0483 0x3754 0x0483 0x3755 0x0483 0x3757
-
-# transport select dapdirect_jtag
-# transport select dapdirect_swd
-# transport select swim
-
-# Optionally specify the serial number of usb device
-# e.g.
-# adapter serial "\xaa\xbc\x6e\x06\x50\x75\xff\x55\x17\x42\x19\x3f"
diff --git a/tcl/interface/stlink.cfg b/tcl/interface/stlink-hla.cfg
similarity index 81%
copy from tcl/interface/stlink.cfg
copy to tcl/interface/stlink-hla.cfg
index 9b7f1f9eb..5c4adb897 100644
--- a/tcl/interface/stlink.cfg
+++ b/tcl/interface/stlink-hla.cfg
@@ -5,6 +5,9 @@
# debugger/programmer
#
+echo "DEPRECATED: OpenOCD support for ST-Link HLA transport will be dropped soon!"
+echo "Consider updating your ST-Link firmware to a version >= V2J24 (2015)"
+
adapter driver hla
hla layout stlink
hla device_desc "ST-LINK"
diff --git a/tcl/interface/stlink.cfg b/tcl/interface/stlink.cfg
index 9b7f1f9eb..99c81c180 100644
--- a/tcl/interface/stlink.cfg
+++ b/tcl/interface/stlink.cfg
@@ -4,15 +4,19 @@
# STMicroelectronics ST-LINK/V1, ST-LINK/V2, ST-LINK/V2-1, STLINK-V3 in-circuit
# debugger/programmer
#
+# This new interface driver creates a ST-Link wrapper for ARM-DAP named "dapdirect"
+# Old ST-LINK/V1 and ST-LINK/V2 pre version V2J24 don't support "dapdirect"
+#
+# SWIM transport is natively supported
+#
+
+adapter driver st-link
+st-link vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b 0x0483 0x374d 0x0483 0x374e 0x0483 0x374f 0x0483 0x3752 0x0483 0x3753 0x0483 0x3754 0x0483 0x3755 0x0483 0x3757
-adapter driver hla
-hla layout stlink
-hla device_desc "ST-LINK"
-hla vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b 0x0483 0x374d 0x0483 0x374e 0x0483 0x374f 0x0483 0x3752 0x0483 0x3753 0x0483 0x3754 0x0483 0x3755 0x0483 0x3757
+# transport select dapdirect_jtag
+# transport select dapdirect_swd
+# transport select swim
-# Optionally specify the serial number of ST-LINK/V2 usb device. ST-LINK/V2
-# devices seem to have serial numbers with unreadable characters. ST-LINK/V2
-# firmware version >= V2.J21.S4 recommended to avoid issues with adapter serial
-# number reset issues.
-# eg.
+# Optionally specify the serial number of usb device
+# e.g.
# adapter serial "\xaa\xbc\x6e\x06\x50\x75\xff\x55\x17\x42\x19\x3f"
-----------------------------------------------------------------------
Summary of changes:
doc/openocd.texi | 20 +++++++-------------
tcl/board/st_b-l475e-iot01a.cfg | 2 +-
tcl/board/st_nucleo_8l152r8.cfg | 2 +-
tcl/board/st_nucleo_8s208rb.cfg | 2 +-
tcl/board/st_nucleo_f0.cfg | 2 +-
tcl/board/st_nucleo_f103rb.cfg | 2 +-
tcl/board/st_nucleo_f3.cfg | 2 +-
tcl/board/st_nucleo_f4.cfg | 2 +-
tcl/board/st_nucleo_f7.cfg | 2 +-
tcl/board/st_nucleo_g0.cfg | 2 +-
tcl/board/st_nucleo_g4.cfg | 2 +-
tcl/board/st_nucleo_h743zi.cfg | 2 +-
tcl/board/st_nucleo_h745zi.cfg | 2 +-
tcl/board/st_nucleo_l073rz.cfg | 2 +-
tcl/board/st_nucleo_l1.cfg | 2 +-
tcl/board/st_nucleo_l4.cfg | 2 +-
tcl/board/st_nucleo_l5.cfg | 2 +-
tcl/board/st_nucleo_wb55.cfg | 2 +-
tcl/board/stm320518_eval_stlink.cfg | 2 +-
tcl/board/stm3220g_eval_stlink.cfg | 2 +-
tcl/board/stm3241g_eval_stlink.cfg | 2 +-
tcl/board/stm32429i_eval_stlink.cfg | 2 +-
tcl/board/stm32439i_eval_stlink.cfg | 2 +-
tcl/board/stm32f0discovery.cfg | 2 +-
tcl/board/stm32f3discovery.cfg | 2 +-
tcl/board/stm32f412g-disco.cfg | 2 +-
tcl/board/stm32f413h-disco.cfg | 2 +-
tcl/board/stm32f429disc1.cfg | 2 +-
tcl/board/stm32f429discovery.cfg | 2 +-
tcl/board/stm32f469discovery.cfg | 2 +-
tcl/board/stm32f469i-disco.cfg | 2 +-
tcl/board/stm32f4discovery.cfg | 2 +-
tcl/board/stm32f723e-disco.cfg | 2 +-
tcl/board/stm32f746g-disco.cfg | 2 +-
tcl/board/stm32f769i-disco.cfg | 2 +-
tcl/board/stm32f7discovery.cfg | 2 +-
tcl/board/stm32h735g-disco.cfg | 2 +-
tcl/board/stm32h745i-disco.cfg | 2 +-
tcl/board/stm32h747i-disco.cfg | 2 +-
tcl/board/stm32h750b-disco.cfg | 2 +-
tcl/board/stm32h7b3i-disco.cfg | 2 +-
tcl/board/stm32h7x3i_eval.cfg | 2 +-
tcl/board/stm32l0discovery.cfg | 2 +-
tcl/board/stm32l476g-disco.cfg | 2 +-
tcl/board/stm32l496g-disco.cfg | 2 +-
tcl/board/stm32l4discovery.cfg | 2 +-
tcl/board/stm32l4p5g-disco.cfg | 2 +-
tcl/board/stm32l4r9i-disco.cfg | 2 +-
tcl/board/stm32ldiscovery.cfg | 2 +-
tcl/board/stm32mp13x_dk.cfg | 2 +-
tcl/board/stm32mp15x_dk2.cfg | 2 +-
tcl/board/stm32vldiscovery.cfg | 2 +-
tcl/interface/stlink-dap.cfg | 21 ++-------------------
tcl/interface/{stlink.cfg => stlink-hla.cfg} | 3 +++
tcl/interface/stlink.cfg | 22 +++++++++++++---------
55 files changed, 76 insertions(+), 92 deletions(-)
copy tcl/interface/{stlink.cfg => stlink-hla.cfg} (81%)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 21:00:20
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 3ce0962f2c525595bcbd0bd5da73673e236fc42d (commit)
from 7214c8be46f749f210e00d334c30883bd73cca03 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3ce0962f2c525595bcbd0bd5da73673e236fc42d
Author: Antonio Borneo <bor...@gm...>
Date: Mon Jul 15 11:56:36 2024 +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 <bor...@gm...>
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 <va...@fb...>
Tested-by: jenkins
diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index bd0e8d886..e78d2e29b 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -989,6 +989,18 @@ static int cortex_m_poll_one(struct target *target)
* and keep it until the next poll to allow its detection */
return ERROR_OK;
}
+
+ /* refresh status bits */
+ retval = cortex_m_read_dhcsr_atomic_sticky(target);
+ if (retval != ERROR_OK)
+ return retval;
+
+ /* If still under reset, quit and re-check at next poll */
+ if (cortex_m->dcb_dhcsr_cumulated_sticky & S_RESET_ST) {
+ cortex_m->dcb_dhcsr_cumulated_sticky &= ~S_RESET_ST;
+ return ERROR_OK;
+ }
+
/* S_RESET_ST was expected (in a reset command). Continue processing
* to quickly get out of TARGET_RESET state */
}
-----------------------------------------------------------------------
Summary of changes:
src/target/cortex_m.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-11-02 20:59:43
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 7214c8be46f749f210e00d334c30883bd73cca03 (commit)
from d09ff476446a5403e556476b41a5a3c9bdf0a706 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7214c8be46f749f210e00d334c30883bd73cca03
Author: R. Diez <rdi...@ya...>
Date: Sat Jun 1 21:20:31 2024 +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 <rdi...@ya...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8312
Tested-by: jenkins
Reviewed-by: R. Diez <rdi...@rd...>
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/configure.ac b/configure.ac
index 07e06551f..9355ffb93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,12 +104,18 @@ AS_IF([test -x "$srcdir/guess-rev.sh"], [
AC_MSG_RESULT([$build_release])
# Adapter drivers
-# 1st column -- configure option
-# 2nd column -- description
-# 3rd column -- symbol used for both config.h and automake
+# 1st column -- Basename for the configure option generated with AC_ARG_ENABLE.
+# For example, "buspirate" generates options "--enable-buspirate[=yes/no]"
+# and "--disable-buspirate".
+# 2nd column -- Description for the configure option. For example, "Bus Pirate"
+# generates "Enable building support for the Bus Pirate (default is auto)".
+# 3rd column -- Basename for the config.h and Automake symbols.
+# For example, basename "BUS_PIRATE" generates "BUILD_BUS_PIRATE" with AC_DEFINE
+# for config.h and "BUS_PIRATE" with AM_CONDITIONAL for Automake.
m4_define([ADAPTER_ARG], [m4_argn([1], $1)])
m4_define([ADAPTER_DESC], [m4_argn([2], $1)])
m4_define([ADAPTER_SYM], [m4_argn([3], $1)])
+# AC_ARG_ENABLE uses prefix "enable_" to name the corresponding option variable.
m4_define([ADAPTER_VAR], [enable_[]ADAPTER_ARG($1)])
m4_define([ADAPTER_OPT], [m4_translit(ADAPTER_ARG($1), [_], [-])])
@@ -264,6 +270,7 @@ AC_ARG_ADAPTERS([
LIBFTDI_USB1_ADAPTERS
LIBGPIOD_ADAPTERS,
SERIAL_PORT_ADAPTERS,
+ PCIE_ADAPTERS,
LIBJAYLINK_ADAPTERS
],[auto])
@@ -340,12 +347,10 @@ AC_ARG_ENABLE([sysfsgpio],
AS_HELP_STRING([--enable-sysfsgpio], [Enable building support for programming driven via sysfs gpios.]),
[build_sysfsgpio=$enableval], [build_sysfsgpio=no])
-AC_ARG_ENABLE([xlnx_pcie_xvc],
- AS_HELP_STRING([--enable-xlnx-pcie-xvc], [Enable building support for Xilinx XVC/PCIe.]),
- [build_xlnx_pcie_xvc=$enableval], [build_xlnx_pcie_xvc=no])
-
AS_CASE([$host_os],
- [linux*], [],
+ [linux*], [
+ is_linux=yes
+ ],
[
AS_IF([test "x$build_sysfsgpio" = "xyes"], [
AC_MSG_ERROR([sysfsgpio is only available on linux])
@@ -355,10 +360,6 @@ AS_CASE([$host_os],
AC_MSG_ERROR([linuxgpiod is only available on linux])
])
- AS_IF([test "x$build_xlnx_pcie_xvc" = "xyes"], [
- AC_MSG_ERROR([xlnx_pcie_xvc is only available on linux])
- ])
-
AS_CASE([$host_os], [freebsd*], [],
[
AS_IF([test "x$build_rshim" = "xyes"], [
@@ -619,13 +620,6 @@ AS_IF([test "x$build_sysfsgpio" = "xyes"], [
AC_DEFINE([BUILD_SYSFSGPIO], [0], [0 if you don't want SysfsGPIO driver.])
])
-AS_IF([test "x$build_xlnx_pcie_xvc" = "xyes"], [
- build_xlnx_pcie_xvc=yes
- AC_DEFINE([BUILD_XLNX_PCIE_XVC], [1], [1 if you want the Xilinx XVC/PCIe driver.])
-], [
- AC_DEFINE([BUILD_XLNX_PCIE_XVC], [0], [0 if you don't want Xilinx XVC/PCIe driver.])
-])
-
PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0], [
use_libusb1=yes
AC_DEFINE([HAVE_LIBUSB1], [1], [Define if you have libusb-1.x])
@@ -687,11 +681,11 @@ PKG_CHECK_MODULES([LIBGPIOD], [libgpiod < 2.0], [
PKG_CHECK_MODULES([LIBJAYLINK], [libjaylink >= 0.2],
[use_libjaylink=yes], [use_libjaylink=no])
-# Arg $1: The adapter name, used to derive option and variable names for the adapter.
-# Arg $2: Whether the adapter can be enabled, for example, because
-# its prerequisites are installed in the system.
+# Arg $1: An array of adapter triplets, used to derive option and variable names for each adapter.
+# Arg $2: Whether the adapters can be enabled, for example, because
+# their prerequisites are installed in the system.
# Arg $3: What prerequisites are missing, to be shown in an error message
-# if the adapter was requested but cannot be enabled.
+# if an adapter was requested but cannot be enabled.
m4_define([PROCESS_ADAPTERS], [
m4_foreach([adapter], [$1], [
AS_IF([test $2], [
@@ -702,7 +696,7 @@ m4_define([PROCESS_ADAPTERS], [
])
], [
AS_IF([test "x$ADAPTER_VAR([adapter])" = "xyes"], [
- AC_MSG_ERROR([$3 is required for the ADAPTER_DESC([adapter])])
+ AC_MSG_ERROR([$3 is required for [adapter] ADAPTER_DESC([adapter]).])
])
ADAPTER_VAR([adapter])=no
AC_DEFINE([BUILD_]ADAPTER_SYM([adapter]), [0], [0 if you do not want the ]ADAPTER_DESC([adapter]).)
@@ -718,6 +712,7 @@ PROCESS_ADAPTERS([LIBFTDI_ADAPTERS], ["x$use_libftdi" = "xyes"], [libftdi])
PROCESS_ADAPTERS([LIBFTDI_USB1_ADAPTERS], ["x$use_libftdi" = "xyes" -a "x$use_libusb1" = "xyes"], [libftdi and libusb-1.x])
PROCESS_ADAPTERS([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [libgpiod])
PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2])
+PROCESS_ADAPTERS([PCIE_ADAPTERS], ["x$is_linux" = "xyes"], [Linux build])
PROCESS_ADAPTERS([DUMMY_ADAPTER], [true], [unused])
AS_IF([test "x$enable_linuxgpiod" != "xno"], [
@@ -774,7 +769,6 @@ AM_CONDITIONAL([GW16012], [test "x$build_gw16012" = "xyes"])
AM_CONDITIONAL([REMOTE_BITBANG], [test "x$build_remote_bitbang" = "xyes"])
AM_CONDITIONAL([BUSPIRATE], [test "x$enable_buspirate" != "xno"])
AM_CONDITIONAL([SYSFSGPIO], [test "x$build_sysfsgpio" = "xyes"])
-AM_CONDITIONAL([XLNX_PCIE_XVC], [test "x$build_xlnx_pcie_xvc" = "xyes"])
AM_CONDITIONAL([USE_LIBUSB1], [test "x$use_libusb1" = "xyes"])
AM_CONDITIONAL([IS_CYGWIN], [test "x$is_cygwin" = "xyes"])
AM_CONDITIONAL([IS_MINGW], [test "x$is_mingw" = "xyes"])
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 44 +++++++++++++++++++-------------------------
1 file changed, 19 insertions(+), 25 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-10-20 09:25:54
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via d09ff476446a5403e556476b41a5a3c9bdf0a706 (commit)
from 114ca19f64d8af5365ecf171cc2adc45a763a406 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d09ff476446a5403e556476b41a5a3c9bdf0a706
Author: Jan Matyas <jan...@co...>
Date: Mon Sep 30 14:55:58 2024 +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...@co...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8517
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/src/helper/log.c b/src/helper/log.c
index 62ba4da4c..9ad00ce62 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -505,7 +505,7 @@ void log_socket_error(const char *socket_desc)
* Find the first non-printable character in the char buffer, return a pointer to it.
* If no such character exists, return NULL.
*/
-char *find_nonprint_char(char *buf, unsigned int buf_len)
+const char *find_nonprint_char(const char *buf, unsigned int buf_len)
{
for (unsigned int i = 0; i < buf_len; i++) {
if (!isprint(buf[i]))
diff --git a/src/helper/log.h b/src/helper/log.h
index 0f11cfa9a..dc8df6fbb 100644
--- a/src/helper/log.h
+++ b/src/helper/log.h
@@ -89,7 +89,7 @@ char *alloc_vprintf(const char *fmt, va_list ap);
char *alloc_printf(const char *fmt, ...)
__attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 1, 2)));
-char *find_nonprint_char(char *buf, unsigned int buf_len);
+const char *find_nonprint_char(const char *buf, unsigned int buf_len);
extern int debug_level;
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index c1e5e268f..579a388d2 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -335,7 +335,7 @@ static int gdb_putback_char(struct connection *connection, int last_char)
/* The only way we can detect that the socket is closed is the first time
* we write to it, we will fail. Subsequent write operations will
* succeed. Shudder! */
-static int gdb_write(struct connection *connection, void *data, int len)
+static int gdb_write(struct connection *connection, const void *data, int len)
{
struct gdb_connection *gdb_con = connection->priv;
if (gdb_con->closed) {
@@ -351,7 +351,7 @@ static int gdb_write(struct connection *connection, void *data, int len)
return ERROR_SERVER_REMOTE_CLOSED;
}
-static void gdb_log_incoming_packet(struct connection *connection, char *packet)
+static void gdb_log_incoming_packet(struct connection *connection, const char *packet)
{
if (!LOG_LEVEL_IS(LOG_LVL_DEBUG))
return;
@@ -384,7 +384,7 @@ static void gdb_log_incoming_packet(struct connection *connection, char *packet)
}
}
-static void gdb_log_outgoing_packet(struct connection *connection, char *packet_buf,
+static void gdb_log_outgoing_packet(struct connection *connection, const char *packet_buf,
unsigned int packet_len, unsigned char checksum)
{
if (!LOG_LEVEL_IS(LOG_LVL_DEBUG))
@@ -402,7 +402,7 @@ static void gdb_log_outgoing_packet(struct connection *connection, char *packet_
}
static int gdb_put_packet_inner(struct connection *connection,
- char *buffer, int len)
+ const char *buffer, int len)
{
int i;
unsigned char my_checksum = 0;
@@ -522,7 +522,7 @@ static int gdb_put_packet_inner(struct connection *connection,
return ERROR_OK;
}
-int gdb_put_packet(struct connection *connection, char *buffer, int len)
+int gdb_put_packet(struct connection *connection, const char *buffer, int len)
{
struct gdb_connection *gdb_con = connection->priv;
gdb_con->busy = true;
diff --git a/src/server/gdb_server.h b/src/server/gdb_server.h
index 4288ceb87..1a626ebd9 100644
--- a/src/server/gdb_server.h
+++ b/src/server/gdb_server.h
@@ -28,7 +28,7 @@ int gdb_target_add_all(struct target *target);
int gdb_register_commands(struct command_context *command_context);
void gdb_service_free(void);
-int gdb_put_packet(struct connection *connection, char *buffer, int len);
+int gdb_put_packet(struct connection *connection, const char *buffer, int len);
int gdb_get_actual_connections(void);
-----------------------------------------------------------------------
Summary of changes:
src/helper/log.c | 2 +-
src/helper/log.h | 2 +-
src/server/gdb_server.c | 10 +++++-----
src/server/gdb_server.h | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-10-20 09:25:12
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 114ca19f64d8af5365ecf171cc2adc45a763a406 (commit)
from 21a211d547406d2639ed02256f491ead93a22a20 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 114ca19f64d8af5365ecf171cc2adc45a763a406
Author: Jan Matyas <jan...@co...>
Date: Thu Oct 3 09:59:24 2024 +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...@co...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8518
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/.gitignore b/.gitignore
index 103dad2c7..5de33077e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -84,6 +84,9 @@ patches
.cproject
.settings
+# VSCode stuff
+.vscode
+
# Emacs temp files
*~
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 3 +++
1 file changed, 3 insertions(+)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-10-20 09:24:47
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 21a211d547406d2639ed02256f491ead93a22a20 (commit)
from fec3b224214e3784b0c00970d2421212402da880 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 21a211d547406d2639ed02256f491ead93a22a20
Author: Florian Fainelli <f.f...@gm...>
Date: Tue Aug 6 15:28:15 2024 -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.f...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8430
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index 3a5afc605..eaaa209b9 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -1532,6 +1532,7 @@ static const struct dap_part_nums {
{ ARM_ID, 0xc17, "Cortex-R7 Debug", "(Debug Unit)", },
{ ARM_ID, 0xd03, "Cortex-A53 Debug", "(Debug Unit)", },
{ ARM_ID, 0xd04, "Cortex-A35 Debug", "(Debug Unit)", },
+ { ARM_ID, 0xd05, "Cortex-A55 Debug", "(Debug Unit)", },
{ ARM_ID, 0xd07, "Cortex-A57 Debug", "(Debug Unit)", },
{ ARM_ID, 0xd08, "Cortex-A72 Debug", "(Debug Unit)", },
{ ARM_ID, 0xd0b, "Cortex-A76 Debug", "(Debug Unit)", },
-----------------------------------------------------------------------
Summary of changes:
src/target/arm_adi_v5.c | 1 +
1 file changed, 1 insertion(+)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-10-20 09:23:40
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via fec3b224214e3784b0c00970d2421212402da880 (commit)
from 957eb741a0980408fe4d0682fccb99a183f90998 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fec3b224214e3784b0c00970d2421212402da880
Author: Antonio Borneo <bor...@gm...>
Date: Sun Sep 8 21:47:31 2024 +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 <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8484
Tested-by: jenkins
diff --git a/src/target/riscv/batch.c b/src/target/riscv/batch.c
index 859e2275e..e3f8ff3d4 100644
--- a/src/target/riscv/batch.c
+++ b/src/target/riscv/batch.c
@@ -156,14 +156,14 @@ size_t riscv_batch_add_dmi_read(struct riscv_batch *batch, unsigned int address)
return batch->read_keys_used++;
}
-unsigned int riscv_batch_get_dmi_read_op(struct riscv_batch *batch, size_t key)
+uint32_t riscv_batch_get_dmi_read_op(struct riscv_batch *batch, size_t key)
{
assert(key < batch->read_keys_used);
size_t index = batch->read_keys[key];
assert(index <= batch->used_scans);
uint8_t *base = batch->data_in + DMI_SCAN_BUF_SIZE * index;
/* extract "op" field from the DMI read result */
- return (unsigned)buf_get_u32(base, DTM_DMI_OP_OFFSET, DTM_DMI_OP_LENGTH);
+ return buf_get_u32(base, DTM_DMI_OP_OFFSET, DTM_DMI_OP_LENGTH);
}
uint32_t riscv_batch_get_dmi_read_data(struct riscv_batch *batch, size_t key)
diff --git a/src/target/riscv/batch.h b/src/target/riscv/batch.h
index e5b94cc21..537fa5923 100644
--- a/src/target/riscv/batch.h
+++ b/src/target/riscv/batch.h
@@ -65,7 +65,7 @@ void riscv_batch_add_dmi_write(struct riscv_batch *batch, unsigned int address,
* provides a key, the second one actually obtains the result of the read -
* status (op) and the actual data. */
size_t riscv_batch_add_dmi_read(struct riscv_batch *batch, unsigned int address);
-unsigned int riscv_batch_get_dmi_read_op(struct riscv_batch *batch, size_t key);
+uint32_t riscv_batch_get_dmi_read_op(struct riscv_batch *batch, size_t key);
uint32_t riscv_batch_get_dmi_read_data(struct riscv_batch *batch, size_t key);
/* Scans in a NOP. */
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 16eced2d8..6c9ed317b 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -1537,7 +1537,7 @@ static int set_haltgroup(struct target *target, bool *supported)
uint32_t read;
if (dmi_read(target, &read, DM_DMCS2) != ERROR_OK)
return ERROR_FAIL;
- *supported = get_field(read, DM_DMCS2_GROUP) == (unsigned)target->smp;
+ *supported = get_field(read, DM_DMCS2_GROUP) == target->smp;
return ERROR_OK;
}
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/batch.c | 4 ++--
src/target/riscv/batch.h | 2 +-
src/target/riscv/riscv-013.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-10-20 09:23:23
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 957eb741a0980408fe4d0682fccb99a183f90998 (commit)
from bcf63ac56242b4060586761eb39b436e7fe2c1f7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 957eb741a0980408fe4d0682fccb99a183f90998
Author: Antonio Borneo <bor...@gm...>
Date: Sun Sep 8 21:23:28 2024 +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 <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8483
Tested-by: jenkins
diff --git a/src/target/riscv/batch.c b/src/target/riscv/batch.c
index d4bdadf17..859e2275e 100644
--- a/src/target/riscv/batch.c
+++ b/src/target/riscv/batch.c
@@ -127,7 +127,7 @@ int riscv_batch_run(struct riscv_batch *batch)
return ERROR_OK;
}
-void riscv_batch_add_dmi_write(struct riscv_batch *batch, unsigned address, uint64_t data)
+void riscv_batch_add_dmi_write(struct riscv_batch *batch, unsigned int address, uint64_t data)
{
assert(batch->used_scans < batch->allocated_scans);
struct scan_field *field = batch->fields + batch->used_scans;
@@ -140,7 +140,7 @@ void riscv_batch_add_dmi_write(struct riscv_batch *batch, unsigned address, uint
batch->used_scans++;
}
-size_t riscv_batch_add_dmi_read(struct riscv_batch *batch, unsigned address)
+size_t riscv_batch_add_dmi_read(struct riscv_batch *batch, unsigned int address)
{
assert(batch->used_scans < batch->allocated_scans);
struct scan_field *field = batch->fields + batch->used_scans;
@@ -156,7 +156,7 @@ size_t riscv_batch_add_dmi_read(struct riscv_batch *batch, unsigned address)
return batch->read_keys_used++;
}
-unsigned riscv_batch_get_dmi_read_op(struct riscv_batch *batch, size_t key)
+unsigned int riscv_batch_get_dmi_read_op(struct riscv_batch *batch, size_t key)
{
assert(key < batch->read_keys_used);
size_t index = batch->read_keys[key];
diff --git a/src/target/riscv/batch.h b/src/target/riscv/batch.h
index 9c42ba81e..e5b94cc21 100644
--- a/src/target/riscv/batch.h
+++ b/src/target/riscv/batch.h
@@ -59,13 +59,13 @@ bool riscv_batch_full(struct riscv_batch *batch);
int riscv_batch_run(struct riscv_batch *batch);
/* Adds a DMI write to this batch. */
-void riscv_batch_add_dmi_write(struct riscv_batch *batch, unsigned address, uint64_t data);
+void riscv_batch_add_dmi_write(struct riscv_batch *batch, unsigned int address, uint64_t data);
/* DMI reads must be handled in two parts: the first one schedules a read and
* provides a key, the second one actually obtains the result of the read -
* status (op) and the actual data. */
-size_t riscv_batch_add_dmi_read(struct riscv_batch *batch, unsigned address);
-unsigned riscv_batch_get_dmi_read_op(struct riscv_batch *batch, size_t key);
+size_t riscv_batch_add_dmi_read(struct riscv_batch *batch, unsigned int address);
+unsigned int riscv_batch_get_dmi_read_op(struct riscv_batch *batch, size_t key);
uint32_t riscv_batch_get_dmi_read_data(struct riscv_batch *batch, size_t key);
/* Scans in a NOP. */
diff --git a/src/target/riscv/opcodes.h b/src/target/riscv/opcodes.h
index 8faa154ba..7d17e6eea 100644
--- a/src/target/riscv/opcodes.h
+++ b/src/target/riscv/opcodes.h
@@ -191,26 +191,26 @@ static uint32_t fld(unsigned int dest, unsigned int base, uint16_t offset)
return imm_i(offset) | inst_rs1(base) | inst_rd(dest) | MATCH_FLD;
}
-static uint32_t fmv_x_w(unsigned dest, unsigned src) __attribute__ ((unused));
-static uint32_t fmv_x_w(unsigned dest, unsigned src)
+static uint32_t fmv_x_w(unsigned int dest, unsigned int src) __attribute__ ((unused));
+static uint32_t fmv_x_w(unsigned int dest, unsigned int src)
{
return inst_rs1(src) | inst_rd(dest) | MATCH_FMV_X_W;
}
-static uint32_t fmv_x_d(unsigned dest, unsigned src) __attribute__ ((unused));
-static uint32_t fmv_x_d(unsigned dest, unsigned src)
+static uint32_t fmv_x_d(unsigned int dest, unsigned int src) __attribute__ ((unused));
+static uint32_t fmv_x_d(unsigned int dest, unsigned int src)
{
return inst_rs1(src) | inst_rd(dest) | MATCH_FMV_X_D;
}
-static uint32_t fmv_w_x(unsigned dest, unsigned src) __attribute__ ((unused));
-static uint32_t fmv_w_x(unsigned dest, unsigned src)
+static uint32_t fmv_w_x(unsigned int dest, unsigned int src) __attribute__ ((unused));
+static uint32_t fmv_w_x(unsigned int dest, unsigned int src)
{
return inst_rs1(src) | inst_rd(dest) | MATCH_FMV_W_X;
}
-static uint32_t fmv_d_x(unsigned dest, unsigned src) __attribute__ ((unused));
-static uint32_t fmv_d_x(unsigned dest, unsigned src)
+static uint32_t fmv_d_x(unsigned int dest, unsigned int src) __attribute__ ((unused));
+static uint32_t fmv_d_x(unsigned int dest, unsigned int src)
{
return inst_rs1(src) | inst_rd(dest) | MATCH_FMV_D_X;
}
diff --git a/src/target/riscv/program.c b/src/target/riscv/program.c
index 0976539b3..1014137f4 100644
--- a/src/target/riscv/program.c
+++ b/src/target/riscv/program.c
@@ -31,7 +31,7 @@ int riscv_program_init(struct riscv_program *p, struct target *target)
int riscv_program_write(struct riscv_program *program)
{
- for (unsigned i = 0; i < program->instruction_count; ++i) {
+ for (unsigned int i = 0; i < program->instruction_count; ++i) {
LOG_DEBUG("debug_buffer[%02x] = DASM(0x%08x)", i, program->debug_buffer[i]);
if (riscv_write_debug_buffer(program->target, i,
program->debug_buffer[i]) != ERROR_OK)
diff --git a/src/target/riscv/riscv-011.c b/src/target/riscv/riscv-011.c
index 565721c28..302ace869 100644
--- a/src/target/riscv/riscv-011.c
+++ b/src/target/riscv/riscv-011.c
@@ -474,7 +474,7 @@ static uint64_t dbus_read(struct target *target, uint16_t address)
* While somewhat nonintuitive, this is an efficient way to get the data.
*/
- unsigned i = 0;
+ unsigned int i = 0;
do {
status = dbus_scan(target, &address_in, &value, DBUS_OP_READ, address, 0);
if (status == DBUS_STATUS_BUSY)
@@ -495,7 +495,7 @@ static uint64_t dbus_read(struct target *target, uint16_t address)
static void dbus_write(struct target *target, uint16_t address, uint64_t value)
{
dbus_status_t status = DBUS_STATUS_BUSY;
- unsigned i = 0;
+ unsigned int i = 0;
while (status == DBUS_STATUS_BUSY && i++ < 256) {
status = dbus_scan(target, NULL, NULL, DBUS_OP_WRITE, address, value);
if (status == DBUS_STATUS_BUSY)
@@ -656,13 +656,13 @@ static void scans_add_read(scans_t *scans, slot_t slot, bool set_interrupt)
}
static uint32_t scans_get_u32(scans_t *scans, unsigned int index,
- unsigned first, unsigned num)
+ unsigned int first, unsigned int num)
{
return buf_get_u32(scans->in + scans->scan_size * index, first, num);
}
static uint64_t scans_get_u64(scans_t *scans, unsigned int index,
- unsigned first, unsigned num)
+ unsigned int first, unsigned int num)
{
return buf_get_u64(scans->in + scans->scan_size * index, first, num);
}
@@ -699,7 +699,7 @@ static bits_t read_bits(struct target *target)
};
do {
- unsigned i = 0;
+ unsigned int i = 0;
do {
status = dbus_scan(target, &address_in, &value, DBUS_OP_READ, 0, 0);
if (status == DBUS_STATUS_BUSY) {
@@ -1296,7 +1296,7 @@ static int register_write(struct target *target, unsigned int number,
int result = update_mstatus_actual(target);
if (result != ERROR_OK)
return result;
- unsigned i = 0;
+ unsigned int i = 0;
if ((info->mstatus_actual & MSTATUS_FS) == 0) {
info->mstatus_actual = set_field(info->mstatus_actual, MSTATUS_FS, 1);
cache_set_load(target, i++, S0, SLOT1);
@@ -1352,7 +1352,7 @@ static int get_register(struct target *target, riscv_reg_t *value, int regid)
int result = update_mstatus_actual(target);
if (result != ERROR_OK)
return result;
- unsigned i = 0;
+ unsigned int i = 0;
if ((info->mstatus_actual & MSTATUS_FS) == 0) {
info->mstatus_actual = set_field(info->mstatus_actual, MSTATUS_FS, 1);
cache_set_load(target, i++, S0, SLOT1);
@@ -1538,7 +1538,7 @@ static int examine(struct target *target)
/* 0x00000000 0x00000000:00000003 0x00000000:00000003:ffffffff:ffffffff */
cache_set32(target, 4, sw(S1, ZERO, DEBUG_RAM_START + 4));
cache_set_jump(target, 5);
- for (unsigned i = 6; i < info->dramsize; i++)
+ for (unsigned int i = 6; i < info->dramsize; i++)
cache_set32(target, i, i * 0x01020304);
cache_write(target, 0, false);
@@ -1569,7 +1569,7 @@ static int examine(struct target *target)
LOG_DEBUG("Discovered XLEN is %d", riscv_xlen(target));
if (read_remote_csr(target, &r->misa, CSR_MISA) != ERROR_OK) {
- const unsigned old_csr_misa = 0xf10;
+ const unsigned int old_csr_misa = 0xf10;
LOG_WARNING("Failed to read misa at 0x%x; trying 0x%x.", CSR_MISA,
old_csr_misa);
if (read_remote_csr(target, &r->misa, old_csr_misa) != ERROR_OK) {
@@ -1651,7 +1651,7 @@ static riscv_error_t handle_halt_routine(struct target *target)
unsigned int dbus_busy = 0;
unsigned int interrupt_set = 0;
- unsigned result = 0;
+ unsigned int result = 0;
uint64_t value = 0;
reg_cache_set(target, 0, 0);
/* The first scan result is the result from something old we don't care
@@ -2016,7 +2016,7 @@ static int read_memory(struct target *target, target_addr_t address,
cache_write(target, CACHE_NO_READ, false);
riscv011_info_t *info = get_info(target);
- const unsigned max_batch_size = 256;
+ const unsigned int max_batch_size = 256;
scans_t *scans = scans_new(target, max_batch_size);
if (!scans)
return ERROR_FAIL;
@@ -2174,7 +2174,7 @@ static int write_memory(struct target *target, target_addr_t address,
if (setup_write_memory(target, size) != ERROR_OK)
return ERROR_FAIL;
- const unsigned max_batch_size = 256;
+ const unsigned int max_batch_size = 256;
scans_t *scans = scans_new(target, max_batch_size);
if (!scans)
return ERROR_FAIL;
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index dbf9aad1d..16eced2d8 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -48,7 +48,7 @@ static int riscv013_on_step(struct target *target);
static int riscv013_resume_prep(struct target *target);
static bool riscv013_is_halted(struct target *target);
static enum riscv_halt_reason riscv013_halt_reason(struct target *target);
-static int riscv013_write_debug_buffer(struct target *target, unsigned index,
+static int riscv013_write_debug_buffer(struct target *target, unsigned int index,
riscv_insn_t d);
static riscv_insn_t riscv013_read_debug_buffer(struct target *target, unsigned
index);
@@ -59,7 +59,7 @@ static int riscv013_dmi_write_u64_bits(struct target *target);
static void riscv013_fill_dmi_nop_u64(struct target *target, char *buf);
static int register_read(struct target *target, uint64_t *value, uint32_t number);
static int register_read_direct(struct target *target, uint64_t *value, uint32_t number);
-static int register_write_direct(struct target *target, unsigned number,
+static int register_write_direct(struct target *target, unsigned int number,
uint64_t value);
static int read_memory(struct target *target, target_addr_t address,
uint32_t size, uint32_t count, uint8_t *buffer, uint32_t increment);
@@ -156,13 +156,13 @@ typedef struct {
typedef struct {
/* The indexed used to address this hart in its DM. */
- unsigned index;
+ unsigned int index;
/* Number of address bits in the dbus register. */
- unsigned abits;
+ unsigned int abits;
/* Number of abstract command data registers. */
- unsigned datacount;
+ unsigned int datacount;
/* Number of words in the Program Buffer. */
- unsigned progbufsize;
+ unsigned int progbufsize;
/* We cache the read-only bits of sbcs here. */
uint32_t sbcs;
@@ -209,7 +209,7 @@ typedef struct {
int16_t dataaddr;
/* The width of the hartsel field. */
- unsigned hartsellen;
+ unsigned int hartsellen;
/* DM that provides access to this target. */
dm013_info_t *dm;
@@ -290,10 +290,10 @@ static uint32_t set_hartsel(uint32_t initial, uint32_t index)
return initial;
}
-static void decode_dmi(char *text, unsigned address, unsigned data)
+static void decode_dmi(char *text, unsigned int address, unsigned int data)
{
static const struct {
- unsigned address;
+ unsigned int address;
uint64_t mask;
const char *name;
} description[] = {
@@ -350,10 +350,10 @@ static void decode_dmi(char *text, unsigned address, unsigned data)
};
text[0] = 0;
- for (unsigned i = 0; i < ARRAY_SIZE(description); i++) {
+ for (unsigned int i = 0; i < ARRAY_SIZE(description); i++) {
if (description[i].address == address) {
uint64_t mask = description[i].mask;
- unsigned value = get_field(data, mask);
+ unsigned int value = get_field(data, mask);
if (value) {
if (i > 0)
*(text++) = ' ';
@@ -468,7 +468,7 @@ static dmi_status_t dmi_scan(struct target *target, uint32_t *address_in,
{
riscv013_info_t *info = get_info(target);
RISCV_INFO(r);
- unsigned num_bits = info->abits + DTM_DMI_OP_LENGTH + DTM_DMI_DATA_LENGTH;
+ unsigned int num_bits = info->abits + DTM_DMI_OP_LENGTH + DTM_DMI_DATA_LENGTH;
size_t num_bytes = (num_bits + 7) / 8;
uint8_t in[num_bytes];
uint8_t out[num_bytes];
@@ -680,7 +680,7 @@ static int dmi_write_exec(struct target *target, uint32_t address,
}
static int dmstatus_read_timeout(struct target *target, uint32_t *dmstatus,
- bool authenticated, unsigned timeout_sec)
+ bool authenticated, unsigned int timeout_sec)
{
int result = dmi_op_timeout(target, dmstatus, NULL, DMI_OP_READ,
DM_DMSTATUS, 0, timeout_sec, false, true);
@@ -717,7 +717,7 @@ static void increase_ac_busy_delay(struct target *target)
info->ac_busy_delay);
}
-static uint32_t __attribute__((unused)) abstract_register_size(unsigned width)
+static uint32_t __attribute__((unused)) abstract_register_size(unsigned int width)
{
switch (width) {
case 32:
@@ -807,12 +807,12 @@ static int execute_abstract_command(struct target *target, uint32_t command)
return ERROR_OK;
}
-static riscv_reg_t read_abstract_arg(struct target *target, unsigned index,
- unsigned size_bits)
+static riscv_reg_t read_abstract_arg(struct target *target, unsigned int index,
+ unsigned int size_bits)
{
riscv_reg_t value = 0;
uint32_t v;
- unsigned offset = index * size_bits / 32;
+ unsigned int offset = index * size_bits / 32;
switch (size_bits) {
default:
LOG_ERROR("Unsupported size: %d bits", size_bits);
@@ -828,10 +828,10 @@ static riscv_reg_t read_abstract_arg(struct target *target, unsigned index,
return value;
}
-static int write_abstract_arg(struct target *target, unsigned index,
- riscv_reg_t value, unsigned size_bits)
+static int write_abstract_arg(struct target *target, unsigned int index,
+ riscv_reg_t value, unsigned int size_bits)
{
- unsigned offset = index * size_bits / 32;
+ unsigned int offset = index * size_bits / 32;
switch (size_bits) {
default:
LOG_ERROR("Unsupported size: %d bits", size_bits);
@@ -849,7 +849,7 @@ static int write_abstract_arg(struct target *target, unsigned index,
* @par size in bits
*/
static uint32_t access_register_command(struct target *target, uint32_t number,
- unsigned size, uint32_t flags)
+ unsigned int size, uint32_t flags)
{
uint32_t command = set_field(0, DM_COMMAND_CMDTYPE, 0);
switch (size) {
@@ -891,7 +891,7 @@ static uint32_t access_register_command(struct target *target, uint32_t number,
}
static int register_read_abstract(struct target *target, uint64_t *value,
- uint32_t number, unsigned size)
+ uint32_t number, unsigned int size)
{
RISCV013_INFO(info);
@@ -929,7 +929,7 @@ static int register_read_abstract(struct target *target, uint64_t *value,
}
static int register_write_abstract(struct target *target, uint32_t number,
- uint64_t value, unsigned size)
+ uint64_t value, unsigned int size)
{
RISCV013_INFO(info);
@@ -968,7 +968,7 @@ static int register_write_abstract(struct target *target, uint32_t number,
* Sets the AAMSIZE field of a memory access abstract command based on
* the width (bits).
*/
-static uint32_t abstract_memory_size(unsigned width)
+static uint32_t abstract_memory_size(unsigned int width)
{
switch (width) {
case 8:
@@ -991,7 +991,7 @@ static uint32_t abstract_memory_size(unsigned width)
* Creates a memory access abstract command.
*/
static uint32_t access_memory_command(struct target *target, bool virtual,
- unsigned width, bool postincrement, bool write)
+ unsigned int width, bool postincrement, bool write)
{
uint32_t command = set_field(0, AC_ACCESS_MEMORY_CMDTYPE, 2);
command = set_field(command, AC_ACCESS_MEMORY_AAMVIRTUAL, virtual);
@@ -1134,7 +1134,7 @@ typedef struct {
static int scratch_reserve(struct target *target,
scratch_mem_t *scratch,
struct riscv_program *program,
- unsigned size_bytes)
+ unsigned int size_bytes)
{
riscv_addr_t alignment = 1;
while (alignment < size_bytes)
@@ -1166,7 +1166,7 @@ static int scratch_reserve(struct target *target,
return ERROR_FAIL;
/* Allow for ebreak at the end of the program. */
- unsigned program_size = (program->instruction_count + 1) * 4;
+ unsigned int program_size = (program->instruction_count + 1) * 4;
scratch->hart_address = (info->progbuf_address + program_size + alignment - 1) &
~(alignment - 1);
if ((info->progbuf_writable == YNM_YES) &&
@@ -1271,7 +1271,7 @@ static int scratch_write64(struct target *target, scratch_mem_t *scratch,
}
/** Return register size in bits. */
-static unsigned register_size(struct target *target, unsigned number)
+static unsigned int register_size(struct target *target, unsigned int number)
{
/* If reg_cache hasn't been initialized yet, make a guess. We need this for
* when this function is called during examine(). */
@@ -1281,7 +1281,7 @@ static unsigned register_size(struct target *target, unsigned number)
return riscv_xlen(target);
}
-static bool has_sufficient_progbuf(struct target *target, unsigned size)
+static bool has_sufficient_progbuf(struct target *target, unsigned int size)
{
RISCV013_INFO(info);
RISCV_INFO(r);
@@ -1293,7 +1293,7 @@ static bool has_sufficient_progbuf(struct target *target, unsigned size)
* Immediately write the new value to the requested register. This mechanism
* bypasses any caches.
*/
-static int register_write_direct(struct target *target, unsigned number,
+static int register_write_direct(struct target *target, unsigned int number,
uint64_t value)
{
LOG_DEBUG("{%d} %s <- 0x%" PRIx64, riscv_current_hartid(target),
@@ -1834,7 +1834,7 @@ static int riscv013_hart_count(struct target *target)
}
/* Try to find out the widest memory access size depending on the selected memory access methods. */
-static unsigned riscv013_data_bits(struct target *target)
+static unsigned int riscv013_data_bits(struct target *target)
{
RISCV013_INFO(info);
RISCV_INFO(r);
@@ -1904,12 +1904,12 @@ static COMMAND_HELPER(riscv013_print_info, struct target *target)
}
static int prep_for_vector_access(struct target *target, uint64_t *vtype,
- uint64_t *vl, unsigned *debug_vl)
+ uint64_t *vl, unsigned int *debug_vl)
{
RISCV_INFO(r);
/* TODO: this continuous save/restore is terrible for performance. */
/* Write vtype and vl. */
- unsigned encoded_vsew;
+ unsigned int encoded_vsew;
switch (riscv_xlen(target)) {
case 32:
encoded_vsew = 2;
@@ -1965,12 +1965,12 @@ static int riscv013_get_register_buf(struct target *target,
return ERROR_FAIL;
uint64_t vtype, vl;
- unsigned debug_vl;
+ unsigned int debug_vl;
if (prep_for_vector_access(target, &vtype, &vl, &debug_vl) != ERROR_OK)
return ERROR_FAIL;
- unsigned vnum = regno - GDB_REGNO_V0;
- unsigned xlen = riscv_xlen(target);
+ unsigned int vnum = regno - GDB_REGNO_V0;
+ unsigned int xlen = riscv_xlen(target);
struct riscv_program program;
riscv_program_init(&program, target);
@@ -1978,7 +1978,7 @@ static int riscv013_get_register_buf(struct target *target,
riscv_program_insert(&program, vslide1down_vx(vnum, vnum, S0, true));
int result = ERROR_OK;
- for (unsigned i = 0; i < debug_vl; i++) {
+ for (unsigned int i = 0; i < debug_vl; i++) {
/* Executing the program might result in an exception if there is some
* issue with the vector implementation/instructions we're using. If that
* happens, attempt to restore as usual. We may have clobbered the
@@ -2024,18 +2024,18 @@ static int riscv013_set_register_buf(struct target *target,
return ERROR_FAIL;
uint64_t vtype, vl;
- unsigned debug_vl;
+ unsigned int debug_vl;
if (prep_for_vector_access(target, &vtype, &vl, &debug_vl) != ERROR_OK)
return ERROR_FAIL;
- unsigned vnum = regno - GDB_REGNO_V0;
- unsigned xlen = riscv_xlen(target);
+ unsigned int vnum = regno - GDB_REGNO_V0;
+ unsigned int xlen = riscv_xlen(target);
struct riscv_program program;
riscv_program_init(&program, target);
riscv_program_insert(&program, vslide1down_vx(vnum, vnum, S0, true));
int result = ERROR_OK;
- for (unsigned i = 0; i < debug_vl; i++) {
+ for (unsigned int i = 0; i < debug_vl; i++) {
if (register_write_direct(target, GDB_REGNO_S0,
buf_get_u64(value, xlen * i, xlen)) != ERROR_OK)
return ERROR_FAIL;
@@ -2476,7 +2476,7 @@ static int execute_fence(struct target *target)
}
static void log_memory_access(target_addr_t address, uint64_t value,
- unsigned size_bytes, bool read)
+ unsigned int size_bytes, bool read)
{
if (debug_level < LOG_LVL_DEBUG)
return;
@@ -2524,7 +2524,7 @@ static int read_memory_bus_word(struct target *target, target_addr_t address,
static target_addr_t sb_read_address(struct target *target)
{
RISCV013_INFO(info);
- unsigned sbasize = get_field(info->sbcs, DM_SBCS_SBASIZE);
+ unsigned int sbasize = get_field(info->sbcs, DM_SBCS_SBASIZE);
target_addr_t address = 0;
uint32_t v;
if (sbasize > 32) {
@@ -2717,7 +2717,7 @@ static int read_memory_bus_v1(struct target *target, target_addr_t address,
for (uint32_t i = (next_address - address) / size; i < count - 1; i++) {
for (int j = (size - 1) / 4; j >= 0; j--) {
uint32_t value;
- unsigned attempt = 0;
+ unsigned int attempt = 0;
while (1) {
if (attempt++ > 100) {
LOG_ERROR("DMI keeps being busy in while reading memory just past " TARGET_ADDR_FMT,
@@ -2745,7 +2745,7 @@ static int read_memory_bus_v1(struct target *target, target_addr_t address,
uint32_t sbcs_read = 0;
if (count > 1) {
uint32_t value;
- unsigned attempt = 0;
+ unsigned int attempt = 0;
while (1) {
if (attempt++ > 100) {
LOG_ERROR("DMI keeps being busy in while reading memory just past " TARGET_ADDR_FMT,
@@ -2793,7 +2793,7 @@ static int read_memory_bus_v1(struct target *target, target_addr_t address,
continue;
}
- unsigned error = get_field(sbcs_read, DM_SBCS_SBERROR);
+ unsigned int error = get_field(sbcs_read, DM_SBCS_SBERROR);
if (error == 0) {
next_address = end_address;
} else {
@@ -2959,7 +2959,7 @@ static int read_memory_abstract(struct target *target, target_addr_t address,
memset(buffer, 0, count * size);
/* Convert the size (bytes) to width (bits) */
- unsigned width = size << 3;
+ unsigned int width = size << 3;
/* Create the command (physical address, postincrement, read) */
uint32_t command = access_memory_command(target, false, width, use_aampostincrement, false);
@@ -3035,7 +3035,7 @@ static int write_memory_abstract(struct target *target, target_addr_t address,
size, address);
/* Convert the size (bytes) to width (bits) */
- unsigned width = size << 3;
+ unsigned int width = size << 3;
/* Create the command (physical address, postincrement, write) */
uint32_t command = access_memory_command(target, false, width, use_aampostincrement, true);
@@ -3145,7 +3145,7 @@ static int read_memory_progbuf_inner(struct target *target, target_addr_t addres
/* read_addr is the next address that the hart will read from, which is the
* value in s0. */
- unsigned index = 2;
+ unsigned int index = 2;
while (index < count) {
riscv_addr_t read_addr = address + index * increment;
LOG_DEBUG("i=%d, count=%d, read_addr=0x%" PRIx64, index, count, read_addr);
@@ -3162,8 +3162,8 @@ static int read_memory_progbuf_inner(struct target *target, target_addr_t addres
if (!batch)
return ERROR_FAIL;
- unsigned reads = 0;
- for (unsigned j = index; j < count; j++) {
+ unsigned int reads = 0;
+ for (unsigned int j = index; j < count; j++) {
if (size > 4)
riscv_batch_add_dmi_read(batch, DM_DATA1);
riscv_batch_add_dmi_read(batch, DM_DATA0);
@@ -3186,8 +3186,8 @@ static int read_memory_progbuf_inner(struct target *target, target_addr_t addres
return ERROR_FAIL;
info->cmderr = get_field(abstractcs, DM_ABSTRACTCS_CMDERR);
- unsigned next_index;
- unsigned ignore_last = 0;
+ unsigned int next_index;
+ unsigned int ignore_last = 0;
switch (info->cmderr) {
case CMDERR_NONE:
LOG_DEBUG("successful (partial?) memory read");
@@ -3256,9 +3256,9 @@ static int read_memory_progbuf_inner(struct target *target, target_addr_t addres
/* Now read whatever we got out of the batch. */
dmi_status_t status = DMI_STATUS_SUCCESS;
- unsigned read = 0;
+ unsigned int read = 0;
assert(index >= 2);
- for (unsigned j = index - 2; j < index + reads; j++) {
+ for (unsigned int j = index - 2; j < index + reads; j++) {
assert(j < count);
LOG_DEBUG("index=%d, reads=%d, next_index=%d, ignore_last=%d, j=%d",
index, reads, next_index, ignore_last, j);
@@ -3867,9 +3867,9 @@ static int write_memory_progbuf(struct target *target, target_addr_t address,
goto error;
/* To write another word, we put it in S1 and execute the program. */
- unsigned start = (cur_addr - address) / size;
- for (unsigned i = start; i < count; ++i) {
- unsigned offset = size*i;
+ unsigned int start = (cur_addr - address) / size;
+ for (unsigned int i = start; i < count; ++i) {
+ unsigned int offset = size * i;
const uint8_t *t_buffer = buffer + offset;
uint64_t value = buf_get_u64(t_buffer, 0, 8 * size);
@@ -4160,18 +4160,18 @@ static int select_prepped_harts(struct target *target, bool *use_hasel)
}
assert(dm->hart_count);
- unsigned hawindow_count = (dm->hart_count + 31) / 32;
+ unsigned int hawindow_count = (dm->hart_count + 31) / 32;
uint32_t hawindow[hawindow_count];
memset(hawindow, 0, sizeof(uint32_t) * hawindow_count);
target_list_t *entry;
- unsigned total_selected = 0;
+ unsigned int total_selected = 0;
list_for_each_entry(entry, &dm->target_list, list) {
struct target *t = entry->target;
struct riscv_info *r = riscv_info(t);
riscv013_info_t *info = get_info(t);
- unsigned index = info->index;
+ unsigned int index = info->index;
LOG_DEBUG("index=%d, coreid=%d, prepped=%d", index, t->coreid, r->prepped);
r->selected = r->prepped;
if (r->prepped) {
@@ -4188,7 +4188,7 @@ static int select_prepped_harts(struct target *target, bool *use_hasel)
return ERROR_OK;
}
- for (unsigned i = 0; i < hawindow_count; i++) {
+ for (unsigned int i = 0; i < hawindow_count; i++) {
if (dmi_write(target, DM_HAWINDOWSEL, i) != ERROR_OK)
return ERROR_FAIL;
if (dmi_write(target, DM_HAWINDOW, hawindow[i]) != ERROR_OK)
@@ -4346,7 +4346,7 @@ static enum riscv_halt_reason riscv013_halt_reason(struct target *target)
return RISCV_HALT_UNKNOWN;
}
-int riscv013_write_debug_buffer(struct target *target, unsigned index, riscv_insn_t data)
+int riscv013_write_debug_buffer(struct target *target, unsigned int index, riscv_insn_t data)
{
dm013_info_t *dm = get_dm(target);
if (!dm)
@@ -4361,7 +4361,7 @@ int riscv013_write_debug_buffer(struct target *target, unsigned index, riscv_ins
return ERROR_OK;
}
-riscv_insn_t riscv013_read_debug_buffer(struct target *target, unsigned index)
+riscv_insn_t riscv013_read_debug_buffer(struct target *target, unsigned int index)
{
uint32_t value;
dmi_read(target, &value, DM_PROGBUF0 + index);
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index 511a3c6c3..99f40a739 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -476,7 +476,7 @@ static void riscv_free_registers(struct target *target)
if (target->reg_cache->reg_list) {
free(target->reg_cache->reg_list[0].arch_info);
/* Free the ones we allocated separately. */
- for (unsigned i = GDB_REGNO_COUNT; i < target->reg_cache->num_regs; i++)
+ for (unsigned int i = GDB_REGNO_COUNT; i < target->reg_cache->num_regs; i++)
free(target->reg_cache->reg_list[i].arch_info);
for (unsigned int i = 0; i < target->reg_cache->num_regs; i++)
free(target->reg_cache->reg_list[i].value);
@@ -1583,7 +1583,7 @@ static int riscv_address_translate(struct target *target,
if (result != ERROR_OK)
return result;
- unsigned xlen = riscv_xlen(target);
+ unsigned int xlen = riscv_xlen(target);
mode = get_field(satp_value, RISCV_SATP_MODE(xlen));
switch (mode) {
case SATP_MODE_SV32:
@@ -1927,7 +1927,7 @@ static int riscv_run_algorithm(struct target *target, int num_mem_params,
GDB_REGNO_PC,
GDB_REGNO_MSTATUS, GDB_REGNO_MEPC, GDB_REGNO_MCAUSE,
};
- for (unsigned i = 0; i < ARRAY_SIZE(regnums); i++) {
+ for (unsigned int i = 0; i < ARRAY_SIZE(regnums); i++) {
enum gdb_regno regno = regnums[i];
riscv_reg_t reg_value;
if (riscv_get_register(target, ®_value, regno) != ERROR_OK)
@@ -2007,8 +2007,8 @@ static int riscv_checksum_memory(struct target *target,
static const uint8_t *crc_code;
- unsigned xlen = riscv_xlen(target);
- unsigned crc_code_size;
+ unsigned int xlen = riscv_xlen(target);
+ unsigned int crc_code_size;
if (xlen == 32) {
crc_code = riscv32_crc_code;
crc_code_size = sizeof(riscv32_crc_code);
@@ -2187,8 +2187,8 @@ int riscv_openocd_poll(struct target *target)
int halted_hart = -1;
if (target->smp) {
- unsigned should_remain_halted = 0;
- unsigned should_resume = 0;
+ unsigned int should_remain_halted = 0;
+ unsigned int should_resume = 0;
struct target_list *list;
foreach_smp_target(list, target->smp_targets) {
struct target *t = list->target;
@@ -2436,8 +2436,8 @@ static int parse_ranges(struct list_head *ranges, const char *tcl_arg, const cha
/* For backward compatibility, allow multiple parameters within one TCL argument, separated by ',' */
char *arg = strtok(args, ",");
while (arg) {
- unsigned low = 0;
- unsigned high = 0;
+ unsigned int low = 0;
+ unsigned int high = 0;
char *name = NULL;
char *dash = strchr(arg, '-');
@@ -3055,7 +3055,7 @@ static const struct command_registration riscv_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
-static unsigned riscv_xlen_nonconst(struct target *target)
+static unsigned int riscv_xlen_nonconst(struct target *target)
{
return riscv_xlen(target);
}
@@ -3194,7 +3194,7 @@ static int riscv_step_rtos_hart(struct target *target)
bool riscv_supports_extension(struct target *target, char letter)
{
RISCV_INFO(r);
- unsigned num;
+ unsigned int num;
if (letter >= 'a' && letter <= 'z')
num = letter - 'a';
else if (letter >= 'A' && letter <= 'Z')
@@ -3204,7 +3204,7 @@ bool riscv_supports_extension(struct target *target, char letter)
return r->misa & BIT(num);
}
-unsigned riscv_xlen(const struct target *target)
+unsigned int riscv_xlen(const struct target *target)
{
RISCV_INFO(r);
return r->xlen;
@@ -3778,7 +3778,7 @@ static struct reg_arch_type riscv_reg_arch_type = {
};
struct csr_info {
- unsigned number;
+ unsigned int number;
const char *name;
};
@@ -3958,7 +3958,7 @@ int riscv_init_registers(struct target *target)
};
/* encoding.h does not contain the registers in sorted order. */
qsort(csr_info, ARRAY_SIZE(csr_info), sizeof(*csr_info), cmp_csr_info);
- unsigned csr_info_index = 0;
+ unsigned int csr_info_index = 0;
int custom_within_range = 0;
@@ -4213,7 +4213,7 @@ int riscv_init_registers(struct target *target)
} else if (number >= GDB_REGNO_CSR0 && number <= GDB_REGNO_CSR4095) {
r->group = "csr";
r->feature = &feature_csr;
- unsigned csr_number = number - GDB_REGNO_CSR0;
+ unsigned int csr_number = number - GDB_REGNO_CSR0;
while (csr_info[csr_info_index].number < csr_number &&
csr_info_index < ARRAY_SIZE(csr_info) - 1) {
@@ -4376,7 +4376,7 @@ int riscv_init_registers(struct target *target)
range_list_t *range = list_first_entry(&info->expose_custom, range_list_t, list);
- unsigned custom_number = range->low + custom_within_range;
+ unsigned int custom_number = range->low + custom_within_range;
r->group = "custom";
r->feature = &feature_custom;
diff --git a/src/target/riscv/riscv.h b/src/target/riscv/riscv.h
index aba0864e6..6cb2709de 100644
--- a/src/target/riscv/riscv.h
+++ b/src/target/riscv/riscv.h
@@ -61,7 +61,7 @@ enum riscv_halt_reason {
typedef struct {
struct target *target;
- unsigned custom_number;
+ unsigned int custom_number;
} riscv_reg_info_t;
#define RISCV_SAMPLE_BUF_TIMESTAMP_BEFORE 0x80
@@ -90,7 +90,7 @@ typedef struct {
struct riscv_info {
unsigned int common_magic;
- unsigned dtm_version;
+ unsigned int dtm_version;
struct command_context *cmd_ctx;
void *version_specific;
@@ -159,9 +159,9 @@ struct riscv_info {
int (*halt_go)(struct target *target);
int (*on_step)(struct target *target);
enum riscv_halt_reason (*halt_reason)(struct target *target);
- int (*write_debug_buffer)(struct target *target, unsigned index,
+ int (*write_debug_buffer)(struct target *target, unsigned int index,
riscv_insn_t d);
- riscv_insn_t (*read_debug_buffer)(struct target *target, unsigned index);
+ riscv_insn_t (*read_debug_buffer)(struct target *target, unsigned int index);
int (*execute_debug_buffer)(struct target *target);
int (*dmi_write_u64_bits)(struct target *target);
void (*fill_dmi_write_u64)(struct target *target, char *buf, int a, uint64_t d);
@@ -184,7 +184,7 @@ struct riscv_info {
/* How many harts are attached to the DM that this target is attached to? */
int (*hart_count)(struct target *target);
- unsigned (*data_bits)(struct target *target);
+ unsigned int (*data_bits)(struct target *target);
COMMAND_HELPER((*print_info), struct target *target);
@@ -239,14 +239,14 @@ typedef struct {
typedef struct {
const char *name;
int level;
- unsigned va_bits;
- unsigned pte_shift;
- unsigned vpn_shift[PG_MAX_LEVEL];
- unsigned vpn_mask[PG_MAX_LEVEL];
- unsigned pte_ppn_shift[PG_MAX_LEVEL];
- unsigned pte_ppn_mask[PG_MAX_LEVEL];
- unsigned pa_ppn_shift[PG_MAX_LEVEL];
- unsigned pa_ppn_mask[PG_MAX_LEVEL];
+ unsigned int va_bits;
+ unsigned int pte_shift;
+ unsigned int vpn_shift[PG_MAX_LEVEL];
+ unsigned int vpn_mask[PG_MAX_LEVEL];
+ unsigned int pte_ppn_shift[PG_MAX_LEVEL];
+ unsigned int pte_ppn_mask[PG_MAX_LEVEL];
+ unsigned int pa_ppn_shift[PG_MAX_LEVEL];
+ unsigned int pa_ppn_mask[PG_MAX_LEVEL];
} virt2phys_info_t;
/* Wall-clock timeout for a command/access. Settable via RISC-V Target commands.*/
@@ -307,7 +307,7 @@ int riscv_openocd_deassert_reset(struct target *target);
bool riscv_supports_extension(struct target *target, char letter);
/* Returns XLEN for the given (or current) hart. */
-unsigned riscv_xlen(const struct target *target);
+unsigned int riscv_xlen(const struct target *target);
int riscv_xlen_of_hart(const struct target *target);
/* Sets the current hart, which is the hart that will actually be used when
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/batch.c | 6 +-
src/target/riscv/batch.h | 6 +-
src/target/riscv/opcodes.h | 16 +++---
src/target/riscv/program.c | 2 +-
src/target/riscv/riscv-011.c | 24 ++++----
src/target/riscv/riscv-013.c | 128 +++++++++++++++++++++----------------------
src/target/riscv/riscv.c | 32 +++++------
src/target/riscv/riscv.h | 28 +++++-----
8 files changed, 121 insertions(+), 121 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-10-20 09:21:45
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via bcf63ac56242b4060586761eb39b436e7fe2c1f7 (commit)
from edf2c82cf615af4926cc3536bbbafce2c55fe4e0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bcf63ac56242b4060586761eb39b436e7fe2c1f7
Author: Antonio Borneo <bor...@gm...>
Date: Tue Oct 8 00:37:48 2024 +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 <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8520
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 59a3eed12..01bd547ff 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -3728,7 +3728,7 @@ sub process {
} elsif ($realfile =~ /\.rst$/) {
$comment = '..';
# OpenOCD specific: Begin
- } elsif ($realfile =~ /\.(am|cfg|tcl)$/) {
+ } elsif (($realfile =~ /\.(am|cfg|tcl)$/) || ($realfile =~ /\/Makefile$/)) {
$comment = '#';
} elsif ($realfile =~ /\.(ld)$/) {
$comment = '/*';
-----------------------------------------------------------------------
Summary of changes:
tools/scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-10-05 15:54:24
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via edf2c82cf615af4926cc3536bbbafce2c55fe4e0 (commit)
from 30c3d077f281876286a7aa37afbd411d4bd1667e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit edf2c82cf615af4926cc3536bbbafce2c55fe4e0
Author: Jan Matyas <jan...@co...>
Date: Fri Sep 27 09:49:52 2024 +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...@co...>
Fixes: 9544cd653df1 ("helper: add align.h")
Reviewed-on: https://review.openocd.org/c/openocd/+/8511
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/src/helper/align.h b/src/helper/align.h
index 935a6a3b2..d7170065e 100644
--- a/src/helper/align.h
+++ b/src/helper/align.h
@@ -24,7 +24,7 @@
#define IS_PWR_OF_2(x) \
({ \
typeof(x) _x = (x); \
- _x == 0 || (_x & (_x - 1)) == 0; \
+ _x != 0 && (_x & (_x - 1)) == 0; \
})
#endif /* OPENOCD_HELPER_ALIGN_H */
-----------------------------------------------------------------------
Summary of changes:
src/helper/align.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-10-05 15:53:31
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 30c3d077f281876286a7aa37afbd411d4bd1667e (commit)
from 73390332d203f02aa5b9798a7550191d55650d97 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 30c3d077f281876286a7aa37afbd411d4bd1667e
Author: Antonio Borneo <bor...@gm...>
Date: Fri Sep 27 22:40:06 2024 +0200
jimtcl: update to version 0.83
New version tagged on 2024-08-28.
Change-Id: Id0cf82a692469ccf794c9680c5d5ac09ea26e6da
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8513
Tested-by: jenkins
diff --git a/jimtcl b/jimtcl
index 1933e5457..f16086617 160000
--- a/jimtcl
+++ b/jimtcl
@@ -1 +1 @@
-Subproject commit 1933e5457b9512d39ebbe11ed32578aada149f49
+Subproject commit f160866171457474f7c4d6ccda70f9b77524407e
-----------------------------------------------------------------------
Summary of changes:
jimtcl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-10-05 15:52:53
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 73390332d203f02aa5b9798a7550191d55650d97 (commit)
from 116e9553d12193faa08e668b3d9504ef995bd21f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 73390332d203f02aa5b9798a7550191d55650d97
Author: Antonio Borneo <bor...@gm...>
Date: Fri Sep 27 22:36:52 2024 +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 <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8512
Reviewed-by: Jonathan McDowell <noo...@ea...>
Tested-by: jenkins
diff --git a/src/helper/configuration.h b/src/helper/configuration.h
index 295ea591d..d646670eb 100644
--- a/src/helper/configuration.h
+++ b/src/helper/configuration.h
@@ -11,6 +11,7 @@
#ifndef OPENOCD_HELPER_CONFIGURATION_H
#define OPENOCD_HELPER_CONFIGURATION_H
+#include <stdio.h>
#include <helper/command.h>
int parse_cmdline_args(struct command_context *cmd_ctx,
diff --git a/src/helper/jim-nvp.c b/src/helper/jim-nvp.c
index e1ab64ae5..cdd4d3429 100644
--- a/src/helper/jim-nvp.c
+++ b/src/helper/jim-nvp.c
@@ -21,6 +21,7 @@
#endif
#include "jim-nvp.h"
+#include <stdio.h>
#include <string.h>
int jim_get_nvp(Jim_Interp *interp,
-----------------------------------------------------------------------
Summary of changes:
src/helper/configuration.h | 1 +
src/helper/jim-nvp.c | 1 +
2 files changed, 2 insertions(+)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2024-10-05 15:52:33
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 116e9553d12193faa08e668b3d9504ef995bd21f (commit)
from 595bb965b745371e07091c96ced478c8cd0b0d82 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 116e9553d12193faa08e668b3d9504ef995bd21f
Author: Antonio Borneo <bor...@gm...>
Date: Sun Sep 22 18:32:21 2024 +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 <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8503
Tested-by: jenkins
diff --git a/configure.ac b/configure.ac
index b7aed245e..07e06551f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -435,7 +435,7 @@ AS_CASE([$host],
# In case enable_buspirate=auto, make sure it will not be built.
enable_buspirate=no
- AC_SUBST([HOST_CPPFLAGS], [-D__USE_MINGW_ANSI_STDIO])
+ AC_SUBST([HOST_CPPFLAGS], ["-D__USE_MINGW_ANSI_STDIO -DFD_SETSIZE=128"])
],
[*darwin*], [
is_darwin=yes
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|