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
(68) |
Dec
(18) |
| 2026 |
Jan
(30) |
Feb
(31) |
Mar
(9) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:24:57
|
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 129e9d30055e5cbed5ad6f0229772a3dc89fa529 (commit)
from aaceff81f064107537c7706dc19ca6ff80ca12c8 (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 129e9d30055e5cbed5ad6f0229772a3dc89fa529
Author: R. Diez <rdi...@rd...>
Date: Mon Feb 2 18:00:49 2026 +0100
configure.ac: Replace --enable-malloc-logging with a new runtime log level.
About why the new log level LOG_LVL_DEBUG_USB has the same value a
LOG_LVL_DEBUG_MALLOC, see the mailing list discussion starting here:
Replacing --enable-verbose-usb-comms in configure.ac
https://sourceforge.net/p/openocd/mailman/message/59215751/
Other minor fixes included here which are probably
not worth submmitting in separate patches:
- In error message "level must be between -3 and 4", increase 4 to 5.
- LOG_DEBUG_IO was passing LOG_LVL_DEBUG instead of LOG_LVL_DEBUG_IO.
Change-Id: I71440bbabe4785338c0a27562cc76fa1b7d54bf5
Signed-off-by: R. Diez <rdi...@rd...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9432
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/configure.ac b/configure.ac
index 5bb76fe00..39f5e074e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,8 +96,8 @@ AC_CHECK_FUNCS([strnlen])
AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([usleep])
AC_CHECK_FUNCS([realpath])
-AC_CHECK_FUNCS([mallinfo], [has_at_least_one_mallinfo=yes])
-AC_CHECK_FUNCS([mallinfo2], [has_at_least_one_mallinfo=yes])
+AC_CHECK_FUNCS([mallinfo])
+AC_CHECK_FUNCS([mallinfo2])
# guess-rev.sh only exists in the repository, not in the released archives
AC_MSG_CHECKING([whether to build a release])
@@ -264,21 +264,6 @@ AS_IF([test "x$enable_gcov" = "xyes"], [
AC_DEFINE([USE_GCOV], [0], [0 to leave coverage collection disabled.])
])
-debug_malloc=no
-AC_ARG_ENABLE([malloc_logging],
- AS_HELP_STRING([--enable-malloc-logging],
- [Include free space in logging messages (requires malloc.h).]),
- [debug_malloc=$enableval], [])
-
-AC_MSG_CHECKING([whether to enable malloc free space logging]);
-AC_MSG_RESULT([$debug_malloc])
-AS_IF([test "x$debug_malloc" = "xyes"], [
- AS_IF([test "x$has_at_least_one_mallinfo" != "xyes"], [
- AC_MSG_ERROR([Option --enable-malloc-logging needs a libc with mallinfo or mallinfo2.])
- ])
- AC_DEFINE([_DEBUG_FREE_SPACE_],[1], [Include malloc free space in logging])
-])
-
m4_define([AC_ARG_ADAPTERS], [
m4_foreach([adapter_driver], [$1],
[AC_ARG_ENABLE(ADAPTER_OPT([adapter_driver]),
diff --git a/doc/openocd.texi b/doc/openocd.texi
index 4c5df9b88..579f39844 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -9589,7 +9589,8 @@ level 1 adds warnings;
level 2 adds informational messages;
level 3 adds debugging messages;
level 4 adds verbose low-level debug messages;
-and level 5 adds USB communication messages.
+and level 5 adds USB communication messages
+and amount of free heap space if mallinfo is available.
The default is level 2, but that can be overridden on
the command line along with the location of that log
file (which is normally the server's standard output).
diff --git a/src/helper/log.c b/src/helper/log.c
index caed8a9da..06d381055 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -24,8 +24,8 @@
#include <stdarg.h>
-#ifdef _DEBUG_FREE_SPACE_
-#include <malloc.h> // For mallinfo/mallinfo2.
+#if defined(HAVE_MALLINFO) || defined(HAVE_MALLINFO2)
+#include <malloc.h>
#endif
int debug_level = LOG_LVL_INFO;
@@ -101,30 +101,35 @@ static void log_puts(enum log_levels level,
if (LOG_LEVEL_IS(LOG_LVL_DEBUG)) {
/* print with count and time information */
int64_t t = timeval_ms() - start;
-#ifdef _DEBUG_FREE_SPACE_
+
+#if defined(HAVE_MALLINFO) || defined(HAVE_MALLINFO2)
+ const int should_use_mallinfo = LOG_LEVEL_IS(LOG_LVL_DEBUG_MALLOC);
+
+ if (should_use_mallinfo) {
#ifdef HAVE_MALLINFO2
- struct mallinfo2 info = mallinfo2();
-#elif defined(HAVE_MALLINFO)
- struct mallinfo info = mallinfo();
+ struct mallinfo2 info = mallinfo2();
#else
-#error "Configuration error: Neither mallinfo() nor mallinfo2() are available."
+ struct mallinfo info = mallinfo();
#endif
-#endif
- fprintf(log_output, "%s%u %" PRId64 " %s:%d %s()"
-#ifdef _DEBUG_FREE_SPACE_
+
+ fprintf(log_output, "%s%u %" PRId64 " %s:%d %s()"
#ifdef HAVE_MALLINFO2
- " %zu"
-#elif defined(HAVE_MALLINFO)
- " %d"
+ " %zu"
#else
-#error "Configuration error: Neither mallinfo() nor mallinfo2() are available."
+ " %d"
#endif
+ ": %s", log_strings[level + 1], count, t, file, line, function,
+ info.fordblks,
+ string);
+ }
+#else
+ const int should_use_mallinfo = 0;
#endif
- ": %s", log_strings[level + 1], count, t, file, line, function,
-#ifdef _DEBUG_FREE_SPACE_
- info.fordblks,
-#endif
- string);
+ if (!should_use_mallinfo) {
+ fprintf(log_output, "%s%u %" PRId64 " %s:%d %s()"
+ ": %s", log_strings[level + 1], count, t, file, line, function,
+ string);
+ }
} else {
/* if we are using gdb through pipes then we do not want any output
* to the pipe otherwise we get repeated strings */
@@ -211,7 +216,7 @@ COMMAND_HANDLER(handle_debug_level_command)
int new_level;
COMMAND_PARSE_NUMBER(int, CMD_ARGV[0], new_level);
if (new_level > LOG_LVL_DEBUG_USB || new_level < LOG_LVL_SILENT) {
- command_print(CMD, "level must be between %d and %d", LOG_LVL_SILENT, LOG_LVL_DEBUG_IO);
+ command_print(CMD, "level must be between %d and %d", LOG_LVL_SILENT, LOG_LVL_DEBUG_USB);
return ERROR_COMMAND_ARGUMENT_INVALID;
}
debug_level = new_level;
diff --git a/src/helper/log.h b/src/helper/log.h
index 07c195d28..01917abe2 100644
--- a/src/helper/log.h
+++ b/src/helper/log.h
@@ -40,6 +40,10 @@
* LOG_LVL_DEBUG_USB - verbose USB trace
* In the past this corresponded to build configuration options
--enable-verbose and --enable-verbose-usb-comms.
+ * LOG_LVL_DEBUG_MALLOC - log messages will include the amount of free heap space
+ * maintained by malloc in its free list, if mallinfo is available.
+ * In the past this corresponded to build configuration
+ * option --enable-malloc-logging.
*/
enum log_levels {
LOG_LVL_SILENT = -3,
@@ -50,7 +54,10 @@ enum log_levels {
LOG_LVL_INFO = 2,
LOG_LVL_DEBUG = 3,
LOG_LVL_DEBUG_IO = 4,
+ // LOG_LVL_DEBUG_USB and LOG_LVL_DEBUG_MALLOC have the same value at the moment.
+ // In the future, these logging categories will be individually switchable.
LOG_LVL_DEBUG_USB = 5,
+ LOG_LVL_DEBUG_MALLOC = 5,
};
void log_printf(enum log_levels level, const char *file, unsigned int line,
@@ -109,7 +116,7 @@ extern int debug_level;
#define LOG_DEBUG_IO(expr ...) \
do { \
if (LOG_LEVEL_IS(LOG_LVL_DEBUG_IO)) \
- log_printf_lf(LOG_LVL_DEBUG, \
+ log_printf_lf(LOG_LVL_DEBUG_IO, \
__FILE__, __LINE__, __func__, \
expr); \
} while (0)
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 19 ++-----------------
doc/openocd.texi | 3 ++-
src/helper/log.c | 45 +++++++++++++++++++++++++--------------------
src/helper/log.h | 9 ++++++++-
4 files changed, 37 insertions(+), 39 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:24:01
|
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 aaceff81f064107537c7706dc19ca6ff80ca12c8 (commit)
from 9e1db0e8c7cf7a81f75457e5181e5045a5c245f5 (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 aaceff81f064107537c7706dc19ca6ff80ca12c8
Author: Antonio Borneo <bor...@gm...>
Date: Mon Feb 2 14:52:45 2026 +0100
configure: silent MacOS clang warning gnu-folding-constant
On the specific fork of clang for MacOS, the compiler gets more
strict on the use of GNU folding constants, generating warnings
that halts the build of OpenOCD.
The GNU folding constants are highlighted by upstream clang only
for global variables. E.g.:
const int len = 10;
int array[len];
generates the warning on:
clang -c x.c
x.c:2:5: warning: variable length array folded to constant
array as an extension [-Wgnu-folding-constant]
int array[len];
^
Apparently only the MacOS fork generates warning for folded
constants inside a function. E.g.:
int a(int *x);
int b(void)
{
const int len = 10;
int array[len];
return a*array);
}
does not return error even forcing -Wgnu-folding-constant on clang
upstream.
Current code triggers warning on the following lines due to the
size of the array being computed from a const variable:
jtag/drivers/xds110.c:354 unsigned char data[max_data + 1];
flash/nor/dw-spi.c:950 uint8_t buffer[buffer_size];
flash/nor/dw-spi.c:980 uint8_t buffer[buffer_size];
flash/nor/dw-spi.c:1034 uint8_t buffer[buffer_size];
flash/nor/dw-spi.c:1065 uint8_t buffer[buffer_size];
flash/nor/jtagspi.c:364 uint8_t ..., write_buffer[max], ...;
flash/nor/stmqspi.c:778 char ..., output[(2 + max + 256) * 3 + 8];
flash/nor/xcf.c:392 uint8_t reference[L];
target/target.c:3303 char output[line_bytecnt * 4 + 1];
target/semihosting_common.c:1787 char buf[buf_len];
target/smp.c:59 char hex_buffer[len * 2 + 1];
target/smp.c:60 uint8_t buffer[len];
target/cortex_m.c:296 uint32_t r_vals[n_r32];
target/cortex_m.c:297 uint32_t dhcsr[n_r32];
target/x86_32_common.c:1337 char output[line_bytecnt * 4 + 1];
target/riscv/riscv.c:2377 uint8_t buffer[length];
target/xtensa/xtensa.c:536 uint8_t ops_padded[max_oplen];
While some of the const variable above could be replaced by macros,
for the majority of them I don't see such need, and the use of
const looks to me correct.
Silent the warning adding the clang flag -Wno-gnu-folding-constant.
The flag is not recognized by GCC, but it's silently ignored.
Change-Id: I1d452af115355bc4949b1616648fe6544cc48318
Reported-by: Frank Zeyda <fra...@gm...>
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9431
Tested-by: jenkins
Reviewed-by: Marc Schink <de...@za...>
diff --git a/configure.ac b/configure.ac
index c452cf5d3..5bb76fe00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -763,6 +763,7 @@ AC_DEFINE([_GNU_SOURCE],[1],[Use GNU C library extensions (e.g. stdndup).])
GCC_WARNINGS="-Wall -Wstrict-prototypes -Wformat-security -Wshadow"
AS_IF([test "x${gcc_wextra}" = "xyes"], [
GCC_WARNINGS="${GCC_WARNINGS} -Wextra -Wno-unused-parameter"
+ GCC_WARNINGS="${GCC_WARNINGS} -Wno-gnu-folding-constant"
GCC_WARNINGS="${GCC_WARNINGS} -Wbad-function-cast"
GCC_WARNINGS="${GCC_WARNINGS} -Wcast-align"
GCC_WARNINGS="${GCC_WARNINGS} -Wredundant-decls"
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 1 +
1 file changed, 1 insertion(+)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:23:07
|
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 9e1db0e8c7cf7a81f75457e5181e5045a5c245f5 (commit)
via 22bad00b9b49756b036bc081a1a1f687ae989394 (commit)
via 0e4d6d202ac4a7c15159ab89afb0b18164cedf12 (commit)
via c11a325ed83dc7e70a4a3f202bd9d1fff78bba40 (commit)
from a02550bafae71a020c8094f8a85a49ceefc832fe (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 9e1db0e8c7cf7a81f75457e5181e5045a5c245f5
Author: Antonio Borneo <bor...@gm...>
Date: Sun Feb 1 18:53:18 2026 +0100
transport: don't warn when a transport is selected twice
Selecting the same transport is not an issue.
Move the warning message to debug level.
Change-Id: I52a7fffeb08a5aa6ee8a72af6b740f7e0fbe5b27
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9428
Reviewed-by: Tomas Vanek <va...@fb...>
Tested-by: jenkins
diff --git a/src/transport/transport.c b/src/transport/transport.c
index 5323a7ca0..bb7df408c 100644
--- a/src/transport/transport.c
+++ b/src/transport/transport.c
@@ -352,7 +352,7 @@ COMMAND_HANDLER(handle_transport_select)
transport_single_is_autoselected = false;
return ERROR_OK;
}
- LOG_WARNING("Transport \"%s\" was already selected", CMD_ARGV[0]);
+ LOG_DEBUG("Transport \"%s\" was already selected", CMD_ARGV[0]);
return ERROR_OK;
}
command_print(CMD, "Can't change session's transport after the initial selection was made");
commit 22bad00b9b49756b036bc081a1a1f687ae989394
Author: Antonio Borneo <bor...@gm...>
Date: Sun Feb 1 14:02:03 2026 +0100
target: stm32u0x: add transport swd
The STM32U0xx devices support only SWD.
Add swd transport in the target file.
Remove swd transport from the associated board files.
Change-Id: I2d31856951d15fcf2d1986ee5b1b31464e68db1c
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9427
Reviewed-by: Tomas Vanek <va...@fb...>
Tested-by: jenkins
Reviewed-by: Ahmed Haoues <ahm...@st...>
diff --git a/tcl/board/st/nucleo-u083rc.cfg b/tcl/board/st/nucleo-u083rc.cfg
index 03e956930..eff0cf28a 100644
--- a/tcl/board/st/nucleo-u083rc.cfg
+++ b/tcl/board/st/nucleo-u083rc.cfg
@@ -5,8 +5,6 @@
source [find interface/stlink.cfg]
-transport select swd
-
source [find target/stm32u0x.cfg]
reset_config srst_only
diff --git a/tcl/target/stm32u0x.cfg b/tcl/target/stm32u0x.cfg
index d3aaed3cb..7bce8f6d7 100644
--- a/tcl/target/stm32u0x.cfg
+++ b/tcl/target/stm32u0x.cfg
@@ -4,6 +4,7 @@
#
# STM32U0 devices support only SWD transport.
#
+transport select swd
source [find mem_helper.tcl]
commit 0e4d6d202ac4a7c15159ab89afb0b18164cedf12
Author: Antonio Borneo <bor...@gm...>
Date: Sun Feb 1 14:07:01 2026 +0100
target: stm32l0x: drop swj on swd only target
The STM32L0xx devices support only SWD.
Drop swj support.
Add swd transport.
Remove swd transport from the associated board files.
Change-Id: I5f8fb4344b33f8bdefd67fd86326f4dccb674d92
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9426
Reviewed-by: Tomas Vanek <va...@fb...>
Reviewed-by: Ahmed Haoues <ahm...@st...>
Tested-by: jenkins
diff --git a/tcl/board/stm32l0discovery.cfg b/tcl/board/stm32l0discovery.cfg
index 06d02ed02..2708fc3ae 100644
--- a/tcl/board/stm32l0discovery.cfg
+++ b/tcl/board/stm32l0discovery.cfg
@@ -5,8 +5,6 @@
source [find interface/stlink.cfg]
-transport select swd
-
set WORKAREASIZE 0x2000
source [find target/stm32l0.cfg]
diff --git a/tcl/target/stm32l0.cfg b/tcl/target/stm32l0.cfg
index b4bdb18a4..132490294 100644
--- a/tcl/target/stm32l0.cfg
+++ b/tcl/target/stm32l0.cfg
@@ -1,11 +1,10 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
-# M0+ devices only have SW-DP, but swj-dp code works, just don't
-# set any jtag related features
+# stm32l0x devices support SWD transports only.
#
+transport select swd
-source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
@@ -38,7 +37,7 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x0bc11477
}
-swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
commit c11a325ed83dc7e70a4a3f202bd9d1fff78bba40
Author: Antonio Borneo <bor...@gm...>
Date: Sun Feb 1 13:57:01 2026 +0100
target: stm32g0x: drop swj on swd only target
The datasheets for all STM32G0xx devices report that only SWD is
supported. No TDI/TDO pin is present.
Drop swj support.
Add swd transport.
Remove swd transport from the associated board files.
Change-Id: Ib29171dd614eb84346e90cb447bc7292465095ac
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9425
Reviewed-by: Tomas Vanek <va...@fb...>
Tested-by: jenkins
Reviewed-by: Ahmed Haoues <ahm...@st...>
diff --git a/tcl/board/st_nucleo_g0.cfg b/tcl/board/st_nucleo_g0.cfg
index c68d3d0e5..39036271e 100644
--- a/tcl/board/st_nucleo_g0.cfg
+++ b/tcl/board/st_nucleo_g0.cfg
@@ -12,8 +12,6 @@
source [find interface/stlink.cfg]
-transport select swd
-
source [find target/stm32g0x.cfg]
reset_config srst_only
diff --git a/tcl/target/stm32g0x.cfg b/tcl/target/stm32g0x.cfg
index b6d9a22a2..2a63f689a 100644
--- a/tcl/target/stm32g0x.cfg
+++ b/tcl/target/stm32g0x.cfg
@@ -5,7 +5,8 @@
#
# stm32g0 devices support SWD transports only.
#
-source [find target/swj-dp.tcl]
+transport select swd
+
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
@@ -32,7 +33,7 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x0bc11477
}
-swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
-----------------------------------------------------------------------
Summary of changes:
src/transport/transport.c | 2 +-
tcl/board/st/nucleo-u083rc.cfg | 2 --
tcl/board/st_nucleo_g0.cfg | 2 --
tcl/board/stm32l0discovery.cfg | 2 --
tcl/target/stm32g0x.cfg | 5 +++--
tcl/target/stm32l0.cfg | 7 +++----
tcl/target/stm32u0x.cfg | 1 +
7 files changed, 8 insertions(+), 13 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:22: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 a02550bafae71a020c8094f8a85a49ceefc832fe (commit)
via b164b65b3be74601c306f5880cbd20c4ddc5bf3b (commit)
from e135ffe2058243d4dd0773285f676d87b41a0c53 (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 a02550bafae71a020c8094f8a85a49ceefc832fe
Author: Antonio Borneo <bor...@gm...>
Date: Sun Feb 1 13:48:39 2026 +0100
target: stm32f0x: drop swj on swd only target
The datasheets for all STM32F0xx devices report that only SWD is
supported. No TDI/TDO pin is present.
Drop swj support.
Add swd transport.
Remove swd transport from the associated board files.
Change-Id: I65a08b6a441d794aa209cff8583a971d3546f49e
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9424
Reviewed-by: Ahmed Haoues <ahm...@st...>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <va...@fb...>
diff --git a/tcl/board/st_nucleo_f0.cfg b/tcl/board/st_nucleo_f0.cfg
index 4d8071127..975ea34a9 100644
--- a/tcl/board/st_nucleo_f0.cfg
+++ b/tcl/board/st_nucleo_f0.cfg
@@ -10,8 +10,6 @@
source [find interface/stlink.cfg]
-transport select swd
-
source [find target/stm32f0x.cfg]
reset_config srst_only
diff --git a/tcl/board/stm320518_eval_stlink.cfg b/tcl/board/stm320518_eval_stlink.cfg
index 8f4652eff..d97ecaa11 100644
--- a/tcl/board/stm320518_eval_stlink.cfg
+++ b/tcl/board/stm320518_eval_stlink.cfg
@@ -8,8 +8,6 @@
source [find interface/stlink.cfg]
-transport select swd
-
# increase working area to 8KB
set WORKAREASIZE 0x2000
diff --git a/tcl/board/stm32f0discovery.cfg b/tcl/board/stm32f0discovery.cfg
index 9a8e92153..e58ab156e 100644
--- a/tcl/board/stm32f0discovery.cfg
+++ b/tcl/board/stm32f0discovery.cfg
@@ -5,8 +5,6 @@
source [find interface/stlink.cfg]
-transport select swd
-
set WORKAREASIZE 0x2000
source [find target/stm32f0x.cfg]
diff --git a/tcl/target/stm32f0x.cfg b/tcl/target/stm32f0x.cfg
index 5b8954eb2..06c8fa559 100644
--- a/tcl/target/stm32f0x.cfg
+++ b/tcl/target/stm32f0x.cfg
@@ -5,7 +5,8 @@
#
# stm32 devices support SWD transports only.
#
-source [find target/swj-dp.tcl]
+transport select swd
+
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
@@ -41,7 +42,7 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x0bb11477
}
-swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
commit b164b65b3be74601c306f5880cbd20c4ddc5bf3b
Author: Antonio Borneo <bor...@gm...>
Date: Sun Feb 1 13:32:20 2026 +0100
target: stm32c0x: drop swj on swd only target
The datasheets for all STM32C0xx devices report that only SWD is
supported. No TDI/TDO pin is present.
Drop swj support.
Add swd transport.
Remove swd transport from the associated board files.
Change-Id: If6e630858aa64fbb3938a520604748f3f0ff7356
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9423
Reviewed-by: Tomas Vanek <va...@fb...>
Reviewed-by: Ahmed Haoues <ahm...@st...>
Tested-by: jenkins
diff --git a/tcl/board/st_nucleo_c0.cfg b/tcl/board/st_nucleo_c0.cfg
index 845b7b50e..a4c0c4f42 100644
--- a/tcl/board/st_nucleo_c0.cfg
+++ b/tcl/board/st_nucleo_c0.cfg
@@ -2,8 +2,6 @@
source [find interface/stlink.cfg]
-transport select swd
-
source [find target/stm32c0x.cfg]
reset_config srst_only
diff --git a/tcl/target/stm32c0x.cfg b/tcl/target/stm32c0x.cfg
index d01512031..35c0c5dc4 100644
--- a/tcl/target/stm32c0x.cfg
+++ b/tcl/target/stm32c0x.cfg
@@ -4,8 +4,8 @@
#
# stm32c0 devices support SWD transports only.
#
+transport select swd
-source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
@@ -32,7 +32,7 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x0bc11477
}
-swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
-----------------------------------------------------------------------
Summary of changes:
tcl/board/st_nucleo_c0.cfg | 2 --
tcl/board/st_nucleo_f0.cfg | 2 --
tcl/board/stm320518_eval_stlink.cfg | 2 --
tcl/board/stm32f0discovery.cfg | 2 --
tcl/target/stm32c0x.cfg | 4 ++--
tcl/target/stm32f0x.cfg | 5 +++--
6 files changed, 5 insertions(+), 12 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:20:16
|
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 e135ffe2058243d4dd0773285f676d87b41a0c53 (commit)
from 86bdd882821d0f53ea14c6f1637bdb340dfc4117 (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 e135ffe2058243d4dd0773285f676d87b41a0c53
Author: Tomas Vanek <va...@fb...>
Date: Tue Feb 3 22:12:05 2026 +0100
tcl/target/numicro*: drop swj on swd only target
Historically swj_newdap was necessary to handle HLA properly
Since commit 60f104f45013 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.
There are no relevant board files.
Change-Id: I2119e0c0895ca97895ade92a1b1becef6bd6cfdb
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9438
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/tcl/target/numicro.cfg b/tcl/target/numicro.cfg
index 29077f39f..e492fa160 100644
--- a/tcl/target/numicro.cfg
+++ b/tcl/target/numicro.cfg
@@ -2,8 +2,7 @@
# script for Nuvoton MuMicro Cortex-M0 Series
-# Adapt based on what transport is active.
-source [find target/swj-dp.tcl]
+transport select swd
# Set Chipname
if { [info exists CHIPNAME] } {
@@ -29,7 +28,7 @@ if { [info exists WORKAREASIZE] } {
# Debug Adapter Target Settings
-swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUDAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUDAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
diff --git a/tcl/target/numicro_m4.cfg b/tcl/target/numicro_m4.cfg
index 1302515d3..ac242c417 100644
--- a/tcl/target/numicro_m4.cfg
+++ b/tcl/target/numicro_m4.cfg
@@ -2,7 +2,7 @@
# script for Nuvoton MuMicro Cortex-M4 Series
-source [find target/swj-dp.tcl]
+transport select swd
# Set Chipname
if { [info exists CHIPNAME] } {
@@ -28,7 +28,7 @@ if { [info exists WORKAREASIZE] } {
# Debug Adapter Target Settings
-swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUDAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUDAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
-----------------------------------------------------------------------
Summary of changes:
tcl/target/numicro.cfg | 5 ++---
tcl/target/numicro_m4.cfg | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:19:49
|
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 86bdd882821d0f53ea14c6f1637bdb340dfc4117 (commit)
via 0163d9ddba9455da5adf91ff6906250a878b27fb (commit)
from e85f9b2954a5b06984c2e703be383f53538b028a (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 86bdd882821d0f53ea14c6f1637bdb340dfc4117
Author: Tomas Vanek <va...@fb...>
Date: Tue Feb 3 21:57:00 2026 +0100
tcl/target/lpc8nxx: drop swj on swd only target
Historically swj_newdap was necessary to handle HLA properly
Since commit 60f104f45013 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.
There are no relevant board files.
Change-Id: Id66a808475f061307fc6a0b3e0d2a9840b543e7f
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9437
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/tcl/target/lpc8nxx.cfg b/tcl/target/lpc8nxx.cfg
index 859e99b6a..6f1f88df4 100644
--- a/tcl/target/lpc8nxx.cfg
+++ b/tcl/target/lpc8nxx.cfg
@@ -5,8 +5,8 @@
# Based on NXP proposal https://community.nxp.com/message/1011149
# Many thanks to Dries Moors from NXP support.
# SWD only transport
+transport select swd
-source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
@@ -15,7 +15,7 @@ if { [info exists CHIPNAME] } {
set _CHIPNAME lpc8nxx
}
-swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id 0
+swd newdap $_CHIPNAME cpu -expected-id 0
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
commit 0163d9ddba9455da5adf91ff6906250a878b27fb
Author: Tomas Vanek <va...@fb...>
Date: Tue Feb 3 21:48:01 2026 +0100
tcl/target/psoc4: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f45013 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.
There are no relevant board files.
Change-Id: I7ff7b2dee316c10a24e2ab38f8c03f504295d868
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9436
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/tcl/target/psoc4.cfg b/tcl/target/psoc4.cfg
index baa2c83f4..f9673638e 100644
--- a/tcl/target/psoc4.cfg
+++ b/tcl/target/psoc4.cfg
@@ -5,7 +5,7 @@
#
# PSoC 4 devices support SWD transports only.
#
-source [find target/swj-dp.tcl]
+transport select swd
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
@@ -27,7 +27,7 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x0bb11477
}
-swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
-----------------------------------------------------------------------
Summary of changes:
tcl/target/lpc8nxx.cfg | 4 ++--
tcl/target/psoc4.cfg | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:19:32
|
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 e85f9b2954a5b06984c2e703be383f53538b028a (commit)
from a7d31c87e1c5893bd6e1f409e66e1132863553a0 (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 e85f9b2954a5b06984c2e703be383f53538b028a
Author: Tomas Vanek <va...@fb...>
Date: Tue Feb 3 21:36:52 2026 +0100
tcl/target/nordic: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f45013 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.
Drop 'transport select swd' from board files referring to
these targets.
While on it remove useless endianness option handling.
Change-Id: Icb4c04c79998369059044c203edcca61648aa936
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9435
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/tcl/board/nordic/nrf51-dk.cfg b/tcl/board/nordic/nrf51-dk.cfg
index 4ccd3272e..dee63cc7f 100644
--- a/tcl/board/nordic/nrf51-dk.cfg
+++ b/tcl/board/nordic/nrf51-dk.cfg
@@ -5,7 +5,4 @@
#
source [find interface/jlink.cfg]
-
-transport select swd
-
source [find target/nordic/nrf51.cfg]
diff --git a/tcl/board/nordic/nrf52-dk.cfg b/tcl/board/nordic/nrf52-dk.cfg
index 9b2390a62..c35d5c7c6 100644
--- a/tcl/board/nordic/nrf52-dk.cfg
+++ b/tcl/board/nordic/nrf52-dk.cfg
@@ -5,7 +5,4 @@
#
source [find interface/jlink.cfg]
-
-transport select swd
-
source [find target/nordic/nrf52.cfg]
diff --git a/tcl/board/nordic/nrf5340-dk.cfg b/tcl/board/nordic/nrf5340-dk.cfg
index fd7a40d66..8d5c11101 100644
--- a/tcl/board/nordic/nrf5340-dk.cfg
+++ b/tcl/board/nordic/nrf5340-dk.cfg
@@ -6,7 +6,4 @@
#
source [find interface/jlink.cfg]
-
-transport select swd
-
source [find target/nordic/nrf53.cfg]
diff --git a/tcl/board/nordic/nrf9160-dk.cfg b/tcl/board/nordic/nrf9160-dk.cfg
index dc456202c..b3deedaa8 100644
--- a/tcl/board/nordic/nrf9160-dk.cfg
+++ b/tcl/board/nordic/nrf9160-dk.cfg
@@ -6,7 +6,4 @@
#
source [find interface/jlink.cfg]
-
-transport select swd
-
source [find target/nordic/nrf91.cfg]
diff --git a/tcl/target/nordic/nrf51.cfg b/tcl/target/nordic/nrf51.cfg
index 3781eccb5..959ee432f 100644
--- a/tcl/target/nordic/nrf51.cfg
+++ b/tcl/target/nordic/nrf51.cfg
@@ -3,8 +3,8 @@
#
# script for Nordic nRF51 series, a Cortex-M0 chip
#
-
-source [find target/swj-dp.tcl]
+# Devices support SWD transport only
+transport select swd
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
@@ -12,12 +12,6 @@ if { [info exists CHIPNAME] } {
set _CHIPNAME nrf51
}
-if { [info exists ENDIAN] } {
- set _ENDIAN $ENDIAN
-} else {
- set _ENDIAN little
-}
-
# Work-area is a space in RAM used for flash programming
# By default use 16kB
if { [info exists WORKAREASIZE] } {
@@ -32,7 +26,7 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x0bb11477
}
-swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
diff --git a/tcl/target/nordic/nrf52.cfg b/tcl/target/nordic/nrf52.cfg
index 0703b1886..c151283da 100644
--- a/tcl/target/nordic/nrf52.cfg
+++ b/tcl/target/nordic/nrf52.cfg
@@ -3,8 +3,9 @@
#
# Nordic nRF52 series: ARM Cortex-M4 @ 64 MHz
#
+# Devices support SWD transport only
+transport select swd
-source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
@@ -27,7 +28,7 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x2ba01477
}
-swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
diff --git a/tcl/target/nordic/nrf53.cfg b/tcl/target/nordic/nrf53.cfg
index 0dcfd55ec..ce2eaf045 100644
--- a/tcl/target/nordic/nrf53.cfg
+++ b/tcl/target/nordic/nrf53.cfg
@@ -3,8 +3,9 @@
#
# Nordic nRF53 series: dual ARM Cortex-M33, multidrop SWD
#
+# Devices support SWD transport only
+transport select swd
-source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
@@ -34,7 +35,7 @@ if { [info exists SWD_INSTANCE_ID] } {
set _SWD_INSTANCE_ID 0
}
-swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
if { [info exists SWD_MULTIDROP] } {
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu -dp-id 0x0070289 -instance-id $_SWD_INSTANCE_ID
diff --git a/tcl/target/nordic/nrf91.cfg b/tcl/target/nordic/nrf91.cfg
index 64ed864e7..826d62776 100644
--- a/tcl/target/nordic/nrf91.cfg
+++ b/tcl/target/nordic/nrf91.cfg
@@ -3,8 +3,9 @@
#
# Nordic nRF91 series: ARM Cortex-M33, SWD only
#
+# Devices support SWD transport only
+transport select swd
-source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
@@ -27,7 +28,7 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x6ba02477
}
-swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
# Contrary to the product specification at least nRF9161 supports multidrop SWD.
# The instance ID is fixed, no more than one nRF91 can be connected to one SWD bus.
-----------------------------------------------------------------------
Summary of changes:
tcl/board/nordic/nrf51-dk.cfg | 3 ---
tcl/board/nordic/nrf52-dk.cfg | 3 ---
tcl/board/nordic/nrf5340-dk.cfg | 3 ---
tcl/board/nordic/nrf9160-dk.cfg | 3 ---
tcl/target/nordic/nrf51.cfg | 12 +++---------
tcl/target/nordic/nrf52.cfg | 5 +++--
tcl/target/nordic/nrf53.cfg | 5 +++--
tcl/target/nordic/nrf91.cfg | 5 +++--
8 files changed, 12 insertions(+), 27 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:19:14
|
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 a7d31c87e1c5893bd6e1f409e66e1132863553a0 (commit)
from 2374db956b0fb280c98653c0af9551ba69b5c7d5 (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 a7d31c87e1c5893bd6e1f409e66e1132863553a0
Author: Tomas Vanek <va...@fb...>
Date: Tue Feb 3 21:24:17 2026 +0100
tcl/target/klx, ke0x: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f45013 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.
No board files referring these targets select swd transport.
Change-Id: I002ce7029936f56b1d8b41505bca8dc771c33187
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9434
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/tcl/target/ke0x.cfg b/tcl/target/ke0x.cfg
index b35776719..761a0a697 100644
--- a/tcl/target/ke0x.cfg
+++ b/tcl/target/ke0x.cfg
@@ -3,8 +3,8 @@
#
# Freescale Kinetis KE0x and KEAx series devices
#
-
-source [find target/swj-dp.tcl]
+# Devices support SWD transport only
+transport select swd
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
@@ -26,7 +26,7 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x0bc11477
}
-swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
diff --git a/tcl/target/klx.cfg b/tcl/target/klx.cfg
index cd236b339..b4014ba5b 100644
--- a/tcl/target/klx.cfg
+++ b/tcl/target/klx.cfg
@@ -4,8 +4,8 @@
# NXP (former Freescale) Kinetis KL series devices
# Also used for Cortex-M0+ equipped members of KVx and KE1xZ series
#
-
-source [find target/swj-dp.tcl]
+# Devices support SWD transport only
+transport select swd
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
@@ -27,7 +27,7 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x0bc11477
}
-swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
-----------------------------------------------------------------------
Summary of changes:
tcl/target/ke0x.cfg | 6 +++---
tcl/target/klx.cfg | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:18:49
|
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 2374db956b0fb280c98653c0af9551ba69b5c7d5 (commit)
via 9b21a31eb7d7d0a56676b37ea0e16f81586557db (commit)
from 2b986178cfee4244953defde1868997b6172c8e6 (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 2374db956b0fb280c98653c0af9551ba69b5c7d5
Author: Tomas Vanek <va...@fb...>
Date: Tue Feb 3 21:03:38 2026 +0100
tcl/target/at91samd, atsame5x: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f45013 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.
No board files referring these targets select swd transport.
While on it remove useless endianness option handling.
Change-Id: I3b47750cc69fc9009fdd4cfdccfc213792d1b7ee
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9433
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/tcl/target/at91samdXX.cfg b/tcl/target/at91samdXX.cfg
index 5132109ba..893854309 100644
--- a/tcl/target/at91samdXX.cfg
+++ b/tcl/target/at91samdXX.cfg
@@ -7,7 +7,7 @@
#
# samdXX devices only support SWD transports.
#
-source [find target/swj-dp.tcl]
+transport select swd
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
@@ -15,12 +15,6 @@ if { [info exists CHIPNAME] } {
set _CHIPNAME at91samd
}
-if { [info exists ENDIAN] } {
- set _ENDIAN $ENDIAN
-} else {
- set _ENDIAN little
-}
-
# Work-area is a space in RAM used for flash programming
# By default use 2kB
if { [info exists WORKAREASIZE] } {
@@ -35,11 +29,11 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x4ba00477
}
-swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
+target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
diff --git a/tcl/target/atsame5x.cfg b/tcl/target/atsame5x.cfg
index 5093d41b0..0f759a242 100644
--- a/tcl/target/atsame5x.cfg
+++ b/tcl/target/atsame5x.cfg
@@ -8,7 +8,7 @@
#
# Devices only support SWD transports.
#
-source [find target/swj-dp.tcl]
+transport select swd
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
@@ -16,12 +16,6 @@ if { [info exists CHIPNAME] } {
set _CHIPNAME atsame5
}
-if { [info exists ENDIAN] } {
- set _ENDIAN $ENDIAN
-} else {
- set _ENDIAN little
-}
-
# Work-area is a space in RAM used for flash programming
# By default use 32kB (the smallest RAM size is 128kB)
if { [info exists WORKAREASIZE] } {
@@ -36,11 +30,11 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x4ba00477
}
-swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
+target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
commit 9b21a31eb7d7d0a56676b37ea0e16f81586557db
Author: Tomas Vanek <va...@fb...>
Date: Sat Jan 31 20:40:52 2026 +0100
tcl/target/rp2040, rp2350: use swd newdap instead of swj_newdap
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f45013 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.
Change-Id: Ib4d7eb5935e0b44087cc8ea73ab187a417413db6
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9421
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/tcl/target/rp2040.cfg b/tcl/target/rp2040.cfg
index 262de4418..e60892ebd 100644
--- a/tcl/target/rp2040.cfg
+++ b/tcl/target/rp2040.cfg
@@ -6,8 +6,6 @@
# The device requires multidrop SWD for debug.
transport select swd
-source [find target/swj-dp.tcl]
-
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
@@ -50,7 +48,7 @@ if { [info exists USE_CORE] } {
}
set _BOTH_CORES [expr { $_USE_CORE != 0 && $_USE_CORE != 1 }]
-swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
# The rescue debug port uses the DP CTRL/STAT bit DBGPWRUPREQ to reset the
# PSM (power on state machine) of the RP2040 with a flag set in the
diff --git a/tcl/target/rp2350.cfg b/tcl/target/rp2350.cfg
index be51931ec..afa16261c 100644
--- a/tcl/target/rp2350.cfg
+++ b/tcl/target/rp2350.cfg
@@ -5,8 +5,6 @@
transport select swd
-source [find target/swj-dp.tcl]
-
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
@@ -51,7 +49,7 @@ if { [info exists USE_CORE] } {
set _USE_CORE { cm0 cm1 }
}
-swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
if { [info exists SWD_MULTIDROP] } {
dap create $_CHIPNAME.dap -adiv6 -chain-position $_CHIPNAME.cpu -dp-id 0x0040927 -instance-id 0
-----------------------------------------------------------------------
Summary of changes:
tcl/target/at91samdXX.cfg | 12 +++---------
tcl/target/atsame5x.cfg | 12 +++---------
tcl/target/rp2040.cfg | 4 +---
tcl/target/rp2350.cfg | 4 +---
4 files changed, 8 insertions(+), 24 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:15:57
|
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 2b986178cfee4244953defde1868997b6172c8e6 (commit)
via 8ee7cb12cf8838e91329dccb3647a611cf53186a (commit)
via 3c1bd502177ddb1af7e1df3b4d11fa0dd3a0fc27 (commit)
from 5151c9845581ccd17e3ca3b9024f287f3f6c43de (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 2b986178cfee4244953defde1868997b6172c8e6
Author: Tomas Vanek <va...@fb...>
Date: Thu Apr 11 08:39:10 2019 +0200
flash: read only alias
Similar as virtual flash but has write/erase suppressed.
'virtual' flash driver name check in flash_free_all_banks()
was replaced by a customized free_driver_priv()
Change-Id: I528760aad0ba55ebc57fc1fabfdfdf07c92cac94
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5107
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/doc/openocd.texi b/doc/openocd.texi
index 9b81cf638..4c5df9b88 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -6160,7 +6160,7 @@ Some drivers also activate driver-specific commands.
This is a special driver that maps a previously defined bank to another
address. All bank settings will be copied from the master physical bank.
-The @var{virtual} driver defines one mandatory parameters,
+The @var{virtual} driver defines one mandatory parameter,
@itemize
@item @var{master_bank} The bank that this virtual address refers to.
@@ -6178,6 +6178,18 @@ flash bank vbank1 virtual 0x9fc00000 0 0 0 \
@end example
@end deffn
+@deffn {Flash Driver} ro_alias
+Similar as @var{virtual} driver but suppresses write
+and erase. Use to build a complete memory map for gdb.
+Bank size will be copied from the master physical bank.
+
+The @var{virtual} driver defines one mandatory parameter,
+
+@itemize
+@item @var{master_bank} The bank that this virtual address refers to.
+@end itemize
+@end deffn
+
@deffn {Flash Driver} read_only
A stub driver without write and erase.
Use to define a ROM region for the gdb memory map.
diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c
index 4db8b8af9..48440662e 100644
--- a/src/flash/nor/core.c
+++ b/src/flash/nor/core.c
@@ -223,15 +223,8 @@ void flash_free_all_banks(void)
else
LOG_WARNING("Flash driver of %s does not support free_driver_priv()", bank->name);
- /* For 'virtual' flash driver bank->sectors and bank->prot_blocks pointers are copied from
- * master flash_bank structure. They point to memory locations allocated by master flash driver
- * so master driver is responsible for releasing them.
- * Avoid UB caused by double-free memory corruption if flash bank is 'virtual'. */
-
- if (strcmp(bank->driver->name, "virtual") != 0) {
- free(bank->sectors);
- free(bank->prot_blocks);
- }
+ free(bank->sectors);
+ free(bank->prot_blocks);
free(bank->name);
free(bank);
diff --git a/src/flash/nor/driver.h b/src/flash/nor/driver.h
index 253de9c0a..afb73a3fb 100644
--- a/src/flash/nor/driver.h
+++ b/src/flash/nor/driver.h
@@ -294,6 +294,7 @@ extern const struct flash_driver psoc6_flash;
extern const struct flash_driver qn908x_flash;
extern const struct flash_driver read_only_flash;
extern const struct flash_driver renesas_rpchf_flash;
+extern const struct flash_driver ro_alias_flash;
extern const struct flash_driver rp2xxx_flash;
extern const struct flash_driver rsl10_flash;
extern const struct flash_driver sh_qspi_flash;
diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c
index 86d7ce4ba..094b5a76b 100644
--- a/src/flash/nor/drivers.c
+++ b/src/flash/nor/drivers.c
@@ -72,6 +72,7 @@ static const struct flash_driver * const flash_drivers[] = {
&psoc6_flash,
&qn908x_flash,
&read_only_flash,
+ &ro_alias_flash,
&renesas_rpchf_flash,
&rp2xxx_flash,
&rsl10_flash,
diff --git a/src/flash/nor/virtual.c b/src/flash/nor/virtual.c
index 9db9b9216..5b8a3c5b7 100644
--- a/src/flash/nor/virtual.c
+++ b/src/flash/nor/virtual.c
@@ -1,9 +1,10 @@
// SPDX-License-Identifier: GPL-2.0-or-later
-/***************************************************************************
- * Copyright (C) 2010 by Spencer Oliver *
- * sp...@sp... *
- ***************************************************************************/
+/*
+ * Copyright (C) 2010 by Spencer Oliver <sp...@sp...>
+ *
+ * Copyright (C) 2019 by Tomas Vanek <va...@fb...>
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -31,6 +32,9 @@ static void virtual_update_bank_info(struct flash_bank *bank)
/* update the info we do not have */
bank->size = master_bank->size;
+ if (bank->read_only)
+ return;
+
bank->chip_width = master_bank->chip_width;
bank->bus_width = master_bank->bus_width;
bank->erased_value = master_bank->erased_value;
@@ -187,6 +191,19 @@ static int virtual_flash_read(struct flash_bank *bank,
return master_bank->driver->read(master_bank, buffer, offset, count);
}
+void virtual_flash_free_driver_priv(struct flash_bank *bank)
+{
+ free(bank->driver_priv);
+ bank->driver_priv = NULL;
+
+ /* For 'virtual' flash driver bank->sectors and bank->prot_blocks pointers are copied from
+ * master flash_bank structure. They point to memory locations allocated by master flash driver
+ * so master driver is responsible for releasing them.
+ * Avoid UB caused by double-free memory corruption if flash bank is 'virtual'. */
+ bank->sectors = NULL;
+ bank->prot_blocks = NULL;
+}
+
const struct flash_driver virtual_flash = {
.name = "virtual",
.flash_bank_command = virtual_flash_bank_command,
@@ -199,5 +216,62 @@ const struct flash_driver virtual_flash = {
.erase_check = virtual_blank_check,
.protect_check = virtual_protect_check,
.info = virtual_info,
- .free_driver_priv = default_flash_free_driver_priv,
+ .free_driver_priv = virtual_flash_free_driver_priv,
+};
+
+FLASH_BANK_COMMAND_HANDLER(ro_alias_bank_command)
+{
+ if (CMD_ARGC < 7)
+ return ERROR_COMMAND_SYNTAX_ERROR;
+
+ // get the master flash bank
+ const char *bank_name = CMD_ARGV[6];
+ struct flash_bank *master_bank = get_flash_bank_by_name_noprobe(bank_name);
+
+ if (!master_bank) {
+ LOG_ERROR("master flash bank '%s' does not exist", bank_name);
+ return ERROR_FLASH_OPERATION_FAILED;
+ }
+
+ // save master bank name - use this to get settings later
+ bank->driver_priv = strdup(bank_name);
+
+ bank->read_only = true;
+
+ return ERROR_OK;
+}
+
+static int ro_alias_erase(struct flash_bank *bank,
+ unsigned int first, unsigned int last)
+{
+ char *bank_name = bank->driver_priv;
+
+ LOG_ERROR("Erase of read-only flash alias refused. Use master flash bank '%s'",
+ bank_name);
+
+ return ERROR_FAIL;
+}
+
+static int ro_alias_write(struct flash_bank *bank, const uint8_t *buffer,
+ uint32_t offset, uint32_t count)
+{
+ char *bank_name = bank->driver_priv;
+
+ LOG_ERROR("Write to read-only flash alias refused. Use master flash bank '%s'",
+ bank_name);
+
+ return ERROR_FAIL;
+}
+
+const struct flash_driver ro_alias_flash = {
+ .name = "ro_alias",
+ .flash_bank_command = ro_alias_bank_command,
+ .erase = ro_alias_erase,
+ .write = ro_alias_write,
+ .read = virtual_flash_read,
+ .probe = virtual_probe,
+ .auto_probe = virtual_auto_probe,
+ .erase_check = virtual_blank_check,
+ .info = virtual_info,
+ .free_driver_priv = virtual_flash_free_driver_priv,
};
commit 8ee7cb12cf8838e91329dccb3647a611cf53186a
Author: Tomas Vanek <va...@fb...>
Date: Thu Apr 11 08:29:15 2019 +0200
flash: ROM support
The only reason to define a read-only region is that gdb needs
a complete memory map to choose hard or soft breakpoints properly.
Change-Id: I9d05cb6b91f054ad5cc9333af6b14eb433dbdc99
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5106
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/doc/openocd.texi b/doc/openocd.texi
index 325235bb7..9b81cf638 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -6178,6 +6178,16 @@ flash bank vbank1 virtual 0x9fc00000 0 0 0 \
@end example
@end deffn
+@deffn {Flash Driver} read_only
+A stub driver without write and erase.
+Use to define a ROM region for the gdb memory map.
+
+@example
+flash bank $_CHIPNAME.sysrom read_only 0x1ff00000 0xedc0 0 0 \
+ $_TARGETNAME
+@end example
+@end deffn
+
@subsection External Flash
@deffn {Flash Driver} {cfi}
diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am
index d95249c2e..5c4737f7a 100644
--- a/src/flash/nor/Makefile.am
+++ b/src/flash/nor/Makefile.am
@@ -60,6 +60,7 @@ NOR_DRIVERS = \
%D%/psoc5lp.c \
%D%/psoc6.c \
%D%/qn908x.c \
+ %D%/read_only.c \
%D%/renesas_rpchf.c \
%D%/rp2xxx.c \
%D%/rsl10.c \
diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c
index 9d24548f4..4db8b8af9 100644
--- a/src/flash/nor/core.c
+++ b/src/flash/nor/core.c
@@ -44,6 +44,11 @@ int flash_driver_protect(struct flash_bank *bank, int set, unsigned int first,
int retval;
unsigned int num_blocks;
+ if (!bank->driver->protect) {
+ LOG_ERROR("Flash protection is not supported");
+ return ERROR_FLASH_OPER_UNSUPPORTED;
+ }
+
if (bank->num_prot_blocks)
num_blocks = bank->num_prot_blocks;
else
@@ -59,11 +64,6 @@ int flash_driver_protect(struct flash_bank *bank, int set, unsigned int first,
/* force "set" to 0/1 */
set = !!set;
- if (!bank->driver->protect) {
- LOG_ERROR("Flash protection is not supported.");
- return ERROR_FLASH_OPER_UNSUPPORTED;
- }
-
/* DANGER!
*
* We must not use any cached information about protection state!!!!
diff --git a/src/flash/nor/core.h b/src/flash/nor/core.h
index f8cf5e269..55ea3c7e5 100644
--- a/src/flash/nor/core.h
+++ b/src/flash/nor/core.h
@@ -84,6 +84,8 @@ struct flash_bank {
target_addr_t base; /**< The base address of this bank */
uint32_t size; /**< The size of this chip bank, in bytes */
+ bool read_only; /**< a ROM region - mainly to list in gdb memory map */
+
unsigned int chip_width; /**< Width of the chip in bytes (1,2,4 bytes) */
unsigned int bus_width; /**< Maximum bus width, in bytes (1,2,4 bytes) */
diff --git a/src/flash/nor/driver.h b/src/flash/nor/driver.h
index 872e450b4..253de9c0a 100644
--- a/src/flash/nor/driver.h
+++ b/src/flash/nor/driver.h
@@ -292,6 +292,7 @@ extern const struct flash_driver psoc5lp_flash;
extern const struct flash_driver psoc5lp_nvl_flash;
extern const struct flash_driver psoc6_flash;
extern const struct flash_driver qn908x_flash;
+extern const struct flash_driver read_only_flash;
extern const struct flash_driver renesas_rpchf_flash;
extern const struct flash_driver rp2xxx_flash;
extern const struct flash_driver rsl10_flash;
diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c
index 19015554b..86d7ce4ba 100644
--- a/src/flash/nor/drivers.c
+++ b/src/flash/nor/drivers.c
@@ -71,6 +71,7 @@ static const struct flash_driver * const flash_drivers[] = {
&psoc5lp_nvl_flash,
&psoc6_flash,
&qn908x_flash,
+ &read_only_flash,
&renesas_rpchf_flash,
&rp2xxx_flash,
&rsl10_flash,
diff --git a/src/flash/nor/read_only.c b/src/flash/nor/read_only.c
new file mode 100644
index 000000000..5459d9b3a
--- /dev/null
+++ b/src/flash/nor/read_only.c
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/*
+ * Copyright (C) 2019 by Tomas Vanek <va...@fb...>
+ *
+ * To declare a read-only region for GDB memory map.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "imp.h"
+
+FLASH_BANK_COMMAND_HANDLER(rom_bank_command)
+{
+ bank->read_only = true;
+ return ERROR_OK;
+}
+
+static int rom_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
+{
+ LOG_ERROR("Erase of read-only memory refused");
+ return ERROR_FAIL;
+}
+
+static int rom_write(struct flash_bank *bank, const uint8_t *buffer,
+ uint32_t offset, uint32_t count)
+{
+ LOG_ERROR("Write to read-only memory refused");
+ return ERROR_FAIL;
+}
+
+static int rom_probe(struct flash_bank *bank)
+{
+ return ERROR_OK;
+}
+
+const struct flash_driver read_only_flash = {
+ .name = "read_only",
+ .flash_bank_command = rom_bank_command,
+ .erase = rom_erase,
+ .write = rom_write,
+ .read = default_flash_read,
+ .probe = rom_probe,
+ .auto_probe = rom_probe,
+ .erase_check = default_flash_blank_check,
+
+ // ROM driver doesn't set driver_priv, free(NULL) makes no harm
+ .free_driver_priv = default_flash_free_driver_priv,
+};
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 6866f6e9d..b966e8593 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -2004,52 +2004,58 @@ static int gdb_memory_map(struct connection *connection,
"length=\"" TARGET_ADDR_FMT "\"/>\n",
ram_start, p->base - ram_start);
- /* Report adjacent groups of same-size sectors. So for
- * example top boot CFI flash will list an initial region
- * with several large sectors (maybe 128KB) and several
- * smaller ones at the end (maybe 32KB). STR7 will have
- * regions with 8KB, 32KB, and 64KB sectors; etc.
- */
- for (unsigned int j = 0; j < p->num_sectors; j++) {
-
- /* Maybe start a new group of sectors. */
- if (sector_size == 0) {
- if (p->sectors[j].offset + p->sectors[j].size > p->size) {
- LOG_WARNING("The flash sector at offset 0x%08" PRIx32
- " overflows the end of %s bank.",
- p->sectors[j].offset, p->name);
- LOG_WARNING("The rest of bank will not show in gdb memory map.");
- break;
+ if (p->read_only) {
+ xml_printf(&retval, &xml, &pos, &size,
+ "<memory type=\"rom\" start=\"" TARGET_ADDR_FMT "\" "
+ "length=\"0x%x\"/>\n",
+ p->base, p->size);
+ } else {
+ /* Report adjacent groups of same-size sectors. So for
+ * example top boot CFI flash will list an initial region
+ * with several large sectors (maybe 128KB) and several
+ * smaller ones at the end (maybe 32KB). STR7 will have
+ * regions with 8KB, 32KB, and 64KB sectors; etc.
+ */
+ for (unsigned int j = 0; j < p->num_sectors; j++) {
+ // Maybe start a new group of sectors
+ if (sector_size == 0) {
+ if (p->sectors[j].offset + p->sectors[j].size > p->size) {
+ LOG_WARNING("The flash sector at offset 0x%08" PRIx32
+ " overflows the end of %s bank.",
+ p->sectors[j].offset, p->name);
+ LOG_WARNING("The rest of bank will not show in gdb memory map.");
+ break;
+ }
+ target_addr_t start;
+ start = p->base + p->sectors[j].offset;
+ xml_printf(&retval, &xml, &pos, &size,
+ "<memory type=\"flash\" "
+ "start=\"" TARGET_ADDR_FMT "\" ",
+ start);
+ sector_size = p->sectors[j].size;
+ group_len = sector_size;
+ } else {
+ group_len += sector_size; /* equal to p->sectors[j].size */
}
- target_addr_t start;
- start = p->base + p->sectors[j].offset;
- xml_printf(&retval, &xml, &pos, &size,
- "<memory type=\"flash\" "
- "start=\"" TARGET_ADDR_FMT "\" ",
- start);
- sector_size = p->sectors[j].size;
- group_len = sector_size;
- } else {
- group_len += sector_size; /* equal to p->sectors[j].size */
- }
- /* Does this finish a group of sectors?
- * If not, continue an already-started group.
- */
- if (j < p->num_sectors - 1
- && p->sectors[j + 1].size == sector_size
- && p->sectors[j + 1].offset == p->sectors[j].offset + sector_size
- && p->sectors[j + 1].offset + p->sectors[j + 1].size <= p->size)
- continue;
+ /* Does this finish a group of sectors?
+ * If not, continue an already-started group.
+ */
+ if (j < p->num_sectors - 1
+ && p->sectors[j + 1].size == sector_size
+ && p->sectors[j + 1].offset == p->sectors[j].offset + sector_size
+ && p->sectors[j + 1].offset + p->sectors[j + 1].size <= p->size)
+ continue;
- xml_printf(&retval, &xml, &pos, &size,
- "length=\"0x%x\">\n"
- "<property name=\"blocksize\">"
- "0x%x</property>\n"
- "</memory>\n",
- group_len,
- sector_size);
- sector_size = 0;
+ xml_printf(&retval, &xml, &pos, &size,
+ "length=\"0x%x\">\n"
+ "<property name=\"blocksize\">"
+ "0x%x</property>\n"
+ "</memory>\n",
+ group_len,
+ sector_size);
+ sector_size = 0;
+ }
}
ram_start = p->base + p->size;
commit 3c1bd502177ddb1af7e1df3b4d11fa0dd3a0fc27
Author: Antonio Borneo <bor...@gm...>
Date: Thu Dec 25 15:53:07 2025 +0100
target: clean up return value of target_type::blank_check_memory()
The functions in struct target_type::blank_check_memory() return
either an OpenOCD error or a positive value that indicates the
number of blocks checked.
To prevent the mix of error codes and returned values, return the
value through an additional parameter 'checked' and then return
ERROR_OK.
While there:
- change to unsigned int the parameter 'num_blocks';
- in armv7m_blank_check_memory() verify that the working area can
contain at least two 'algo_block'.
Change-Id: Ie22f5816819bc77ec611c3f251373d026ed9f784
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9386
Tested-by: jenkins
Reviewed-by: Tomas Vanek <va...@fb...>
diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c
index 5c4f2acca..9d24548f4 100644
--- a/src/flash/nor/core.c
+++ b/src/flash/nor/core.c
@@ -400,17 +400,18 @@ int default_flash_blank_check(struct flash_bank *bank)
bool fast_check = true;
for (unsigned int i = 0; i < bank->num_sectors; ) {
+ unsigned int checked;
retval = target_blank_check_memory(target,
block_array + i, bank->num_sectors - i,
- bank->erased_value);
- if (retval < 1) {
+ bank->erased_value, &checked);
+ if (retval != ERROR_OK) {
/* Run slow fallback if the first run gives no result
* otherwise use possibly incomplete results */
if (i == 0)
fast_check = false;
break;
}
- i += retval; /* add number of blocks done this round */
+ i += checked; /* add number of blocks done this round */
}
if (fast_check) {
diff --git a/src/flash/nor/psoc5lp.c b/src/flash/nor/psoc5lp.c
index e8c901950..6b46e3902 100644
--- a/src/flash/nor/psoc5lp.c
+++ b/src/flash/nor/psoc5lp.c
@@ -1081,17 +1081,18 @@ static int psoc5lp_erase_check(struct flash_bank *bank)
bool fast_check = true;
for (unsigned int i = 0; i < num_sectors; ) {
+ unsigned int checked;
retval = armv7m_blank_check_memory(target,
block_array + i, num_sectors - i,
- bank->erased_value);
- if (retval < 1) {
+ bank->erased_value, &checked);
+ if (retval != ERROR_OK) {
/* Run slow fallback if the first run gives no result
* otherwise use possibly incomplete results */
if (i == 0)
fast_check = false;
break;
}
- i += retval; /* add number of blocks done this round */
+ i += checked; /* add number of blocks done this round */
}
if (fast_check) {
diff --git a/src/target/arm.h b/src/target/arm.h
index 54a25731c..6d6412219 100644
--- a/src/target/arm.h
+++ b/src/target/arm.h
@@ -323,7 +323,8 @@ int armv4_5_run_algorithm_inner(struct target *target,
int arm_checksum_memory(struct target *target,
target_addr_t address, uint32_t count, uint32_t *checksum);
int arm_blank_check_memory(struct target *target,
- struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value);
+ struct target_memory_check_block *blocks, unsigned int num_blocks,
+ uint8_t erased_value, unsigned int *checked);
void arm_set_cpsr(struct arm *arm, uint32_t cpsr);
struct reg *arm_reg_current(struct arm *arm, unsigned int regnum);
diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c
index 78bcc06ba..4f61c58e2 100644
--- a/src/target/armv4_5.c
+++ b/src/target/armv4_5.c
@@ -1686,7 +1686,8 @@ int arm_checksum_memory(struct target *target,
*
*/
int arm_blank_check_memory(struct target *target,
- struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value)
+ struct target_memory_check_block *blocks, unsigned int num_blocks,
+ uint8_t erased_value, unsigned int *checked)
{
struct working_area *check_algorithm;
struct reg_param reg_params[3];
@@ -1748,8 +1749,10 @@ int arm_blank_check_memory(struct target *target,
exit_var,
10000, &arm_algo);
- if (retval == ERROR_OK)
+ if (retval == ERROR_OK) {
blocks[0].result = buf_get_u32(reg_params[2].value, 0, 32);
+ *checked = 1; /* only one block has been checked */
+ }
destroy_reg_param(®_params[0]);
destroy_reg_param(®_params[1]);
@@ -1757,10 +1760,7 @@ int arm_blank_check_memory(struct target *target,
target_free_working_area(target, check_algorithm);
- if (retval != ERROR_OK)
- return retval;
-
- return 1; /* only one block has been checked */
+ return retval;
}
static int arm_full_context(struct target *target)
diff --git a/src/target/armv7m.c b/src/target/armv7m.c
index b8697c032..07f1f6fc9 100644
--- a/src/target/armv7m.c
+++ b/src/target/armv7m.c
@@ -973,7 +973,8 @@ cleanup:
/** Checks an array of memory regions whether they are erased. */
int armv7m_blank_check_memory(struct target *target,
- struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value)
+ struct target_memory_check_block *blocks, unsigned int num_blocks,
+ uint8_t erased_value, unsigned int *checked)
{
struct working_area *erase_check_algorithm;
struct working_area *erase_check_params;
@@ -1009,7 +1010,13 @@ int armv7m_blank_check_memory(struct target *target,
};
uint32_t avail = target_get_working_area_avail(target);
- int blocks_to_check = avail / sizeof(struct algo_block) - 1;
+ unsigned int avail_blocks = avail / sizeof(struct algo_block);
+ if (avail_blocks < 2) {
+ retval = ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
+ goto cleanup1;
+ }
+
+ unsigned int blocks_to_check = avail_blocks - 1;
if (num_blocks < blocks_to_check)
blocks_to_check = num_blocks;
@@ -1019,7 +1026,7 @@ int armv7m_blank_check_memory(struct target *target,
goto cleanup1;
}
- int i;
+ unsigned int i;
uint32_t total_size = 0;
for (i = 0; i < blocks_to_check; i++) {
total_size += blocks[i].size;
@@ -1089,7 +1096,7 @@ int armv7m_blank_check_memory(struct target *target,
LOG_TARGET_INFO(target, "Slow CPU clock: %d blocks checked, %d remain. Continuing...",
i, num_blocks - i);
- retval = i; /* return number of blocks really checked */
+ *checked = i; /* return number of blocks really checked */
cleanup4:
destroy_reg_param(®_params[0]);
diff --git a/src/target/armv7m.h b/src/target/armv7m.h
index 8020cf034..14c2da460 100644
--- a/src/target/armv7m.h
+++ b/src/target/armv7m.h
@@ -353,7 +353,8 @@ bool armv7m_map_reg_packing(unsigned int arm_reg_id,
int armv7m_checksum_memory(struct target *target,
target_addr_t address, uint32_t count, uint32_t *checksum);
int armv7m_blank_check_memory(struct target *target,
- struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value);
+ struct target_memory_check_block *blocks, unsigned int num_blocks,
+ uint8_t erased_value, unsigned int *checked);
int armv7m_maybe_skip_bkpt_inst(struct target *target, bool *inst_found);
diff --git a/src/target/mips32.c b/src/target/mips32.c
index b8c61a5bf..ce51cc9f8 100644
--- a/src/target/mips32.c
+++ b/src/target/mips32.c
@@ -1310,8 +1310,8 @@ int mips32_checksum_memory(struct target *target, target_addr_t address,
/** Checks whether a memory region is erased. */
int mips32_blank_check_memory(struct target *target,
- struct target_memory_check_block *blocks, int num_blocks,
- uint8_t erased_value)
+ struct target_memory_check_block *blocks, unsigned int num_blocks,
+ uint8_t erased_value, unsigned int *checked)
{
struct working_area *erase_check_algorithm;
struct reg_param reg_params[3];
@@ -1367,8 +1367,10 @@ int mips32_blank_check_memory(struct target *target,
retval = target_run_algorithm(target, 0, NULL, 3, reg_params, erase_check_algorithm->address,
erase_check_algorithm->address + (sizeof(erase_check_code) - 4), 10000, &mips32_info);
- if (retval == ERROR_OK)
+ if (retval == ERROR_OK) {
blocks[0].result = buf_get_u32(reg_params[2].value, 0, 32);
+ *checked = 1; /* only one block has been checked */
+ }
destroy_reg_param(®_params[0]);
destroy_reg_param(®_params[1]);
@@ -1377,10 +1379,7 @@ int mips32_blank_check_memory(struct target *target,
cleanup:
target_free_working_area(target, erase_check_algorithm);
- if (retval != ERROR_OK)
- return retval;
-
- return 1; /* only one block has been checked */
+ return retval;
}
static int mips32_verify_pointer(struct command_invocation *cmd,
diff --git a/src/target/mips32.h b/src/target/mips32.h
index 3d919e7dd..bd797af51 100644
--- a/src/target/mips32.h
+++ b/src/target/mips32.h
@@ -933,7 +933,8 @@ int mips32_get_gdb_reg_list(struct target *target,
int mips32_checksum_memory(struct target *target, target_addr_t address,
uint32_t count, uint32_t *checksum);
int mips32_blank_check_memory(struct target *target,
- struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value);
+ struct target_memory_check_block *blocks, unsigned int num_blocks,
+ uint8_t erased_value, unsigned int *checked);
bool mips32_cpu_support_sync(struct mips_ejtag *ejtag_info);
bool mips32_cpu_support_hazard_barrier(struct mips_ejtag *ejtag_info);
diff --git a/src/target/stm8.c b/src/target/stm8.c
index 05989eeb9..3b5d83ff4 100644
--- a/src/target/stm8.c
+++ b/src/target/stm8.c
@@ -1757,7 +1757,8 @@ static int stm8_examine(struct target *target)
/** Checks whether a memory region is erased. */
static int stm8_blank_check_memory(struct target *target,
- struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value)
+ struct target_memory_check_block *blocks, unsigned int num_blocks,
+ uint8_t erased_value, unsigned int *checked)
{
struct working_area *erase_check_algorithm;
struct reg_param reg_params[2];
@@ -1801,8 +1802,10 @@ static int stm8_blank_check_memory(struct target *target,
erase_check_algorithm->address + (sizeof(stm8_erase_check_code) - 1),
10000, &stm8_info);
- if (retval == ERROR_OK)
+ if (retval == ERROR_OK) {
blocks[0].result = (*(reg_params[0].value) == 0xff);
+ *checked = 1; /* only one block has been checked */
+ }
destroy_mem_param(&mem_params[0]);
destroy_mem_param(&mem_params[1]);
@@ -1811,10 +1814,7 @@ static int stm8_blank_check_memory(struct target *target,
target_free_working_area(target, erase_check_algorithm);
- if (retval != ERROR_OK)
- return retval;
-
- return 1; /* only one block has been checked */
+ return retval;
}
static int stm8_checksum_memory(struct target *target, target_addr_t address,
diff --git a/src/target/target.c b/src/target/target.c
index 00fbe239a..f766d1da4 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2513,8 +2513,8 @@ int target_checksum_memory(struct target *target, target_addr_t address, uint32_
}
int target_blank_check_memory(struct target *target,
- struct target_memory_check_block *blocks, int num_blocks,
- uint8_t erased_value)
+ struct target_memory_check_block *blocks, unsigned int num_blocks,
+ uint8_t erased_value, unsigned int *checked)
{
if (!target_was_examined(target)) {
LOG_ERROR("Target not examined yet");
@@ -2524,7 +2524,8 @@ int target_blank_check_memory(struct target *target,
if (!target->type->blank_check_memory)
return ERROR_NOT_IMPLEMENTED;
- return target->type->blank_check_memory(target, blocks, num_blocks, erased_value);
+ return target->type->blank_check_memory(target, blocks, num_blocks,
+ erased_value, checked);
}
int target_read_u64(struct target *target, target_addr_t address, uint64_t *value)
diff --git a/src/target/target.h b/src/target/target.h
index 4dfc2a595..2b66dd741 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -662,8 +662,8 @@ int target_read_buffer(struct target *target,
int target_checksum_memory(struct target *target,
target_addr_t address, uint32_t size, uint32_t *crc);
int target_blank_check_memory(struct target *target,
- struct target_memory_check_block *blocks, int num_blocks,
- uint8_t erased_value);
+ struct target_memory_check_block *blocks, unsigned int num_blocks,
+ uint8_t erased_value, unsigned int *checked);
int target_wait_state(struct target *target, enum target_state state, unsigned int ms);
/**
diff --git a/src/target/target_type.h b/src/target/target_type.h
index 219417409..68ff2b606 100644
--- a/src/target/target_type.h
+++ b/src/target/target_type.h
@@ -141,8 +141,8 @@ struct target_type {
int (*checksum_memory)(struct target *target, target_addr_t address,
uint32_t count, uint32_t *checksum);
int (*blank_check_memory)(struct target *target,
- struct target_memory_check_block *blocks, int num_blocks,
- uint8_t erased_value);
+ struct target_memory_check_block *blocks, unsigned int num_blocks,
+ uint8_t erased_value, unsigned int *checked);
/*
* target break-/watchpoint control
-----------------------------------------------------------------------
Summary of changes:
doc/openocd.texi | 24 ++++++++++++-
src/flash/nor/Makefile.am | 1 +
src/flash/nor/core.c | 28 ++++++---------
src/flash/nor/core.h | 2 ++
src/flash/nor/driver.h | 2 ++
src/flash/nor/drivers.c | 2 ++
src/flash/nor/psoc5lp.c | 7 ++--
src/flash/nor/read_only.c | 51 ++++++++++++++++++++++++++
src/flash/nor/virtual.c | 84 ++++++++++++++++++++++++++++++++++++++++---
src/server/gdb_server.c | 92 +++++++++++++++++++++++++----------------------
src/target/arm.h | 3 +-
src/target/armv4_5.c | 12 +++----
src/target/armv7m.c | 15 +++++---
src/target/armv7m.h | 3 +-
src/target/mips32.c | 13 ++++---
src/target/mips32.h | 3 +-
src/target/stm8.c | 12 +++----
src/target/target.c | 7 ++--
src/target/target.h | 4 +--
src/target/target_type.h | 4 +--
20 files changed, 267 insertions(+), 102 deletions(-)
create mode 100644 src/flash/nor/read_only.c
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 18:15: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 5151c9845581ccd17e3ca3b9024f287f3f6c43de (commit)
from 078a6b1f9f9d6a0e6fe2f377bb3d3ba96133eaaf (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 5151c9845581ccd17e3ca3b9024f287f3f6c43de
Author: Antonio Borneo <bor...@gm...>
Date: Thu Dec 25 11:42:51 2025 +0100
flash: virtual: simplify error checking
Return directly the error code returned by last called function
instead of handling it.
Change-Id: I967deb348db535de1972056021484f0e7f32df1c
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9385
Reviewed-by: Tomas Vanek <va...@fb...>
Tested-by: jenkins
Reviewed-by: Marc Schink <de...@za...>
diff --git a/src/flash/nor/virtual.c b/src/flash/nor/virtual.c
index c5e33385e..9db9b9216 100644
--- a/src/flash/nor/virtual.c
+++ b/src/flash/nor/virtual.c
@@ -93,34 +93,24 @@ static int virtual_erase(struct flash_bank *bank, unsigned int first,
unsigned int last)
{
struct flash_bank *master_bank = virtual_get_master_bank(bank);
- int retval;
if (!master_bank)
return ERROR_FLASH_OPERATION_FAILED;
/* call master handler */
- retval = master_bank->driver->erase(master_bank, first, last);
- if (retval != ERROR_OK)
- return retval;
-
- return ERROR_OK;
+ return master_bank->driver->erase(master_bank, first, last);
}
static int virtual_write(struct flash_bank *bank, const uint8_t *buffer,
uint32_t offset, uint32_t count)
{
struct flash_bank *master_bank = virtual_get_master_bank(bank);
- int retval;
if (!master_bank)
return ERROR_FLASH_OPERATION_FAILED;
/* call master handler */
- retval = master_bank->driver->write(master_bank, buffer, offset, count);
- if (retval != ERROR_OK)
- return retval;
-
- return ERROR_OK;
+ return master_bank->driver->write(master_bank, buffer, offset, count);
}
static int virtual_probe(struct flash_bank *bank)
@@ -177,34 +167,24 @@ static int virtual_info(struct flash_bank *bank, struct command_invocation *cmd)
static int virtual_blank_check(struct flash_bank *bank)
{
struct flash_bank *master_bank = virtual_get_master_bank(bank);
- int retval;
if (!master_bank)
return ERROR_FLASH_OPERATION_FAILED;
/* call master handler */
- retval = master_bank->driver->erase_check(master_bank);
- if (retval != ERROR_OK)
- return retval;
-
- return ERROR_OK;
+ return master_bank->driver->erase_check(master_bank);
}
static int virtual_flash_read(struct flash_bank *bank,
uint8_t *buffer, uint32_t offset, uint32_t count)
{
struct flash_bank *master_bank = virtual_get_master_bank(bank);
- int retval;
if (!master_bank)
return ERROR_FLASH_OPERATION_FAILED;
/* call master handler */
- retval = master_bank->driver->read(master_bank, buffer, offset, count);
- if (retval != ERROR_OK)
- return retval;
-
- return ERROR_OK;
+ return master_bank->driver->read(master_bank, buffer, offset, count);
}
const struct flash_driver virtual_flash = {
-----------------------------------------------------------------------
Summary of changes:
src/flash/nor/virtual.c | 28 ++++------------------------
1 file changed, 4 insertions(+), 24 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 08:12:22
|
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 078a6b1f9f9d6a0e6fe2f377bb3d3ba96133eaaf (commit)
from 6eaf951b20c69bdbe5b078449c582349aefb4f4c (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 078a6b1f9f9d6a0e6fe2f377bb3d3ba96133eaaf
Author: Mikhail Iakhiaev <iak...@go...>
Date: Wed Jan 28 14:04:56 2026 -0800
tcl/target/ti/mspm0.cfg: drop swj on swd only target
The MSPM0 devices support only SWD.
Drop swj support, add swd support.
This also gets rid of the following warnings:
Warn : DEPRECATED: auto-selecting transport "swd". Use 'transport ...
Warn : Transport "swd" was already selected
Tested by programming/verifying firmware on LP-MSPM0G3519 dev board.
Change-Id: Ieafd9c4691343124b2dfb2daa1c0d3a96b13e485
Signed-off-by: Mikhail Iakhiaev <iak...@go...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9413
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
Reviewed-by: Tomas Vanek <va...@fb...>
diff --git a/tcl/target/ti/mspm0.cfg b/tcl/target/ti/mspm0.cfg
index 4e9b89c1f..89c7847e5 100644
--- a/tcl/target/ti/mspm0.cfg
+++ b/tcl/target/ti/mspm0.cfg
@@ -14,26 +14,17 @@ if { [info exists CHIPNAME] } {
set _CHIPNAME mspm0x
}
-if { [info exists CPUTAPID] } {
- set _DAP_TAPID $CPUTAPID
-} else {
- set _DAP_TAPID 0x4ba00477
-}
-
+# Note, some targets use "CPUTAPID" variable for this purpose.
if { [info exists DAP_SWD_ID] } {
set _DAP_SWD_ID $DAP_SWD_ID
} else {
set _DAP_SWD_ID 0x2ba01477
}
-source [find target/swj-dp.tcl]
-
-# MSPM0 only supports swd, so set it here and save a line for custom boards
+# MSPM0 only supports swd
transport select swd
-set _DAP_ID $_DAP_SWD_ID
-
-swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_DAP_ID
+swd newdap $_CHIPNAME cpu -expected-id $_DAP_SWD_ID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
-----------------------------------------------------------------------
Summary of changes:
tcl/target/ti/mspm0.cfg | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 08:11:04
|
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 6eaf951b20c69bdbe5b078449c582349aefb4f4c (commit)
via 1967f85548c6d3fa9ad1095c88d5f19aa33a9ba7 (commit)
from 0f67341e1581d32759b0084af0c1aa2725b7b486 (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 6eaf951b20c69bdbe5b078449c582349aefb4f4c
Author: Mikhail Iakhiaev <iak...@go...>
Date: Thu Jan 29 11:25:11 2026 -0800
flash/nor/mspm0.c: support new parts
Added support for the following parts:
* MSPM0Gx51x, datasheet:
Link: https://www.ti.com/lit/ds/symlink/mspm0g3518.pdf#page=101
* MSPM0G351x-Q1, datasheet:
Link: https://www.ti.com/lit/ds/symlink/mspm0g3518-q1.pdf#page=99
* MSPM0G3529-Q1, datasheet:
Link: https://www.ti.com/lit/ds/symlink/mspm0g3529-q1.pdf#page=92
* MSPM0G5187, datasheet:
Link: https://www.ti.com/lit/ds/symlink/mspm0g5187.pdf#page=87
Note, these parts have different "part_num" values than
the pre-existing MSPM0G parts listed in this file.
Tested by successfully programming (and verifying) an image
onto LP-MSPM0G3519 development board.
Change-Id: I15f3b368f5307661a32953074768ba810412cf0a
Signed-off-by: Mikhail Iakhiaev <iak...@go...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9418
Tested-by: jenkins
Reviewed-by: Nishanth Menon <nm...@ti...>
Reviewed-by: Tomas Vanek <va...@fb...>
diff --git a/src/flash/nor/mspm0.c b/src/flash/nor/mspm0.c
index 2a2b4324e..5ff1d71e4 100644
--- a/src/flash/nor/mspm0.c
+++ b/src/flash/nor/mspm0.c
@@ -191,7 +191,7 @@ static const struct mspm0_part_info mspm0l_parts[] = {
};
/* https://www.ti.com/lit/ds/symlink/mspm0g3506.pdf Table 8-22 */
-static const struct mspm0_part_info mspm0g_parts[] = {
+static const struct mspm0_part_info mspm0g_parts_bb88[] = {
/* MSPM0G110x */
{ "MSPM0G1105TPTR", 0x8934, 0xD },
{ "MSPM0G1105TRGZR", 0x8934, 0xFE },
@@ -297,6 +297,68 @@ static const struct mspm0_part_info mspm0g_parts[] = {
{ "M0G3507QSPTRQ1", 0x34E0, 0xE3 },
};
+/* https://www.ti.com/lit/gpn/mspm0g1518 Table 8-21 and so on */
+static const struct mspm0_part_info mspm0g_parts_bba9[] = {
+ /* MSPM0Gx51x */
+ { "MSPM0G1518SPMR", 0x2120, 0x13 },
+ { "MSPM0G1518SPNR", 0x2120, 0x16 },
+ { "MSPM0G1518SPTR", 0x2120, 0x12 },
+ { "MSPM0G1518SPZR", 0x2120, 0x18 },
+ { "MSPM0G1518SRGZR", 0x2120, 0x11 },
+ { "MSPM0G1518SRHBR", 0x2120, 0x10 },
+ { "MSPM0G1518SZAWR", 0x2120, 0x19 },
+ { "MSPM0G1519SPMR", 0x2407, 0x13 },
+ { "MSPM0G1519SPNR", 0x2407, 0x16 },
+ { "MSPM0G1519SPTR", 0x2407, 0x12 },
+ { "MSPM0G1519SPZR", 0x2407, 0x18 },
+ { "MSPM0G1519SRGZR", 0x2407, 0x11 },
+ { "MSPM0G1519SRHBR", 0x2407, 0x10 },
+ { "MSPM0G1519SZAWR", 0x2407, 0x19 },
+ { "MSPM0G3518SPMR", 0x1205, 0x13 },
+ { "MSPM0G3518SPNR", 0x1205, 0x15 },
+ { "MSPM0G3518SPTR", 0x1205, 0x12 },
+ { "MSPM0G3518SPZR", 0x1205, 0x16 },
+ { "MSPM0G3518SRGZR", 0x1205, 0x11 },
+ { "MSPM0G3518SRHBR", 0x1205, 0x10 },
+ { "MSPM0G3518SZAWR", 0x1205, 0x19 },
+ { "MSPM0G3519SPMR", 0x1508, 0x13 },
+ { "MSPM0G3519SPNR", 0x1508, 0x15 },
+ { "MSPM0G3519SPTR", 0x1508, 0x12 },
+ { "MSPM0G3519SPZR", 0x1508, 0x16 },
+ { "MSPM0G3519SRGZR", 0x1508, 0x11 },
+ { "MSPM0G3519SRHBR", 0x1508, 0x10 },
+ { "MSPM0G3519SZAWR", 0x1508, 0x19 },
+ /* MSPM0G351x-Q1 */
+ { "M0G3518QPMRQ1", 0x4009, 0x13 },
+ { "M0G3518QPNRQ1", 0x4009, 0x14 },
+ { "M0G3518QPTRQ1", 0x4009, 0x12 },
+ { "M0G3518QPZRQ1", 0x4009, 0x15 },
+ { "M0G3518QRGZRQ1", 0x4009, 0x11 },
+ { "M0G3518QRHBRQ1", 0x4009, 0x10 },
+ { "M0G3519QPMRQ1", 0x3512, 0x13 },
+ { "M0G3519AQPMRQ1", 0x3512, 0x16 },
+ { "M0G3519QPNRQ1", 0x3512, 0x14 },
+ { "M0G3519QPTRQ1", 0x3512, 0x12 },
+ { "M0G3519QPZRQ1", 0x3512, 0x15 },
+ { "M0G3519QRGZRQ1", 0x3512, 0x11 },
+ { "M0G3519QRHBRQ1", 0x3512, 0x10 },
+ /* MSPM0G352x-Q1 */
+ { "M0G3529QPMRQ1", 0xF8D1, 0x13 },
+};
+
+/* https://www.ti.com/lit/gpn/mspm0g5187 Table 8-24*/
+static const struct mspm0_part_info mspm0g_parts_bbbc[] = {
+ /* MSPM0G5187 */
+ { "MSPM0G5187S28YCJR", 0x5610, 0x18 },
+ { "MSPM0G5187SDGS20R", 0x5610, 0x16 },
+ { "MSPM0G5187SPMR", 0x5610, 0x10 },
+ { "MSPM0G5187SPTR", 0x5610, 0x11 },
+ { "MSPM0G5187SRHBR", 0x5610, 0x13 },
+ { "MSPM0G5187SRGER", 0x5610, 0x14 },
+ { "MSPM0G5187SRGZR", 0x5610, 0x12 },
+ { "MSPM0G5187SRUYR", 0x5610, 0x17 },
+};
+
/* https://www.ti.com/lit/gpn/mspm0c1104 Table 8-12 and so on */
static const struct mspm0_part_info mspm0c_parts[] = {
{ "MSPS003F4SPW20R", 0x57b3, 0x70},
@@ -336,7 +398,9 @@ static const struct mspm0_part_info mspm0lx22x_parts[] = {
static const struct mspm0_family_info mspm0_finf[] = {
{ "MSPM0L", 0xbb82, ARRAY_SIZE(mspm0l_parts), mspm0l_parts },
{ "MSPM0Lx22x", 0xbb9f, ARRAY_SIZE(mspm0lx22x_parts), mspm0lx22x_parts },
- { "MSPM0G", 0xbb88, ARRAY_SIZE(mspm0g_parts), mspm0g_parts },
+ { "MSPM0G", 0xbb88, ARRAY_SIZE(mspm0g_parts_bb88), mspm0g_parts_bb88 },
+ { "MSPM0G", 0xbba9, ARRAY_SIZE(mspm0g_parts_bba9), mspm0g_parts_bba9 },
+ { "MSPM0G", 0xbbbc, ARRAY_SIZE(mspm0g_parts_bbbc), mspm0g_parts_bbbc },
{ "MSPM0C", 0xbba1, ARRAY_SIZE(mspm0c_parts), mspm0c_parts },
};
commit 1967f85548c6d3fa9ad1095c88d5f19aa33a9ba7
Author: Mikhail Iakhiaev <iak...@go...>
Date: Fri Jan 30 10:44:43 2026 -0800
flash/nor/mspm0.c: add parts.
1. Added some missing variants for MSPM0G110x and MSPM0G150x parts.
2. Corrected the variant number for "MSPM0G1106TRHBR", according to
datasheet:
Link: https://www.ti.com/lit/ds/symlink/mspm0g1106.pdf#page=68
3. Added MSPM0G350x-Q1 devices. Datasheet:
Link: https://www.ti.com/lit/ds/symlink/mspm0g3507-q1.pdf#page=77
Change-Id: Id4a14b284a5d032d140d695674d1912cbe87d7f6
Signed-off-by: Mikhail Iakhiaev <iak...@go...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9417
Tested-by: jenkins
Reviewed-by: Nishanth Menon <nm...@ti...>
Reviewed-by: Tomas Vanek <va...@fb...>
diff --git a/src/flash/nor/mspm0.c b/src/flash/nor/mspm0.c
index 24e082f6b..2a2b4324e 100644
--- a/src/flash/nor/mspm0.c
+++ b/src/flash/nor/mspm0.c
@@ -198,13 +198,15 @@ static const struct mspm0_part_info mspm0g_parts[] = {
{ "MSPM0G1106TPMR", 0x477B, 0xD4 },
{ "MSPM0G1106TPTR", 0x477B, 0x71 },
{ "MSPM0G1106TRGZR", 0x477B, 0xBB },
- { "MSPM0G1106TRHBR", 0x477B, 0x0 },
+ { "MSPM0G1106TRHBR", 0x477B, 0x01 },
+ { "MSPM0G1106TYCJR", 0x477B, 0x09 },
{ "MSPM0G1107TDGS28R", 0x807B, 0x82 },
{ "MSPM0G1107TPMR", 0x807B, 0xB3 },
{ "MSPM0G1107TPTR", 0x807B, 0x32 },
{ "MSPM0G1107TRGER", 0x807B, 0x79 },
{ "MSPM0G1107TRGZR", 0x807B, 0x20 },
{ "MSPM0G1107TRHBR", 0x807B, 0xBC },
+ { "MSPM0G1107TYCJR", 0x807B, 0x7A },
/* MSPM0G150x */
{ "MSPM0G1505SDGS28R", 0x13C4, 0x73 },
{ "MSPM0G1505SPMR", 0x13C4, 0x53 },
@@ -217,11 +219,15 @@ static const struct mspm0_part_info mspm0g_parts[] = {
{ "MSPM0G1506SRGER", 0x5AE0, 0x67 },
{ "MSPM0G1506SRGZR", 0x5AE0, 0x75 },
{ "MSPM0G1506SRHBR", 0x5AE0, 0x57 },
+ { "MSPM0G1506SRPTR", 0x5AE0, 0x36 },
+ { "MSPM0G1506SYCJR", 0x5AE0, 0x9E },
{ "MSPM0G1507SDGS28R", 0x2655, 0x6D },
{ "MSPM0G1507SPMR", 0x2655, 0x97 },
+ { "MSPM0G1507SPTR", 0x2655, 0x2E },
{ "MSPM0G1507SRGER", 0x2655, 0x83 },
{ "MSPM0G1507SRGZR", 0x2655, 0xD3 },
{ "MSPM0G1507SRHBR", 0x2655, 0x4D },
+ { "MSPM0G1507SYCJR", 0x2655, 0x65 },
/* MSPM0G310x */
{ "MSPM0G3105SDGS20R", 0x4749, 0x21 },
{ "MSPM0G3105SDGS28R", 0x4749, 0xDD },
@@ -270,6 +276,25 @@ static const struct mspm0_part_info mspm0g_parts[] = {
{ "M0G3107QPTRQ1", 0x4e2f, 0xc7},
{ "M0G3107QRGZRQ1", 0x4e2f, 0x8a },
{ "M0G3107QRHBRQ1", 0x4e2f, 0x9a},
+ /* MSPM0G350x-Q1 */
+ { "M0G3505QDGS28RQ1", 0x704E, 0x4C },
+ { "M0G3505QDGS32RQ1", 0x704E, 0x7F },
+ { "M0G3505QPMRQ1", 0x704E, 0x7B },
+ { "M0G3505QPTRQ1", 0x704E, 0x9C },
+ { "M0G3505QRGZRQ1", 0x704E, 0xC9 },
+ { "M0G3505QRHBRQ1", 0x704E, 0x26 },
+ { "M0G3506QDGS28RQ1", 0xEE12, 0x71 },
+ { "M0G3506QDGS32RQ1", 0xEE12, 0x6C },
+ { "M0G3506QPMRQ1", 0xEE12, 0x7B },
+ { "M0G3506QPTRQ1", 0xEE12, 0x5A },
+ { "M0G3506QRGZRQ1", 0xEE12, 0xD2 },
+ { "M0G3506QRHBRQ1", 0xEE12, 0xFC },
+ { "M0G3507QDGS28RQ1", 0x34E0, 0xEA },
+ { "M0G3507QDGS32RQ1", 0x34E0, 0xF6 },
+ { "M0G3507QPMRQ1", 0x34E0, 0x26 },
+ { "M0G3507QRGZRQ1", 0x34E0, 0xC5 },
+ { "M0G3507QRHBRQ1", 0x34E0, 0xAC },
+ { "M0G3507QSPTRQ1", 0x34E0, 0xE3 },
};
/* https://www.ti.com/lit/gpn/mspm0c1104 Table 8-12 and so on */
-----------------------------------------------------------------------
Summary of changes:
src/flash/nor/mspm0.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 92 insertions(+), 3 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 08:10:38
|
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 0f67341e1581d32759b0084af0c1aa2725b7b486 (commit)
via eaa04836dc8380fde772190a6ded8c9013d30300 (commit)
from 718eb22bfcef569bb77a684c1c1e2870115b298e (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 0f67341e1581d32759b0084af0c1aa2725b7b486
Author: Mikhail Iakhiaev <iak...@go...>
Date: Fri Jan 30 10:38:16 2026 -0800
flash/nor/mspm0.c: remove MSPM0G3505TDGS28R
Neither "MSPM0G3505TDGS28R" nor its variant number 0xdf is
listed in the MSPM0G3505 datasheet (likely removed):
Link: https://www.ti.com/lit/ds/symlink/mspm0g3505.pdf#page=75
Change-Id: I3828744a91477b3e3fd164055aa0fe068483f87d
Signed-off-by: Mikhail Iakhiaev <iak...@go...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9420
Tested-by: jenkins
Reviewed-by: Tomas Vanek <va...@fb...>
Reviewed-by: Nishanth Menon <nm...@ti...>
diff --git a/src/flash/nor/mspm0.c b/src/flash/nor/mspm0.c
index 55ce4f994..24e082f6b 100644
--- a/src/flash/nor/mspm0.c
+++ b/src/flash/nor/mspm0.c
@@ -238,7 +238,6 @@ static const struct mspm0_part_info mspm0g_parts[] = {
{ "MSPM0G3505SPTR", 0xc504, 0x93 },
{ "MSPM0G3505SRGZR", 0xc504, 0xc7 },
{ "MSPM0G3505SRHBR", 0xc504, 0xe7 },
- { "MSPM0G3505TDGS28R", 0xc504, 0xdf },
{ "MSPM0G3506SDGS28R", 0x151f, 0x8 },
{ "MSPM0G3506SPMR", 0x151f, 0xd4 },
{ "MSPM0G3506SPTR", 0x151f, 0x39 },
commit eaa04836dc8380fde772190a6ded8c9013d30300
Author: Mikhail Iakhiaev <iak...@go...>
Date: Fri Jan 30 10:32:48 2026 -0800
flash/nor/mspm0.c: organize parts
1. Added comments like /* MSPM0G310x-Q1 */ to the parts table
based on the datasheet the parts came from.
2. Sorted the MSPM0G310x-Q1 device lines alphabetically: this is
how all other MSPM0G parts are organized.
Change-Id: I90d0f44289a538667c4ad0f23d44581f3c65d0c8
Signed-off-by: Mikhail Iakhiaev <iak...@go...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9419
Tested-by: jenkins
Reviewed-by: Tomas Vanek <va...@fb...>
Reviewed-by: Nishanth Menon <nm...@ti...>
diff --git a/src/flash/nor/mspm0.c b/src/flash/nor/mspm0.c
index 62fd5e8c4..55ce4f994 100644
--- a/src/flash/nor/mspm0.c
+++ b/src/flash/nor/mspm0.c
@@ -128,6 +128,7 @@ struct mspm0_family_info {
/* https://www.ti.com/lit/ds/symlink/mspm0l1346.pdf Table 8-13 and so on */
static const struct mspm0_part_info mspm0l_parts[] = {
+ /* MSPM0L110x */
{ "MSPM0L1105TDGS20R", 0x51DB, 0x16 },
{ "MSPM0L1105TDGS28R", 0x51DB, 0x83 },
{ "MSPM0L1105TDYYR", 0x51DB, 0x54 },
@@ -138,6 +139,7 @@ static const struct mspm0_part_info mspm0l_parts[] = {
{ "MSPM0L1106TDYYR", 0x5552, 0x9D },
{ "MSPM0L1106TRGER", 0x5552, 0x90 },
{ "MSPM0L1106TRHBR", 0x5552, 0x53 },
+ /* MSPM0L130x (covers MSPM0L134x) */
{ "MSPM0L1303SRGER", 0xef0, 0x17 },
{ "MSPM0L1303TRGER", 0xef0, 0xe2 },
{ "MSPM0L1304QDGS20R", 0xd717, 0x91 },
@@ -188,8 +190,9 @@ static const struct mspm0_part_info mspm0l_parts[] = {
{ "MSPM0L1346TDGS28R", 0xf2b5, 0xef },
};
-/* https://www.ti.com/lit/ds/symlink/mspm0g3506.pdf Table 8-20 */
+/* https://www.ti.com/lit/ds/symlink/mspm0g3506.pdf Table 8-22 */
static const struct mspm0_part_info mspm0g_parts[] = {
+ /* MSPM0G110x */
{ "MSPM0G1105TPTR", 0x8934, 0xD },
{ "MSPM0G1105TRGZR", 0x8934, 0xFE },
{ "MSPM0G1106TPMR", 0x477B, 0xD4 },
@@ -202,6 +205,7 @@ static const struct mspm0_part_info mspm0g_parts[] = {
{ "MSPM0G1107TRGER", 0x807B, 0x79 },
{ "MSPM0G1107TRGZR", 0x807B, 0x20 },
{ "MSPM0G1107TRHBR", 0x807B, 0xBC },
+ /* MSPM0G150x */
{ "MSPM0G1505SDGS28R", 0x13C4, 0x73 },
{ "MSPM0G1505SPMR", 0x13C4, 0x53 },
{ "MSPM0G1505SPTR", 0x13C4, 0x3E },
@@ -218,6 +222,7 @@ static const struct mspm0_part_info mspm0g_parts[] = {
{ "MSPM0G1507SRGER", 0x2655, 0x83 },
{ "MSPM0G1507SRGZR", 0x2655, 0xD3 },
{ "MSPM0G1507SRHBR", 0x2655, 0x4D },
+ /* MSPM0G310x */
{ "MSPM0G3105SDGS20R", 0x4749, 0x21 },
{ "MSPM0G3105SDGS28R", 0x4749, 0xDD },
{ "MSPM0G3105SRHBR", 0x4749, 0xBE },
@@ -227,6 +232,7 @@ static const struct mspm0_part_info mspm0g_parts[] = {
{ "MSPM0G3107SDGS20R", 0xAB39, 0x5C },
{ "MSPM0G3107SDGS28R", 0xAB39, 0xCC },
{ "MSPM0G3107SRHBR", 0xAB39, 0xB7 },
+ /* MSPM0G350x */
{ "MSPM0G3505SDGS28R", 0xc504, 0x8e },
{ "MSPM0G3505SPMR", 0xc504, 0x1d },
{ "MSPM0G3505SPTR", 0xc504, 0x93 },
@@ -243,27 +249,28 @@ static const struct mspm0_part_info mspm0g_parts[] = {
{ "MSPM0G3507SPTR", 0xae2d, 0x3f },
{ "MSPM0G3507SRGZR", 0xae2d, 0xf7 },
{ "MSPM0G3507SRHBR", 0xae2d, 0x4c },
- { "M0G3107QPMRQ1", 0x4e2f, 0x51 },
- { "M0G3107QPTRQ1", 0x4e2f, 0xc7},
- { "M0G3107QRGZRQ1", 0x4e2f, 0x8a },
- { "M0G3107QRHBRQ1", 0x4e2f, 0x9a},
- { "M0G3107QDGS28RQ1", 0x4e2f, 0xd5},
- { "M0G3107QDGS28RQ1", 0x4e2f, 0x67},
- { "M0G3107QDGS20RQ1", 0x4e2f, 0xfd},
- { "M0G3106QPMRQ1", 0x54C7, 0x08},
- { "M0G3105QDGS32RQ1", 0x1349, 0x08},
- { "M0G3106QPTRQ1", 0x54C7, 0x3F},
- { "M0G3105QDGS28RQ1", 0x1349, 0x1B},
- { "M0G3106QRGZRQ1", 0x94AD, 0xE6},
+ /* MSPM0G310x-Q1 */
{ "M0G3105QDGS20RQ1", 0x1349, 0xFB},
- { "M0G3106QRHBRQ1", 0x94AD, 0x20},
- { "M0G3106QDGS32RQ1", 0x94AD, 0x8D},
- { "M0G3106QDGS28RQ1", 0x94AD, 0x03},
- { "M0G3106QDGS20RQ1", 0x94AD, 0x6F},
+ { "M0G3105QDGS28RQ1", 0x1349, 0x1B},
+ { "M0G3105QDGS32RQ1", 0x1349, 0x08},
{ "M0G3105QPMRQ1", 0x1349, 0xD0},
{ "M0G3105QPTRQ1", 0x1349, 0xEF},
{ "M0G3105QRGZRQ1", 0x1349, 0x70},
{ "M0G3105QRHBRQ1", 0x1349, 0x01},
+ { "M0G3106QDGS20RQ1", 0x94AD, 0x6F},
+ { "M0G3106QDGS28RQ1", 0x94AD, 0x03},
+ { "M0G3106QDGS32RQ1", 0x94AD, 0x8D},
+ { "M0G3106QPMRQ1", 0x54C7, 0x08},
+ { "M0G3106QPTRQ1", 0x54C7, 0x3F},
+ { "M0G3106QRGZRQ1", 0x94AD, 0xE6},
+ { "M0G3106QRHBRQ1", 0x94AD, 0x20},
+ { "M0G3107QDGS20RQ1", 0x4e2f, 0xfd},
+ { "M0G3107QDGS28RQ1", 0x4e2f, 0x67},
+ { "M0G3107QDGS28RQ1", 0x4e2f, 0xd5},
+ { "M0G3107QPMRQ1", 0x4e2f, 0x51 },
+ { "M0G3107QPTRQ1", 0x4e2f, 0xc7},
+ { "M0G3107QRGZRQ1", 0x4e2f, 0x8a },
+ { "M0G3107QRHBRQ1", 0x4e2f, 0x9a},
};
/* https://www.ti.com/lit/gpn/mspm0c1104 Table 8-12 and so on */
-----------------------------------------------------------------------
Summary of changes:
src/flash/nor/mspm0.c | 42 ++++++++++++++++++++++++------------------
1 file changed, 24 insertions(+), 18 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-15 08:09: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 718eb22bfcef569bb77a684c1c1e2870115b298e (commit)
from b4518ab78b6b9b2d85aa7ff2f75419ddfc311591 (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 718eb22bfcef569bb77a684c1c1e2870115b298e
Author: Jérôme Pouiller <jer...@si...>
Date: Thu Feb 5 15:47:09 2026 +0100
meta: Add editor configuration
.editorconfig is supported out-of-the box by many editors (vim, vscode,
etc...). This file prevent new comers to do mistake with their editor
configuration.
Change-Id: I60c3dedc20161883f388af6f1cb9b95b90beff2a
Signed-off-by: Jérôme Pouiller <jer...@si...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9454
Reviewed-by: Tomas Vanek <va...@fb...>
Tested-by: jenkins
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..3ab5668a5
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,17 @@
+# EditorConfig: https://editorconfig.org/
+
+# top-most EditorConfig file
+root = true
+
+# All (Defaults)
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+indent_style = tab
+indent_size = 4
+tab_width = 4
+
+[*.patch,*.diff]
+trim_trailing_whitespace = false
-----------------------------------------------------------------------
Summary of changes:
.editorconfig | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 .editorconfig
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-06 15:35: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 b4518ab78b6b9b2d85aa7ff2f75419ddfc311591 (commit)
from db34f6f0a71baa9c97794cb347dc3c74b3ef729d (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 b4518ab78b6b9b2d85aa7ff2f75419ddfc311591
Author: Gennaro Tortone <gto...@gm...>
Date: Wed Jan 28 21:20:38 2026 +0100
flash/nor/spi: Add Boya-Micro BY25Q128AS and Byte-Semi BY25Q16ES flash
- Boya-Micro BY25Q128AS: 16 MB
- Byte-Semi BY25Q16ES: 2MB
Change-Id: Ib3caee62abc34f92321425d9427054b6a9b6ec66
Signed-off-by: Gennaro Tortone <gto...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9412
Tested-by: jenkins
Reviewed-by: Tomas Vanek <va...@fb...>
diff --git a/src/flash/nor/spi.c b/src/flash/nor/spi.c
index 7f03f1fea..f1ca5f0e5 100644
--- a/src/flash/nor/spi.c
+++ b/src/flash/nor/spi.c
@@ -125,6 +125,8 @@ const struct flash_device flash_devices[] = {
FLASH_ID("micron mt25ql01", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0021ba20, 0x100, 0x10000, 0x8000000),
FLASH_ID("micron mt25qu01", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0021bb20, 0x100, 0x10000, 0x8000000),
FLASH_ID("micron mt25ql02", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0022ba20, 0x100, 0x10000, 0x10000000),
+ FLASH_ID("bsemi by25q16es", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x00154068, 0x100, 0x10000, 0x200000),
+ FLASH_ID("boya by25q128as", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x00184068, 0x100, 0x10000, 0x1000000),
FLASH_ID("win w25q80bv", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001440ef, 0x100, 0x10000, 0x100000),
FLASH_ID("win w25q16jv", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001540ef, 0x100, 0x10000, 0x200000),
FLASH_ID("win w25q16jv", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001570ef, 0x100, 0x10000, 0x200000), /* QPI / DTR */
-----------------------------------------------------------------------
Summary of changes:
src/flash/nor/spi.c | 2 ++
1 file changed, 2 insertions(+)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-01 15:00: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 db34f6f0a71baa9c97794cb347dc3c74b3ef729d (commit)
from 92b482af50f367c1416c4a70ceabab36c19788d1 (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 db34f6f0a71baa9c97794cb347dc3c74b3ef729d
Author: Grant Ramsay <gra...@ho...>
Date: Fri Jul 26 20:39:20 2024 +1200
target: arm_dap: Fix crash in 'dap info' command
The 'dap info' command was not checking that the target was
an ARM before dereferencing the `arm` pointer. This would
cause a crash if the current target was (say) a mem_ap.
Add 'target_to_dap' function to safely get the dap
Change-Id: I0c765f915f2ef7b9a7d20c934e144559ca4e5f1c
Signed-off-by: Grant Ramsay <gra...@ho...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8415
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <va...@fb...>
diff --git a/src/target/arm_dap.c b/src/target/arm_dap.c
index 5ba5e1c38..532f192b7 100644
--- a/src/target/arm_dap.c
+++ b/src/target/arm_dap.c
@@ -412,6 +412,16 @@ err:
return retval;
}
+static struct adiv5_dap *target_to_dap(const struct target *target)
+{
+ struct adiv5_private_config *pc = target->private_config;
+
+ if (!target->has_dap || !target->dap_configured || !pc)
+ return NULL;
+
+ return pc->dap;
+}
+
COMMAND_HANDLER(handle_dap_names)
{
if (CMD_ARGC != 0)
@@ -432,12 +442,11 @@ COMMAND_HANDLER(handle_dap_init)
COMMAND_HANDLER(handle_dap_info_command)
{
struct target *target = get_current_target(CMD_CTX);
- struct arm *arm = target_to_arm(target);
- struct adiv5_dap *dap = arm->dap;
+ struct adiv5_dap *dap = target_to_dap(target);
uint64_t apsel;
if (!dap) {
- LOG_ERROR("DAP instance not available. Probably a HLA target...");
+ command_print(CMD, "target %s has no DAP", target_name(target));
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
}
-----------------------------------------------------------------------
Summary of changes:
src/target/arm_dap.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-01 15:00: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 92b482af50f367c1416c4a70ceabab36c19788d1 (commit)
from 95bd9093b1917e9c881209d0e657bedb9a89ea86 (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 92b482af50f367c1416c4a70ceabab36c19788d1
Author: Antonio Borneo <bor...@gm...>
Date: Sun Jan 25 11:02:02 2026 +0100
log: change line counter to unsigned
The incremental counter of logged lines is a signed int.
Change it to unsigned, since negative values has no sense in this
context.
Change-Id: Ia75f9ca038bba385c5f88fb9fa368faaf055f9a3
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9401
Reviewed-by: R. Diez <rdi...@rd...>
Tested-by: jenkins
diff --git a/src/helper/log.c b/src/helper/log.c
index 1d459825f..caed8a9da 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -47,7 +47,7 @@ static const char * const log_strings[7] = {
"Debug: ", /* corresponds to LOG_LVL_DEBUG_USB */
};
-static int count;
+static unsigned int count;
/* forward the log to the listeners */
static void log_forward(const char *file, unsigned int line, const char *function, const char *string)
@@ -110,7 +110,7 @@ static void log_puts(enum log_levels level,
#error "Configuration error: Neither mallinfo() nor mallinfo2() are available."
#endif
#endif
- fprintf(log_output, "%s%d %" PRId64 " %s:%d %s()"
+ fprintf(log_output, "%s%u %" PRId64 " %s:%d %s()"
#ifdef _DEBUG_FREE_SPACE_
#ifdef HAVE_MALLINFO2
" %zu"
-----------------------------------------------------------------------
Summary of changes:
src/helper/log.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-01 14: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 95bd9093b1917e9c881209d0e657bedb9a89ea86 (commit)
from 294538f0d43a166e501d742889f38a741109f1ed (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 95bd9093b1917e9c881209d0e657bedb9a89ea86
Author: Antonio Borneo <bor...@gm...>
Date: Thu Jan 22 16:23:45 2026 +0100
target: cortex-m: defer cache identification on Cortex-M85 under reset
Like for Cortex-M7, also Cortex-M85 prevents detecting the cache
properties when the CPU is kept under reset.
Extend to Cortex-M85 the same deferred mechanism already in place
for Cortex-M7.
Change-Id: Id274bb6c0b46c568554eed9671ef690c34cf7cfa
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9397
Tested-by: jenkins
Reviewed-by: Tomas Vanek <va...@fb...>
Reviewed-by: Marc Schink <de...@za...>
diff --git a/src/target/armv7m_cache.c b/src/target/armv7m_cache.c
index f07ac142f..7a2d8a414 100644
--- a/src/target/armv7m_cache.c
+++ b/src/target/armv7m_cache.c
@@ -192,28 +192,37 @@ static int armv7m_identify_cache_internal(struct target *target)
}
/*
- * On Cortex-M7 only, when the CPU is kept in reset, several registers of the
- * System Control Space (SCS) are not accessible and return bus error.
- * The list of accessible registers is:
+ * On Cortex-M7 and Cortex-M85, when the CPU is kept in reset, several
+ * registers of the System Control Space (SCS) are not accessible and
+ * return bus error.
+ * The list of accessible registers for Cortex-M7 is:
* - 0xE000ED00
* - 0xE000ED30
* - 0xE000EDF0 ... 0xE000EEFC
* - 0xE000EF40 ... 0xE000EF48
* - 0xE000EFD0 ... 0xE000EFFC
+ * The list of accessible registers for Cortex-M85 is:
+ * - 0xE000ED00
+ * - 0xE000ED30
+ * - 0xE000ED40 ... 0xE000ED80
+ * - 0xE000EDF0 ... 0xE000EEFC
+ * - 0xE000EF40 ... 0xE000EF4C
+ * - 0xE000EFB0 ... 0xE000EFFC
* This makes impossible detecting the cache during the reset.
* Use a deferred mechanism to detect the cache during polling or when the
- * Cortex-M7 halts.
+ * CPU halts.
*/
int armv7m_identify_cache(struct target *target)
{
struct cortex_m_common *cortex_m = target_to_cm(target);
struct armv7m_common *armv7m = target_to_armv7m(target);
struct armv7m_cache_common *cache = &armv7m->armv7m_cache;
+ enum cortex_m_impl_part part = cortex_m->core_info->impl_part;
if (cache->info_valid)
return ERROR_OK;
- if (cortex_m->core_info->impl_part == CORTEX_M7_PARTNO
+ if ((part == CORTEX_M7_PARTNO || part == CORTEX_M85_PARTNO)
&& cortex_m->dcb_dhcsr & S_RESET_ST) {
cache->defer_identification = true;
return ERROR_OK;
-----------------------------------------------------------------------
Summary of changes:
src/target/armv7m_cache.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-01 14:59: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 294538f0d43a166e501d742889f38a741109f1ed (commit)
from 62f49b7fe2e3f7cc87bea2afdad8bd91c7346d2b (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 294538f0d43a166e501d742889f38a741109f1ed
Author: R. Diez <rdi...@rd...>
Date: Mon Jan 19 18:12:46 2026 +0100
configure.ac: Detect mallinfo automatically
Previously, configure.ac only checked whether glibc was available,
but other C runtime libraries like Newlib have mallinfo too.
This is a first step to remove configuration option --enable-malloc-logging
and replace it with a debug level configurable at runtime.
Change-Id: If30fc98a84158459e222fddf08043f46d6fa4112
Signed-off-by: R. Diez <rdi...@rd...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9394
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/configure.ac b/configure.ac
index b77b516d9..c452cf5d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,15 +56,9 @@ AC_CHECK_TYPE([Elf64_Ehdr],
AC_DEFINE([HAVE_ELF64], [1], [Define to 1 if the system has the type 'Elf64_Ehdr'.]),
[], [[#include <elf.h>]])
-AC_MSG_CHECKING([for glibc])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[int v = __GLIBC__;return 0;]])],
- [have_glibc=yes], [have_glibc=no])
-AC_MSG_RESULT($have_glibc)
-
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([linux/pci.h])
AC_CHECK_HEADERS([linux/spi/spidev.h])
-AC_CHECK_HEADERS([malloc.h])
AC_CHECK_HEADERS([netdb.h])
AC_CHECK_HEADERS([poll.h])
AC_CHECK_HEADERS([strings.h])
@@ -102,6 +96,8 @@ AC_CHECK_FUNCS([strnlen])
AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([usleep])
AC_CHECK_FUNCS([realpath])
+AC_CHECK_FUNCS([mallinfo], [has_at_least_one_mallinfo=yes])
+AC_CHECK_FUNCS([mallinfo2], [has_at_least_one_mallinfo=yes])
# guess-rev.sh only exists in the repository, not in the released archives
AC_MSG_CHECKING([whether to build a release])
@@ -276,7 +272,10 @@ AC_ARG_ENABLE([malloc_logging],
AC_MSG_CHECKING([whether to enable malloc free space logging]);
AC_MSG_RESULT([$debug_malloc])
-AS_IF([test "x$debug_malloc" = "xyes" -a "x$have_glibc" = "xyes"], [
+AS_IF([test "x$debug_malloc" = "xyes"], [
+ AS_IF([test "x$has_at_least_one_mallinfo" != "xyes"], [
+ AC_MSG_ERROR([Option --enable-malloc-logging needs a libc with mallinfo or mallinfo2.])
+ ])
AC_DEFINE([_DEBUG_FREE_SPACE_],[1], [Include malloc free space in logging])
])
diff --git a/src/helper/log.c b/src/helper/log.c
index a157b78b1..1d459825f 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -25,23 +25,7 @@
#include <stdarg.h>
#ifdef _DEBUG_FREE_SPACE_
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#else
-#error "malloc.h is required to use --enable-malloc-logging"
-#endif
-
-#ifdef __GLIBC__
-#if __GLIBC_PREREQ(2, 33)
-#define FORDBLKS_FORMAT " %zu"
-#else
-/* glibc older than 2.33 (2021-02-01) use mallinfo(). Overwrite it */
-#define mallinfo2 mallinfo
-#define FORDBLKS_FORMAT " %d"
-#endif
-#else
-#error "GNU glibc is required to use --enable-malloc-logging"
-#endif
+#include <malloc.h> // For mallinfo/mallinfo2.
#endif
int debug_level = LOG_LVL_INFO;
@@ -118,11 +102,23 @@ static void log_puts(enum log_levels level,
/* print with count and time information */
int64_t t = timeval_ms() - start;
#ifdef _DEBUG_FREE_SPACE_
+#ifdef HAVE_MALLINFO2
struct mallinfo2 info = mallinfo2();
+#elif defined(HAVE_MALLINFO)
+ struct mallinfo info = mallinfo();
+#else
+#error "Configuration error: Neither mallinfo() nor mallinfo2() are available."
+#endif
#endif
fprintf(log_output, "%s%d %" PRId64 " %s:%d %s()"
#ifdef _DEBUG_FREE_SPACE_
- FORDBLKS_FORMAT
+#ifdef HAVE_MALLINFO2
+ " %zu"
+#elif defined(HAVE_MALLINFO)
+ " %d"
+#else
+#error "Configuration error: Neither mallinfo() nor mallinfo2() are available."
+#endif
#endif
": %s", log_strings[level + 1], count, t, file, line, function,
#ifdef _DEBUG_FREE_SPACE_
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 13 ++++++-------
src/helper/log.c | 32 ++++++++++++++------------------
2 files changed, 20 insertions(+), 25 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-01 14:59:13
|
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 62f49b7fe2e3f7cc87bea2afdad8bd91c7346d2b (commit)
from 8bc12d98e709f399794eb8b8b4759755ab383ff8 (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 62f49b7fe2e3f7cc87bea2afdad8bd91c7346d2b
Author: Marc Schink <de...@za...>
Date: Mon Jan 26 07:41:39 2026 +0100
README.md: Fix Markdown linter errors
Adjust Markdown formatting to satisfy the Markdown linter [1], no content
changes are included.
[1] https://github.com/jackdewinter/pymarkdown
Change-Id: I28a2e8d12bfab08017de330ae3e81239082110ff
Signed-off-by: Marc Schink <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9404
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/README.md b/README.md
index eb880e059..c8806e06c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Welcome to OpenOCD!
+# Welcome to OpenOCD
OpenOCD provides on-chip programming and debugging support with a
layered architecture of JTAG interface and TAP support including:
@@ -24,34 +24,36 @@ This README file contains an overview of the following topics:
- the installation and build process,
- packaging tips.
-
-# Quickstart for the impatient
+## Quickstart for the impatient
If you have a popular board then just start OpenOCD with its config,
e.g.:
- openocd -f board/stm32f4discovery.cfg
+```sh
+openocd -f board/stm32f4discovery.cfg
+```
If you are connecting a particular adapter with some specific target,
you need to source both the jtag interface and the target configs,
e.g.:
-```
+```sh
openocd -f interface/ftdi/jtagkey2.cfg -c "transport select jtag" \
-f target/ti/calypso.cfg
```
-```
+```sh
openocd -f interface/stlink.cfg -c "transport select swd" \
-f target/stm32l0.cfg
```
After OpenOCD startup, connect GDB with
- (gdb) target extended-remote localhost:3333
-
+```gdb
+(gdb) target extended-remote localhost:3333
+```
-# Installing OpenOCD
+## Installing OpenOCD
The easiest way to install OpenOCD is through your operating system's package
manager.
@@ -119,27 +121,22 @@ suggestions:
particular hardware;
- Use "ftdi" interface adapter driver for the FTDI-based devices.
-
-# OpenOCD Documentation
+## OpenOCD Documentation
In addition to the in-tree documentation, the latest manuals may be
viewed online at the following URLs:
- OpenOCD User's Guide:
- http://openocd.org/doc/html/index.html
+- OpenOCD User's Guide: <http://openocd.org/doc/html/index.html>
- OpenOCD Developer's Manual:
- http://openocd.org/doc/doxygen/html/index.html
+- OpenOCD Developer's Manual: <http://openocd.org/doc/doxygen/html/index.html>
These reflect the latest development versions, so the following section
introduces how to build the complete documentation from the package.
For more information, refer to these documents or contact the developers
-by subscribing to the OpenOCD developer mailing list:
+by subscribing to the OpenOCD developer mailing list: ope...@li...
- ope...@li...
-
-## Building the OpenOCD Documentation
+### Building the OpenOCD Documentation
By default the OpenOCD build process prepares documentation in the
"Info format" and installs it the standard way, so that `info openocd`
@@ -150,23 +147,28 @@ following different formats:
If `PDFVIEWER` is set, this creates and views the PDF User Guide.
- make pdf && ${PDFVIEWER} doc/openocd.pdf
+```sh
+make pdf && ${PDFVIEWER} doc/openocd.pdf
+```
If `HTMLVIEWER` is set, this creates and views the HTML User Guide.
- make html && ${HTMLVIEWER} doc/openocd.html/index.html
+```sh
+make html && ${HTMLVIEWER} doc/openocd.html/index.html
+```
The OpenOCD Developer Manual contains information about the internal
architecture and other details about the code:
Note: make sure doxygen is installed, type doxygen --version
- make doxygen && ${HTMLVIEWER} doxygen/index.html
-
+```sh
+make doxygen && ${HTMLVIEWER} doxygen/index.html
+```
-# Supported hardware
+## Supported hardware
-## JTAG adapters
+### JTAG adapters
AM335x, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432, BCM2835,
Bus Blaster, Buspirate, Cadence DPI, Cadence vdebug, Chameleon, CMSIS-DAP,
@@ -183,7 +185,7 @@ sysfsgpio, Tigard, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
USB-JTAG, USBprog, VPACLink, VSLLink, Wiggler, XDS100v2, Xilinx XVC/PCIe,
Xverve.
-## Debug targets
+### Debug targets
ARM: AArch64, ARM11, ARM7, ARM9, Cortex-A/R (v7-A/R), Cortex-M (ARMv{6/7/8}-M),
FA526, Feroceon/Dragonite, XScale.
@@ -191,7 +193,7 @@ ARCv2, AVR32, DSP563xx, DSP5680xx, EnSilica eSi-RISC, EJTAG (MIPS32, MIPS64),
ESP32, ESP32-S2, ESP32-S3, Intel Quark, LS102x-SAP, RISC-V, ST STM8,
Xtensa.
-## Flash drivers
+### Flash drivers
ADUC702x, AT91SAM, AT91SAM9 (NAND), ATH79, ATmega128RFA1, Atmel SAM, AVR, CFI,
DSP5680xx, EFM32, EM357, eSi-RISC, eSi-TSMC, EZR32HG, FM3, FM4, Freedom E SPI,
@@ -204,7 +206,7 @@ STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, STMSMI, STR7x, STR9x, SWM050,
TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF,
XMC1xxx, XMC4xxx.
-# Building OpenOCD
+## Building OpenOCD
The INSTALL file contains generic instructions for running `configure`
and compiling the OpenOCD source code. That file is provided by
@@ -214,12 +216,12 @@ the GNU autotools, then you should read those instructions first.
Note: if the INSTALL file is not present, it means you are using the
source code from a development branch, not from an OpenOCD release.
In this case, follow the instructions 'Compiling OpenOCD' below and
-the file will be created by the first command './bootstrap'.
+the file will be created by the first command `./bootstrap`.
The remainder of this document tries to provide some instructions for
those looking for a quick-install.
-## OpenOCD Dependencies
+### OpenOCD Dependencies
GCC or Clang is currently required to build OpenOCD. The developers
have begun to enforce strict code warnings (-Wall, -Werror, -Wextra,
@@ -236,7 +238,7 @@ You'll also need:
- pkg-config >= 0.23 or pkgconf
- libjim >= 0.79
-Additionally, for building from git:
+Additionally, for building from Git:
- autoconf >= 2.69
- automake >= 1.14
@@ -244,9 +246,8 @@ Additionally, for building from git:
Optional USB-based adapter drivers need libusb-1.0.
-Optional USB-Blaster, ASIX Presto and OpenJTAG interface adapter
-drivers need:
- - libftdi: http://www.intra2net.com/en/developer/libftdi/index.php
+Optional USB-Blaster, ASIX Presto and OpenJTAG interface adapter drivers need
+[libftdi](http://www.intra2net.com/en/developer/libftdi/index.php) library.
Optional CMSIS-DAP adapter driver needs HIDAPI library.
@@ -262,63 +263,47 @@ Optional development script checkpatch needs:
- python
- python-ply
-## Permissions delegation
-
-Running OpenOCD with root/administrative permissions is strongly
-discouraged for security reasons.
-
-For USB devices on GNU/Linux you should use the contrib/60-openocd.rules
-file. It probably belongs somewhere in /etc/udev/rules.d, but
-consult your operating system documentation to be sure. Do not forget
-to add yourself to the "plugdev" group.
-
-For parallel port adapters on GNU/Linux and FreeBSD please change your
-"ppdev" (parport* or ppi*) device node permissions accordingly.
-
-For parport adapters on Windows you need to run install_giveio.bat
-(it's also possible to use "ioperm" with Cygwin instead) to give
-ordinary users permissions for accessing the "LPT" registers directly.
-
-## Compiling OpenOCD
+### Compiling OpenOCD
To build OpenOCD, use the following sequence of commands:
- ./bootstrap
- ./configure [options]
- make
- sudo make install
+```sh
+./bootstrap
+./configure [options]
+make
+sudo make install
+```
-The `bootstrap` command is only necessary when building from the Git repository. The `configure` step generates the Makefiles required to build
-OpenOCD, usually with one or more options provided to it. The first
-'make' step will build OpenOCD and place the final executable in
-'./src/'. The final (optional) step, `make install`, places all of
-the files in the required location.
+The `bootstrap` command is only necessary when building from the Git repository.
+The `configure` step generates the Makefiles required to build OpenOCD, usually
+with one or more options provided to it.
+The first 'make' step will build OpenOCD and place the final executable in './src/'.
+The final (optional) step, `make install`, places all of the files in the
+required location.
To see the list of all the supported options, run `./configure --help`
-## Cross-compiling Options
+### Cross-compiling Options
Cross-compiling is supported the standard autotools way, you just need
to specify the cross-compiling target triplet in the --host option,
e.g. for cross-building for Windows 32-bit with MinGW on Debian:
- ./configure --host=i686-w64-mingw32 [options]
-
-To make pkg-config work nicely for cross-compiling, you might need an
-additional wrapper script as described at
+```sh
+./configure --host=i686-w64-mingw32 [options]
+```
- https://autotools.io/pkgconfig/cross-compiling.html
+To make pkg-config work nicely for cross-compiling, you might need an additional
+wrapper script as described at <https://autotools.io/pkgconfig/cross-compiling.html>.
This is needed to tell pkg-config where to look for the target
libraries that OpenOCD depends on. Alternatively, you can specify
`*_CFLAGS` and `*_LIBS` environment variables directly, see `./configure
--help` for the details.
-For a more or less complete script that does all this for you, see
-
- contrib/cross-build.sh
+For a more or less complete script that does all this for you, see `contrib/cross-build.sh`.
-## Parallel Port Dongles
+### Parallel Port Dongles
If you want to access the parallel port using the PPDEV interface you
have to specify both `--enable-parport` and `--enable-parport-ppdev`, since
@@ -329,31 +314,45 @@ use both the `--enable-parport` and the `--enable-parport-giveio` option
if you want to use giveio instead of ioperm parallel port access
method.
+### Obtaining OpenOCD From Git
-# Obtaining OpenOCD From GIT
-
-You can download the current GIT version with a GIT client of your
-choice from the main repository:
-
- git://git.code.sf.net/p/openocd/code
+You can download the current Git version with a Git client of your
+choice from the main repository: `git://git.code.sf.net/p/openocd/code`
You may prefer to use a mirror:
- http://repo.or.cz/r/openocd.git
- git://repo.or.cz/openocd.git
+- <http://repo.or.cz/r/openocd.git>
+- git://repo.or.cz/openocd.git
-Using the GIT command line client, you might use the following command
+Using the Git command line client, you might use the following command
to set up a local copy of the current repository (make sure there is no
directory called "openocd" in the current directory):
- git clone git://git.code.sf.net/p/openocd/code openocd
+```sh
+git clone git://git.code.sf.net/p/openocd/code openocd
+```
Then you can update that at your convenience using `git pull`.
-There is also a gitweb interface, which you can use either to browse
-the repository or to download arbitrary snapshots using HTTP:
-
- http://repo.or.cz/w/openocd.git
+There is also a gitweb interface, which you can use either to browse the
+repository or to download arbitrary snapshots using HTTP: <http://repo.or.cz/w/openocd.git>.
Snapshots are compressed tarballs of the source tree, about 1.3 MBytes
each at this writing.
+
+## Permissions delegation
+
+Running OpenOCD with root/administrative permissions is strongly
+discouraged for security reasons.
+
+For USB devices on GNU/Linux you should use the contrib/60-openocd.rules
+file. It probably belongs somewhere in /etc/udev/rules.d, but
+consult your operating system documentation to be sure. Do not forget
+to add yourself to the "plugdev" group.
+
+For parallel port adapters on GNU/Linux and FreeBSD please change your
+"ppdev" (parport* or ppi*) device node permissions accordingly.
+
+For parport adapters on Windows you need to run install_giveio.bat
+(it's also possible to use "ioperm" with Cygwin instead) to give
+ordinary users permissions for accessing the "LPT" registers directly.
-----------------------------------------------------------------------
Summary of changes:
README.md | 169 +++++++++++++++++++++++++++++++-------------------------------
1 file changed, 84 insertions(+), 85 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-01 14:58: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 8bc12d98e709f399794eb8b8b4759755ab383ff8 (commit)
from 91799d057968e66a57d1a1b700ec4a5122591fe4 (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 8bc12d98e709f399794eb8b8b4759755ab383ff8
Author: Marc Schink <de...@za...>
Date: Mon Jan 26 06:58:28 2026 +0100
README.macOS: Align structure and fix linter errors
Refactor the document structure to align with README.Windows and fix
two line-length issues so that the file is free of Markdown linter [1]
errors.
[1] https://github.com/jackdewinter/pymarkdown
Change-Id: Iab5ca09aeed2225e43934c8c2bd952a3a4b32cd0
Signed-off-by: Marc Schink <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9403
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/README.macOS.md b/README.macOS.md
index 2d2399c9a..a531024d9 100644
--- a/README.macOS.md
+++ b/README.macOS.md
@@ -1,4 +1,8 @@
-# Building OpenOCD for macOS
+# OpenOCD for macOS
+
+This README contains instructions that are specific to macOS.
+
+## Building
There are a few prerequisites you will need first:
@@ -20,20 +24,34 @@ manually from the sources.
With Homebrew you can either run:
- brew install [--HEAD] openocd (where optional --HEAD asks brew to
- install the current Git version)
+```sh
+brew install [--HEAD] open-ocd
+```
+
+Where ``--HEAD`` asks ``brew`` to install the current Git version instead of the
+lastest release.
-or
+You can also run:
- brew install libtool automake libusb [hidapi] [libftdi] (to install the needed dependencies and then proceed with the
- manual building procedure)
+```sh
+brew install libtool automake libusb [hidapi] [libftdi]
+```
+
+to install the needed dependencies and then proceed with the manual building
+procedure.
For building with MacPorts you need to run:
- sudo port install libtool automake autoconf pkgconfig libusb [libftdi1]
+```sh
+sudo port install libtool automake autoconf pkgconfig libusb [libftdi1]
+```
You should also specify LDFLAGS and CPPFLAGS to allow `configure` to use
-MacPorts' libraries, so run configure like this: `LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include ./configure [options]`
+MacPorts' libraries, so run configure like this:
+
+```sh
+LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include ./configure [options]
+```
See [README](README.md) for the generic building instructions.
@@ -41,10 +59,14 @@ If you're using a USB adapter and have a driver kext matched to it,
you will need to unload it prior to running OpenOCD. E.g. with Apple
driver (OS X 10.9 or later) for FTDI run:
- sudo kextunload -b com.apple.driver.AppleUSBFTDI
+```sh
+sudo kextunload -b com.apple.driver.AppleUSBFTDI
+```
for FTDI vendor driver use:
- sudo kextunload FTDIUSBSerialDriver.kext
+```sh
+sudo kextunload FTDIUSBSerialDriver.kext
+```
-To learn more on the topic please refer to the official libusb FAQ: <https://github.com/libusb/libusb/wiki/FAQ>
\ No newline at end of file
+To learn more on the topic please refer to the official libusb FAQ: <https://github.com/libusb/libusb/wiki/FAQ>
-----------------------------------------------------------------------
Summary of changes:
README.macOS.md | 44 +++++++++++++++++++++++++++++++++-----------
1 file changed, 33 insertions(+), 11 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-01 14:57:32
|
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 91799d057968e66a57d1a1b700ec4a5122591fe4 (commit)
from 7d6f3ede0edc41072c26929e4471c31782921c85 (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 91799d057968e66a57d1a1b700ec4a5122591fe4
Author: Marc Schink <de...@za...>
Date: Mon Jan 26 06:44:46 2026 +0100
README.Windows: Avoid multiple top-level headings
Refactor the document structure to avoid multiple top-level headings in
the same file.
The document is now free of Markdown linter [1] errors.
[1] https://github.com/jackdewinter/pymarkdown
Change-Id: I70122453c23c6230617c72d45986c88bb646edf5
Signed-off-by: Marc Schink <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9402
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/README.Windows.md b/README.Windows.md
index ae134d9d8..9b6f770f6 100644
--- a/README.Windows.md
+++ b/README.Windows.md
@@ -1,4 +1,8 @@
-# Building OpenOCD for Windows
+# OpenOCD for Windows
+
+This README contains instructions that are specific to Windows.
+
+## Building
You can build OpenOCD for Windows natively with either MinGW-w64/MSYS
or Cygwin (plain MinGW might work with `--disable-werror` but is not
@@ -9,7 +13,7 @@ host. See [README](README.md) for the generic instructions.
Also, the MSYS2 project provides both ready-made binaries and an easy
way to self-compile from their software repository out of the box.
-# USB adapters
+## USB adapters
For the adapters that use a HID-based protocol, e.g. CMSIS-DAP, you do
not need to perform any additional configuration.
-----------------------------------------------------------------------
Summary of changes:
README.Windows.md | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-01 14:57: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 7d6f3ede0edc41072c26929e4471c31782921c85 (commit)
from c348b9f2d7045cb4e5c294154d5ccd7ef4f6aedf (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 7d6f3ede0edc41072c26929e4471c31782921c85
Author: Marc Schink <de...@za...>
Date: Wed Jan 21 10:25:02 2026 +0100
README: Rework installation section
Document the OpenOCD installation with specific examples for package
managers and move the installation section to the beginning of the
document to make it more prominent.
Change-Id: I86e175fdd4060b49070a5c8d2b92ec1c6cfe6acf
Signed-off-by: Marc Schink <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9395
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/README.md b/README.md
index b99c6d813..eb880e059 100644
--- a/README.md
+++ b/README.md
@@ -51,6 +51,75 @@ After OpenOCD startup, connect GDB with
(gdb) target extended-remote localhost:3333
+# Installing OpenOCD
+
+The easiest way to install OpenOCD is through your operating system's package
+manager.
+
+- Debian / Ubuntu
+
+ ```sh
+ sudo apt install openocd
+ ```
+
+- Fedora
+
+ ```sh
+ sudo dnf install openocd
+ ```
+
+- macOS (via Homebrew)
+
+ ```sh
+ brew install open-ocd
+ ```
+
+- Windows (via MSYS2)
+
+ ```sh
+ pacman -S mingw-w64-x86_64-openocd
+ ```
+
+These packages are often more stable than the bleeding-edge Git mainline, where
+active development happens.
+"Packagers" create binary releases of OpenOCD after the developers publish new
+source code releases.
+Older OpenOCD versions are not suitable for diagnosing issues in the current
+release.
+Users should stay in touch with their distribution maintainers or interface
+vendors to ensure that appropriate updates are provided regularly.
+
+If you use one of these binary packages, you must contact the Packager for
+support or for newer binary versions.
+The OpenOCD developers do not provide direct support for packaged binaries.
+
+## A Note to OpenOCD Packagers
+
+You are a PACKAGER of OpenOCD if you:
+
+- Sell dongles and include pre-built binaries;
+- Supply tools or IDEs (a development solution integrating OpenOCD);
+- Build packages (e.g. RPM or DEB files for a GNU/Linux distribution).
+
+As a PACKAGER, you will experience first reports of most issues.
+When you fix those problems for your users, your solution may help
+prevent hundreds (if not thousands) of other questions from other users.
+
+If something does not work for you, please work to inform the OpenOCD
+developers know how to improve the system or documentation to avoid
+future problems, and follow-up to help us ensure the issue will be fully
+resolved in our future releases.
+
+That said, the OpenOCD developers would also like you to follow a few
+suggestions:
+
+- Send patches, including config files, upstream, participate in the
+ discussions;
+- Enable all the options OpenOCD supports, even those unrelated to your
+ particular hardware;
+- Use "ftdi" interface adapter driver for the FTDI-based devices.
+
+
# OpenOCD Documentation
In addition to the in-tree documentation, the latest manuals may be
@@ -135,55 +204,6 @@ STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, STMSMI, STR7x, STR9x, SWM050,
TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF,
XMC1xxx, XMC4xxx.
-
-# Installing OpenOCD
-
-## A Note to OpenOCD Users
-
-If you would rather be working "with" OpenOCD rather than "on" it, your
-operating system or JTAG interface supplier may provide binaries for
-you in a convenient-enough package.
-
-Such packages may be more stable than git mainline, where
-bleeding-edge development takes place. These "Packagers" produce
-binary releases of OpenOCD after the developers produces new "release"
-versions of the source code. Previous versions of OpenOCD cannot be
-used to diagnose problems with the current release, so users are
-encouraged to keep in contact with their distribution package
-maintainers or interface vendors to ensure suitable upgrades appear
-regularly.
-
-Users of these binary versions of OpenOCD must contact their Packager to
-ask for support or newer versions of the binaries; the OpenOCD
-developers do not support packages directly.
-
-## A Note to OpenOCD Packagers
-
-You are a PACKAGER of OpenOCD if you:
-
-- Sell dongles and include pre-built binaries;
-- Supply tools or IDEs (a development solution integrating OpenOCD);
-- Build packages (e.g. RPM or DEB files for a GNU/Linux distribution).
-
-As a PACKAGER, you will experience first reports of most issues.
-When you fix those problems for your users, your solution may help
-prevent hundreds (if not thousands) of other questions from other users.
-
-If something does not work for you, please work to inform the OpenOCD
-developers know how to improve the system or documentation to avoid
-future problems, and follow-up to help us ensure the issue will be fully
-resolved in our future releases.
-
-That said, the OpenOCD developers would also like you to follow a few
-suggestions:
-
-- Send patches, including config files, upstream, participate in the
- discussions;
-- Enable all the options OpenOCD supports, even those unrelated to your
- particular hardware;
-- Use "ftdi" interface adapter driver for the FTDI-based devices.
-
-
# Building OpenOCD
The INSTALL file contains generic instructions for running `configure`
-----------------------------------------------------------------------
Summary of changes:
README.md | 118 ++++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 69 insertions(+), 49 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: openocd-gerrit <ope...@us...> - 2026-02-01 14:56:09
|
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 c348b9f2d7045cb4e5c294154d5ccd7ef4f6aedf (commit)
via 3ba83c76a220b44a2a71cf1d6d27ca4b44a894c1 (commit)
from bcfa2bc6b57449e87750ef180fcc5b1bc47765d5 (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 c348b9f2d7045cb4e5c294154d5ccd7ef4f6aedf
Author: Marc Schink <de...@za...>
Date: Thu Jul 11 16:41:56 2024 +0200
README.macOS: Use Markdown syntax
Refurbish the document and use only Markdown syntax according to the
specification in [1].
[1] https://www.markdownguide.org/
Change-Id: I7ef0d4b7359ba12fd6f2fbf2c4ea1d092dcd71bd
Signed-off-by: Marc Schink <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9391
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/README.macOS.md b/README.macOS.md
index cc1e1c733..2d2399c9a 100644
--- a/README.macOS.md
+++ b/README.macOS.md
@@ -1,54 +1,50 @@
-Building OpenOCD for macOS
---------------------------
+# Building OpenOCD for macOS
There are a few prerequisites you will need first:
- Xcode (install from the AppStore)
- Command Line Tools (install from Xcode -> Preferences -> Downloads)
-- Gentoo Prefix (http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap.xml)
- or
-- Homebrew (http://mxcl.github.io/homebrew/)
- or
-- MacPorts (http://www.macports.org/install.php)
-
+- One of the following tools:
+ - Gentoo Prefix (<https://wiki.gentoo.org/wiki/Project:Prefix/Bootstrap>)
+ - Homebrew (<https://brew.sh/>)
+ - MacPorts (<https://www.macports.org/install.php>)
If you're building manually you need Texinfo version 5.0 or later. The
-simplest way to get it is to use Homebrew (brew install texinfo) and
-then ``export PATH=/usr/local/opt/texinfo/bin:$PATH``.
-
+simplest way to get it is to use Homebrew (`brew install texinfo`) and
+then `export PATH=/usr/local/opt/texinfo/bin:$PATH`.
With Gentoo Prefix you can build the release version or the latest
devel version (-9999) the usual way described in the Gentoo
documentation. Alternatively, install the prerequisites and build
manually from the sources.
-
With Homebrew you can either run:
- brew install [--HEAD] openocd (where optional --HEAD asks brew to
- install the current git version)
- or
- brew install libtool automake libusb [hidapi] [libftdi]
- (to install the needed dependencies and then proceed with the
- manual building procedure)
+ brew install [--HEAD] openocd (where optional --HEAD asks brew to
+ install the current Git version)
+
+or
+
+ brew install libtool automake libusb [hidapi] [libftdi] (to install the needed dependencies and then proceed with the
+ manual building procedure)
For building with MacPorts you need to run:
- sudo port install libtool automake autoconf pkgconfig \
- libusb [libftdi1]
-You should also specify LDFLAGS and CPPFLAGS to allow configure to use
-MacPorts' libraries, so run configure like this:
- LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include ./configure [options]
+ sudo port install libtool automake autoconf pkgconfig libusb [libftdi1]
+You should also specify LDFLAGS and CPPFLAGS to allow `configure` to use
+MacPorts' libraries, so run configure like this: `LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include ./configure [options]`
-See README.md for the generic building instructions.
+See [README](README.md) for the generic building instructions.
If you're using a USB adapter and have a driver kext matched to it,
you will need to unload it prior to running OpenOCD. E.g. with Apple
driver (OS X 10.9 or later) for FTDI run:
- sudo kextunload -b com.apple.driver.AppleUSBFTDI
+
+ sudo kextunload -b com.apple.driver.AppleUSBFTDI
+
for FTDI vendor driver use:
- sudo kextunload FTDIUSBSerialDriver.kext
-To learn more on the topic please refer to the official libusb FAQ:
-https://github.com/libusb/libusb/wiki/FAQ
+ sudo kextunload FTDIUSBSerialDriver.kext
+
+To learn more on the topic please refer to the official libusb FAQ: <https://github.com/libusb/libusb/wiki/FAQ>
\ No newline at end of file
commit 3ba83c76a220b44a2a71cf1d6d27ca4b44a894c1
Author: Marc Schink <de...@za...>
Date: Thu Jul 11 16:41:42 2024 +0200
README.Windows: Use Markdown syntax
Refurbish the document and use only Markdown syntax according to the
specification in [1].
[1] https://www.markdownguide.org/
Change-Id: I7baa9a25621155ff4acabcfde724f233578c9ee1
Signed-off-by: Marc Schink <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9390
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/README.Windows.md b/README.Windows.md
index b0d4e085f..ae134d9d8 100644
--- a/README.Windows.md
+++ b/README.Windows.md
@@ -1,17 +1,15 @@
-Building OpenOCD for Windows
-----------------------------
+# Building OpenOCD for Windows
You can build OpenOCD for Windows natively with either MinGW-w64/MSYS
-or Cygwin (plain MinGW might work with --disable-werror but is not
+or Cygwin (plain MinGW might work with `--disable-werror` but is not
recommended as it doesn't provide enough C99 compatibility).
Alternatively, one can cross-compile it using MinGW-w64 on a *nix
-host. See README.md for the generic instructions.
+host. See [README](README.md) for the generic instructions.
Also, the MSYS2 project provides both ready-made binaries and an easy
way to self-compile from their software repository out of the box.
-USB adapters
-------------
+# USB adapters
For the adapters that use a HID-based protocol, e.g. CMSIS-DAP, you do
not need to perform any additional configuration.
@@ -19,9 +17,7 @@ not need to perform any additional configuration.
For all the others you usually need to have WinUSB.sys (or
libusbK.sys) driver installed. Some vendor software (e.g. for
ST-LINKv2) does it on its own. For the other cases the easiest way to
-assign WinUSB to a device is to use the latest Zadig installer:
-
- http://zadig.akeo.ie
+assign WinUSB to a device is to use the latest Zadig installer: <https://zadig.akeo.ie>
When using a composite USB device, it's often necessary to assign
WinUSB.sys to the composite parent instead of the specific
@@ -30,7 +26,7 @@ Zadig installer.
If you need to use the same adapter with other applications that may
require another driver, a solution for Windows Vista and above is to
-activate the IgnoreHWSerNum registry setting for the USB device.
+activate the `IgnoreHWSerNum` registry setting for the USB device.
That setting forces Windows to associate the driver per port instead of
per serial number, the same behaviour as when the device does not contain
@@ -40,5 +36,5 @@ port depending on which application to use.
For more information, see:
- https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-device-specific-registry-settings
- http://www.ftdichip.com/Support/Knowledgebase/index.html?ignorehardwareserialnumber.htm
+- <https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-device-specific-registry-settings>
+- <https://www.ftdichip.com/Support/Knowledgebase/index.html?ignorehardwareserialnumber.htm>
-----------------------------------------------------------------------
Summary of changes:
README.Windows.md | 20 ++++++++------------
README.macOS.md | 52 ++++++++++++++++++++++++----------------------------
2 files changed, 32 insertions(+), 40 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|