Commit Graph

11297 Commits

Author SHA1 Message Date
Antonio Borneo
c11a325ed8 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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9425
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
2026-02-15 18:21:48 +00:00
Antonio Borneo
a02550bafa 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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9424
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-15 18:21:36 +00:00
Antonio Borneo
b164b65b3b 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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9423
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
Tested-by: jenkins
2026-02-15 18:21:21 +00:00
Tomas Vanek
e135ffe205 tcl/target/numicro*: drop swj on swd only target
Historically swj_newdap was necessary to handle HLA properly
Since commit 60f104f450 ("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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9438
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-15 18:19:46 +00:00
Tomas Vanek
86bdd88282 tcl/target/lpc8nxx: drop swj on swd only target
Historically swj_newdap was necessary to handle HLA properly
Since commit 60f104f450 ("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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9437
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-15 18:19:34 +00:00
Tomas Vanek
0163d9ddba tcl/target/psoc4: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9436
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-15 18:19:19 +00:00
Tomas Vanek
e85f9b2954 tcl/target/nordic: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9435
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-15 18:19:02 +00:00
Tomas Vanek
a7d31c87e1 tcl/target/klx, ke0x: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9434
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-15 18:18:45 +00:00
Tomas Vanek
2374db956b tcl/target/at91samd, atsame5x: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9433
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-15 18:18:32 +00:00
Tomas Vanek
9b21a31eb7 tcl/target/rp2040, rp2350: use swd newdap instead of swj_newdap
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9421
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-15 18:18:18 +00:00
Tomas Vanek
2b986178cf 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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/5107
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-15 18:15:33 +00:00
Tomas Vanek
8ee7cb12cf 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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/5106
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-15 18:15:20 +00:00
Antonio Borneo
3c1bd50217 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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9386
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-15 18:14:12 +00:00
Antonio Borneo
5151c98455 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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9385
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
2026-02-15 18:13:48 +00:00
Mikhail Iakhiaev
078a6b1f9f 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 <iakhiaev@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9413
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-15 08:11:53 +00:00
Mikhail Iakhiaev
6eaf951b20 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 <iakhiaev@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9418
Tested-by: jenkins
Reviewed-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-15 08:10:45 +00:00
Mikhail Iakhiaev
1967f85548 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 <iakhiaev@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9417
Tested-by: jenkins
Reviewed-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-15 08:10:36 +00:00
Mikhail Iakhiaev
0f67341e15 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 <iakhiaev@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9420
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Nishanth Menon <nm@ti.com>
2026-02-15 08:10:24 +00:00
Mikhail Iakhiaev
eaa04836dc 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 <iakhiaev@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9419
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Nishanth Menon <nm@ti.com>
2026-02-15 08:10:07 +00:00
Jérôme Pouiller
718eb22bfc 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 <jerome.pouiller@silabs.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9454
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2026-02-15 08:08:49 +00:00
Gennaro Tortone
b4518ab78b 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 <gtortone@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9412
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-06 15:34:55 +00:00
Grant Ramsay
db34f6f0a7 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 <grant.ramsay@hotmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8415
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-01 15:00:24 +00:00
Antonio Borneo
92b482af50 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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9401
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Tested-by: jenkins
2026-02-01 14:59:59 +00:00
Antonio Borneo
95bd9093b1 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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9397
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Marc Schink <dev@zapb.de>
2026-02-01 14:59:15 +00:00
R. Diez
294538f0d4 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 <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9394
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-01 14:58:57 +00:00
Marc Schink
62f49b7fe2 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 <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9404
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-01 14:58:39 +00:00
Marc Schink
8bc12d98e7 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 <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9403
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-01 14:57:49 +00:00
Marc Schink
91799d0579 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 <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9402
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-01 14:57:01 +00:00
Marc Schink
7d6f3ede0e 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 <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9395
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-01 14:56:39 +00:00
Marc Schink
c348b9f2d7 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 <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9391
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-01 14:55:47 +00:00
Marc Schink
3ba83c76a2 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 <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9390
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-01 14:55:23 +00:00
Marc Schink
bcfa2bc6b5 README: Use Markdown extension
Ensures proper rendering on GitHub [1] / GitLab, clarifies that Markdown
syntax is expected from contributors, and enables editor syntax
highlighting.

[1] https://github.com/openocd-org/openocd

Change-Id: Icaff52ed2bf7d6f32b5812b5aff1c081e8b7507a
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9388
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-01 14:55:01 +00:00
Antonio Borneo
5e7182368e server: close the TCP socket while stopping a service
The function free_service() does not close the TCL socket when the
service is shutdown.

Add the necessarily code.

Change-Id: I58c5c4fee3111949fcc143c6226522c29d976493
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9376
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-01 14:51:20 +00:00
Antonio Borneo
00e4fb653d target: openrisc: jsp_server: check for out of memory, fix memory leak
During JSP service start, check that memory is properly allocated
and if add_service() fails release the allocated memory.

Change-Id: I7eb2ea8a10dbeccd27fd39485080552c5d0736d3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9375
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-01 14:51:09 +00:00
Antonio Borneo
b10372f0d2 server: gdb_server: check for out of memory and fix a memory leak
During GDB service start, check that memory is properly allocated
and if add_service() fails release the allocated memory.

While there, modify the code following the coding style.

Change-Id: Iebd1481a82f7391c110c5f6ad9878ba4abf052b3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9374
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-01 14:50:58 +00:00
Antonio Borneo
70d4ac0395 target: arm_tpiu_swo: fix memory leak on add_service() failure
When add_service() fails, the caller has to free() the private
data.

Add the missing free().

Change-Id: I998782ad3a2612dd289e269e889a3c6912fd8461
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9373
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-01 14:50:38 +00:00
Antonio Borneo
f275432b27 server: fix double free() on add_service() early return
The function add_service() can return on error when cannot create
the new service. In this case the caller cannot assume that the
parameter 'priv' has been taken in consideration and it should
take care of free() it.
To avoid a double free(), add_service() should not free() the
parameter 'priv' if it exits with error.

Replace the call to free_service() with a dedicated exit path on
error.

Change-Id: I340ec3ee46f471f31170c6717ed74fb632f0da20
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reported-by: Karl Palsson <karlp@tweak.au>
Fixes: 171454fffa ("server: fix a new double free()")
Fixes: 5ff384be08 ("semihosting: fix memory leak and double free")
Reviewed-on: https://review.openocd.org/c/openocd/+/9372
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-01 14:50:13 +00:00
HAOUES Ahmed
b9e4016161 flash/stm32l4x: Fix flash size address for STM32WBA5
Update fsize_addr parameter to reference non-secure memory address

Change-Id: I5098f478169bfaac726b96b071b99ca63d25d531
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9357
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-01-25 09:29:05 +00:00
Antonio Borneo
b36de4f539 doc: add STM32WBA as supported by flash driver 'stm32l4x'
The flash driver 'stm32l4x' supports the device STM32WBA too.

Add it in the list of supported devices.

Change-Id: I5e2ba0c9ea198eb22d1bd329dd932bc0b1b3e886
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9392
Reviewed-by: Marc Schink <dev@zapb.de>
Tested-by: jenkins
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
2026-01-25 09:28:38 +00:00
HAOUES Ahmed
eea1bb4d30 flash: nor: keep Windows backslashes in flash list output
Wrap the name field in braces when formatting the flash list Tcl structure
so that Tcl does not interpret backslash escape sequences.
This ensures Windows paths are preserved verbatim in the output and
can be reliably matched in Tcl scripts.

Fixes: 80fc9fabc6 ("flash: nor: rewrite command 'flash list' as COMMAND_HANDLER")
Change-Id: Ibd0a4b292828f084122e4a02732dc69ac0885f3c
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9360
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-01-25 09:28:21 +00:00
R. Diez
c60bb56bb6 log: avoid incrementing 'count' for discarded log lines
This matches the behaviour of code which calls LOG_DEBUG_IO etc. instead.

Change-Id: I7679f0fc67222f947a4d0f1d53aa627a186ebcd3
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9318
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-01-25 09:27:30 +00:00
Marc Schink
f36ab02a80 tcl/target: Move GigaDevice configs into vendor directory
Move the configuration files into a dedicated vendor folder as required
by the developer guidelines.

Change-Id: I9ed39e32b6281a9cb8510914690f3f7751b795c8
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9271
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-01-25 09:26:39 +00:00
Mark O'Donovan
22a7bda336 tcl/target: Fix include paths and standardise max32 configs
Corrected the include path for max32xxx_common.cfg in some files.
Cleaned up and standarised some comments in the max32... files.

Change-Id: I94dcc7ba6868bdd9730f03d3aa76fcdbbae33c3e
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9323
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-01-23 11:19:32 +00:00
Mark O'Donovan
f9ec0ed51f tcl/target: Add max32662.cfg
Config file added and tested on max32662evkit

Change-Id: I20cff70aaf8bb4577ba1e6f658afdd3b96e13145
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9325
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2026-01-23 11:19:02 +00:00
Mark O'Donovan
ab718d66ce tcl/target: Add max32660.cfg
Config file added and tested on max32660evsys

Change-Id: Ia9b77408be881f8b393e833c66762e0deb31221c
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9324
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-01-23 11:18:42 +00:00
Mark O'Donovan
46f7b185a1 tcl/target: Stop setting adapter speed in max32680.cfg
The assignment of adapter speed 500 was getting overwritten when
max32xxx_common.cfg is sourced at the end.

Also removed incorrect comment.

Change-Id: I49d69073d93dedf28ed69d63ece35758f4707137
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9322
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-01-23 11:18:25 +00:00
Mark O'Donovan
8f22bf7712 tcl/target: Stop setting adapter speed in max32xxx_common.cfg
Using the default speed is common and is preferred by OpenOCD.
Change-Id: I10f4ab7981aa6f9ae8e0882494287cc4b26b0398
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9382
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-01-23 11:18:05 +00:00
Marc Schink
60d11a881f adapter/jlink: Use new log level for adapter I/O
Use the new adapter I/O log level to more easily distinguish
adapter I/O messages from other debug messages.

Change-Id: Ib3aa2bf84871c038aef937452cfeb28de232d821
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9387
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-01-18 22:46:20 +00:00
R. Diez
ea9afa9e3e configure.ac: Replace --enable-verbose-usb-comms with a new runtime log level.
--enable-verbose actually did the same as --enable-verbose-usb-comms,
so the new code replaces it too.

Change-Id: I1d1ddd5d681009663e0c52a75ad76fe71dbc172a
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9281
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
2026-01-18 22:46:06 +00:00
Antonio Borneo
50fdce21a0 jep106: update to revision JEP106BN Jan 2026
Update to latest available document.

Change-Id: Iff4a3bc21394d72a5bb4754c62a0f5fdc4e5e78c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9383
Tested-by: jenkins
2026-01-18 22:45:40 +00:00