]> www.infradead.org Git - users/borneoa/openocd-next.git/log
users/borneoa/openocd-next.git
10 days agoconfigure: hide build issue of amt_jtagaccel driver by disabling it master next
Antonio Borneo [Tue, 3 Jun 2025 08:34:29 +0000 (10:34 +0200)]
configure: hide build issue of amt_jtagaccel driver by disabling it

With commit d8a2f6dbcf5f ("configure.ac: show the Amontec
JTAG-Accelerator driver in the config summary") the driver
amt_jtagaccel is now build by default on Linux.
This highlights the dependency of some include files, dependency
that is not properly managed and that can cause build failure.

The driver is queued to be dropped soon, so there is no real
interest to fix the dependencies.

Change the default so the driver is not built if the user does not
require it at configure time.

Change-Id: Ifb74e2c802abda290efbf59ca4ce02048c94e6f8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8939
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Tested-by: jenkins
10 days agoconfigure: fix for missing include files on Linux
Antonio Borneo [Wed, 28 May 2025 14:58:44 +0000 (16:58 +0200)]
configure: fix for missing include files on Linux

By merging [1] and [2], the drivers 'xlnx-pcie-xvc' and 'linuxspidev'
are now build by default on Linux.
This highlights the dependency of some include files under subfolder
'linux' that are not installed by default in all Linux boxes.

Add the check in 'configure' for the presence of the include file
and conditionally enable the build of the driver.

Change-Id: Ie88645c3455ab07622f069a0cc7bf09d1a5a2c75
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Link: [1] 7214c8be46f7 ("configure: show adapter Xilinx XVC/PCIe in the configuration summary")
Link: [2] 83e0293f7ba3 ("Add Linux SPI device SWD adapter support")
Reviewed-on: https://review.openocd.org/c/openocd/+/8935
Tested-by: jenkins
10 days agotarget/armv8: Handle modeswitch for aarch32 secure EL3
Kevin Yang [Mon, 12 Oct 2020 20:22:47 +0000 (13:22 -0700)]
target/armv8: Handle modeswitch for aarch32 secure EL3

For aarch32 secure EL3
- Change target_el to 3 for SVC/ABT/IRQ/FIQ/UND/SYS for aarch32 secure
EL3
- Do not update SPSR for SYS, behavior is UNPREDICTABLE (ARMv8-A F5.1.121)
- Do not execute DRPS for SYS, behavior is UNPREDICTABLE (ARMv8-A
F5.1.51)

Change-Id: Ic1484665cd53afcccb5c20b152993a3f0407f8a2
Signed-off-by: Kevin Yang <kangyang@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/5854
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-by: Plamena Marinova <pmarinova@hilscher.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agotcl: fix broken Raspberry Pi website links
Jonathan Bell [Wed, 21 May 2025 14:37:25 +0000 (15:37 +0100)]
tcl: fix broken Raspberry Pi website links

raspberrypi.com is the home for technical information, raspberrypi.org
is the Foundation's site (though there are intelligent redirects).

Several pages have moved around, fix these.

Also tweak a few comments for style and correctness.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
Change-Id: I7f52bcc362fb213b50987e3a42866fe4a6fec883
Reviewed-on: https://review.openocd.org/c/openocd/+/8885
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
10 days agodoc: bcm2835gpio: remove broken link and clarify usage
Jonathan Bell [Wed, 21 May 2025 14:26:20 +0000 (15:26 +0100)]
doc: bcm2835gpio: remove broken link and clarify usage

The peripheral address details have been removed from the documentation
part of the website (instead presented in the SoC datasheets).

Pi 5 GPIOs are provided by the RP1 southbridge, which requires the use
of libgpiod. The associated Linux driver for the GPIO interface must be
used when bitbashing on Pi 5, as the timing of pin state changes is not
guaranteed across the PCIe link without special treatment.

Using libgpiod, the typical maximum swclk speed is 1MHz.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
Change-Id: I8b2c44ec5edd71abaa0a763ba4d4f4603a211348
Reviewed-on: https://review.openocd.org/c/openocd/+/8884
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
10 days agoflash/nor/tcl: Add 'read_memory' command
Marc Schink [Sat, 23 Nov 2024 14:43:51 +0000 (14:43 +0000)]
flash/nor/tcl: Add 'read_memory' command

This command allows to read non-memory mapped flash content directly
via Tcl script. The API is the same as for the 'read_memory' command
for targets.

Change-Id: I4a8d0d7ea2f778ac8f1501227b60b964c881cb84
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8634
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 days agojtag/vdebug: implement a polling mechanism
Jacek Wuwer [Wed, 24 Apr 2024 08:15:38 +0000 (10:15 +0200)]
jtag/vdebug: implement a polling mechanism

This change adds a polling mechanism to the driver. When not busy
the driver issues a wait, allowing the target to advance time.
The wait period gets adjusted to match the polling setting.

Change-Id: I67f481d05d7c5ce5352b5cb97de78dbaa97d82ae
Signed-off-by: Jacek Wuwer <jacekmw8@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8221
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 days agotcl/target/stm32f4x: Enable the trace port clock
Marc Schink [Tue, 1 Apr 2025 04:34:27 +0000 (04:34 +0000)]
tcl/target/stm32f4x: Enable the trace port clock

Enable the trace port (GPIOE) clock, otherwise the following pin
configurations have no effect.

Change-Id: I3942d2527c64340463c3b6c607addb4214f83081
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8823
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 days agoflash/nor/spi: add puya p25q flash devices
Matthias Breithaupt [Thu, 25 Apr 2024 14:36:20 +0000 (16:36 +0200)]
flash/nor/spi: add puya p25q flash devices

P25Q16 can be found in the Efinix T13/20Q100F3, so that one is necessary
for jtagspi on those chips. The other ones were added for completeness.

Change-Id: Ifb6f3c6fbd23938d6fd26bce7742c3484ece130c
Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8223
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
10 days agohelper: configuration: check for empty search dirs
Antonio Borneo [Thu, 22 May 2025 00:02:19 +0000 (02:02 +0200)]
helper: configuration: check for empty search dirs

The function find_file() is supposed to be called when the search
dirs in 'script_search_dirs' has already been populated.

This is not the case when the command 'ocd_find' is used in one of
the embedded scripts 'startup.tcl'. It then triggers SIGSEGV.

Check for 'script_search_dirs' and eventually skip searching in
the dirs.

Change-Id: I9e75a8739c94de72041fb64487910d60dffcb2bd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8931
Tested-by: jenkins
10 days agotcl/board: Add config for nRF5340 development kit
Marc Schink [Thu, 24 Apr 2025 07:51:42 +0000 (07:51 +0000)]
tcl/board: Add config for nRF5340 development kit

Tested with nRF5340 development kit.

Change-Id: I44f1ba176dd4ac491b5dccea4c4d6d6d9bfaf479
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8867
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agotcl/board: Add config for nRF9160 development kit
Marc Schink [Thu, 24 Apr 2025 06:24:24 +0000 (06:24 +0000)]
tcl/board: Add config for nRF9160 development kit

Tested with nRF9160 development kit.

Change-Id: I367b869b9707bef0547b5d3575b24e19db74cd21
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8866
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agotcl/board: Deprecate nordic_nrf52_ftx232.cfg
Marc Schink [Mon, 21 Apr 2025 18:10:20 +0000 (18:10 +0000)]
tcl/board: Deprecate nordic_nrf52_ftx232.cfg

Board configuration files for specific external debug adapters are not /
no longer supported.

Checkpatch-ignore: LONG_LINE_STRING

Change-Id: I0f391dfb1a2d7ceb92c2ad3e34eaeb8a85b2cdc5
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8865
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agotcl/board: Deprecate old nordic configuration files
Marc Schink [Mon, 12 May 2025 08:43:19 +0000 (10:43 +0200)]
tcl/board: Deprecate old nordic configuration files

Add the old configuration files to the 'file_renaming' list in order to
ensure backwards compatibility.

Change-Id: Ia61df8e5cd8c19cee19a494635c8025e36f3f4a7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8907
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agotcl/board: Move nordic configuration files
Marc Schink [Mon, 12 May 2025 08:42:11 +0000 (10:42 +0200)]
tcl/board: Move nordic configuration files

Move board configuration files into a dedicated vendor directory as
required by the new guideline for configuration files.

Change-Id: Icbf368d7a453c82813e685d2935b186eb738c3ea
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8864
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agotcl/board: Use moved nordic target files
Marc Schink [Mon, 12 May 2025 08:54:49 +0000 (10:54 +0200)]
tcl/board: Use moved nordic target files

Use the moved nordic target configuration files.

Change-Id: Ie0e2eb7f9514eedb1ae6678eeee59291856c2674
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8906
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agotcl/target: Deprecate old nordic configuration files
Marc Schink [Mon, 12 May 2025 04:53:16 +0000 (06:53 +0200)]
tcl/target: Deprecate old nordic configuration files

Keep the old configuration files to ensure backwards compatibility.

Change-Id: Ia1d06b5a8a646d65f2cdc5a9415df3014a93b7d7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8863
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agotcl/target: Move nordic configuration files
Marc Schink [Mon, 12 May 2025 04:47:22 +0000 (06:47 +0200)]
tcl/target: Move nordic configuration files

Move target configuration files into a dedicated vendor directory as
required by the new guideline for configuration files.

Note that the moved files are still accessible via the old path to ensure
backwards compatibility. This works because of the extended file search in
vendor folders.

Change-Id: If3935985769dc543e8c7d72cda590c9d79303abb
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8905
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 days agostartup.tcl: extend the file search in vendor folders
Antonio Borneo [Wed, 21 May 2025 13:19:28 +0000 (15:19 +0200)]
startup.tcl: extend the file search in vendor folders

The TCL configuration files are going to be dispatched in vendor
specific folders.
Old user configuration files will fail to find the new files to
include, so a set of fallback files reporting the deprecation
should replace the renamed files.

To prevent such enormous proliferation of fallback files, extend
the search of files in the vendor folders too.
For non-trivial renames, a dedicated table is added in the file
tcl/file_renaming.cfg to track old --> new file names.
The deprecated message is then part of the extended search.

E.g.:
old file names:
- path/to/a/certain/vendor_config_file
- path/to/a/certain/vendor-config_file
trigger search of:
- path/to/a/certain/vendor/config_file

and
- path/to/a/certain/config_file
trigger search of:
- path/to/a/certain/${vendor}/config_file
among a possible vendors list.

This is a temporarily feature that should be removed as soon as
possible to prevent clashing on files with the same name.
The names in tcl/file_renaming.cfg are for demonstration purpose
only and should be dropped when the first real entries are added.

Change-Id: If4793fef27dc570d5df4ff4d77a5e36004f394f6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8929
Tested-by: jenkins
10 days agotcl/target: Add support for TMS570LS1xxx
Lucien Dufour [Tue, 20 May 2025 15:39:19 +0000 (17:39 +0200)]
tcl/target: Add support for TMS570LS1xxx

Added support for TMS570LS1xxx series parts. This uses the existing
ti_tms570.cfg as parent.

Change-Id: I40567bfb8dc052532807df68ef3d42f8e7a8ecf4
Signed-off-by: Lucien Dufour <lucien.buchmann@dufour.aero>
Reviewed-on: https://review.openocd.org/c/openocd/+/8928
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: zapb <dev@zapb.de>
10 days agocortex_a: Use endianness for soft breakpoints
Lucien Dufour [Thu, 15 May 2025 12:31:25 +0000 (14:31 +0200)]
cortex_a: Use endianness for soft breakpoints

Fix endianness for cortex_r4 and cortex_r5 when inserting software
breakpoints. Because the cortex_a target is used by the cortex_r
architecture and some chips start in BE by default (e.g. TMS570)

Change-Id: I68b7fe7c4604de67fee2e64fff0fad2691659a58
Signed-off-by: Lucien Dufour <lucien.buchmann@dufour.aero>
Reviewed-on: https://review.openocd.org/c/openocd/+/8909
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 days agortos/hwthread: use printf format specifier
Tomas Vanek [Mon, 19 May 2025 15:10:00 +0000 (17:10 +0200)]
rtos/hwthread: use printf format specifier

instead of typecast.

Change-Id: I62e3a0faebd915615f6b72a456667c49970a4091
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8926
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agortos/hwthread: Nicer debug message in hwthread_update_threads()
Tim Newsome [Sun, 18 May 2025 09:11:07 +0000 (11:11 +0200)]
rtos/hwthread: Nicer debug message in hwthread_update_threads()

Imported from
https://github.com/riscv-collab/riscv-openocd/pull/763

Change-Id: Ia5931a772476a2ae186ed87cd70d7e4be2f196fb
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8917
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
10 days agodoc: list target unavailable state
Tomas Vanek [Mon, 19 May 2025 14:00:52 +0000 (16:00 +0200)]
doc: list target unavailable state

Fixes: 8911: target: Add TARGET_UNAVAILABLE state | https://review.openocd.org/c/openocd/+/8911
Change-Id: I6d152aea5bb449f79fd0f829252442b8b9f8ed9c
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8923
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agogdb_server: Operate on available targets.
Tim Newsome [Thu, 27 Oct 2022 21:42:23 +0000 (14:42 -0700)]
gdb_server: Operate on available targets.

When SMP is enabled, gdb will always use the first target in the SMP
group. That doesn't work when that first target is unavailable, but
others in the SMP group are still available.

For cases where gdb expects an operation to affect the entire group (run
control, memory access), find the first available target in an SMP group
and use that.

Imported from
https://github.com/riscv-collab/riscv-openocd/pull/767

Change-Id: I4bed600da3ac0fdfe4287d8fdd090a58452db501
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8912
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agortos/hwthread: Hide unavailable targets from thread list.
Tim Newsome [Wed, 7 Sep 2022 18:55:52 +0000 (11:55 -0700)]
rtos/hwthread: Hide unavailable targets from thread list.

Imported from
https://github.com/riscv-collab/riscv-openocd/pull/767

Change-Id: I53c6e2876d9bab70800a0f080e72a2abe0499120
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8919
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
10 days agotarget: Add TARGET_UNAVAILABLE state
Tim Newsome [Thu, 27 Oct 2022 22:21:31 +0000 (15:21 -0700)]
target: Add TARGET_UNAVAILABLE state

This is added for future RISC-V changes. The RISC-V debug interface can
explicitly tell a debugger when a hart is unavailable. This is used for
instance when that hart is powered down (or yet to be powered up out of
reset).

Imported from
https://github.com/riscv-collab/riscv-openocd/pull/752

Change-Id: I8a062d59eea1e5b3c788281a75159592db024683
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8911
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Bernhard Rosenkränzer <bero@baylibre.com>
3 weeks agoserver: gdb_server: use a macro for CTRL-C value
Antonio Borneo [Mon, 19 May 2025 13:23:23 +0000 (15:23 +0200)]
server: gdb_server: use a macro for CTRL-C value

The numeric value '3' for the ASCII character CTRL-C is not
immediately readable, even if the lines that follow explicitly
mention CTRL-C.

Use the same macro present in `telnet_server.c` to replace the
numeric value.

Change-Id: Iaf4296b1f0e384f8122d8a4875cad17e8ddaf66a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8922
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
3 weeks agoserver/gdb_server: do not discard Ctrl-C if _DEBUG_GDB_IO_
Tomas Vanek [Sun, 18 May 2025 19:25:35 +0000 (21:25 +0200)]
server/gdb_server: do not discard Ctrl-C if _DEBUG_GDB_IO_

GDB server debug logging eat Ctrl-C when gdb user issues interrupt
in time of communication between OpenOCD and gdb.
E.g. Ctrl-C after `next` gdb command taking many
gdb remote protocol $vCont;s (steps)

Change-Id: I4a65446a9bb25a28e50566607b3dec116fa7d2cd
Suggested-by: Tim Newsome <tim@sifive.com>
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8920
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 weeks agoflash, target: avoid logging of numeric target state
Tomas Vanek [Sun, 18 May 2025 09:49:31 +0000 (11:49 +0200)]
flash, target: avoid logging of numeric target state

Replace it by target_state_name() helper.

Change-Id: I720f2bf121e6fd2c6987a7e8fa9e52593888ee6c
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8918
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 weeks agotarget: arm_cti: fix return values in handle_cti_dump()
Antonio Borneo [Sat, 10 May 2025 21:52:30 +0000 (23:52 +0200)]
target: arm_cti: fix return values in handle_cti_dump()

Since the initial commit f444c57bf2d6 ("arm_cti: add cti command
group") the helper handle_cti_dump() return JIM error codes.

Fix it by returning standard OpenOCD error codes.

Change-Id: Ia36b82083d213aff90fe22fcfe7fbe26172806a3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8904
Tested-by: jenkins
3 weeks agotarget: drop struct target_type::target_jim_commands()
Antonio Borneo [Sat, 10 May 2025 12:14:05 +0000 (14:14 +0200)]
target: drop struct target_type::target_jim_commands()

The API was introduced in 2008 by commit 8d73c2a9b0c0 ("duan ellis
target tcl work in progress") and never used.

Drop it!

Change-Id: Icbc5789f59696bd28f9d1151bc3e29f4adb74670
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8903
Tested-by: jenkins
3 weeks agocheckpatch: drop camelcase symbols not used anymore
Antonio Borneo [Thu, 22 Dec 2022 11:34:41 +0000 (12:34 +0100)]
checkpatch: drop camelcase symbols not used anymore

With the rewrite of jim_handler commands as COMMAND_HANDLER, some
camelcase symbol from jimtcl are not referenced anymore in OpenOCD
code.

Drop such symbols from the camelcase whitelist.

Change-Id: I723be1820f13fe2cec7e4f0512a5e9da12889199
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8902
Tested-by: jenkins
3 weeks agocommand: drop Jim Command handler, at last
Antonio Borneo [Sat, 16 Dec 2023 16:39:12 +0000 (17:39 +0100)]
command: drop Jim Command handler, at last

With all OpenOCD commands converted to COMMAND_HANDLER, we can
drop the management of jim_handler commands.
Drop also from documentation the subsection on Jim Command
Registration.

Change-Id: I4d13abc7e384e64ecb155cb40bbbd52bb79ec672
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8901
Tested-by: jenkins
3 weeks agotarget/arm_tpiu_swo: rewrite commands 'configure' and 'cget' as COMMAND_HANDLER
Antonio Borneo [Sat, 16 Dec 2023 16:29:43 +0000 (17:29 +0100)]
target/arm_tpiu_swo: rewrite commands 'configure' and 'cget' as COMMAND_HANDLER

Rewrite only the command, but still use the old jimtcl specific
code in arm_tpiu_swo_configure(), shared with command 'create'.

Change-Id: If2258f048403f54faf229e602d9b395b71894f97
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8900
Tested-by: jenkins
3 weeks agotarget/arm_tpiu_swo: rewrite command 'swo create' as COMMAND_HANDLER
Antonio Borneo [Sun, 26 May 2024 10:34:58 +0000 (12:34 +0200)]
target/arm_tpiu_swo: rewrite command 'swo create' as COMMAND_HANDLER

Rewrite only the command, but still use the old jimtcl specific
code in arm_tpiu_swo_configure(), shared with commands 'configure'
and 'cget'.

Change-Id: I39c69b1cdc23f7b5f875df3e15be987c715b0bcf
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8899
Tested-by: jenkins
3 weeks agotarget: arm_cti: rewrite commands 'cti create' as COMMAND_HANDLER
Antonio Borneo [Tue, 5 Dec 2023 00:10:10 +0000 (01:10 +0100)]
target: arm_cti: rewrite commands 'cti create' as COMMAND_HANDLER

Rewrite only the command, but still use the old jimtcl specific
code in cti_configure().

Change-Id: I29fb952a7c8148416b301cbf78b6e342979af7d3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8898
Tested-by: jenkins
3 weeks agotarget: arm_dap: rewrite commands 'dap create' as COMMAND_HANDLER
Antonio Borneo [Mon, 4 Dec 2023 23:45:54 +0000 (00:45 +0100)]
target: arm_dap: rewrite commands 'dap create' as COMMAND_HANDLER

Rewrite only the command, but still use the old jimtcl specific
code in dap_configure().

Change-Id: I3360884616367aae52f5b32247d9864000c53fdc
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8897
Tested-by: jenkins
3 weeks agocortex-a: fix single-step on infinite loop
Antonio Borneo [Fri, 2 May 2025 14:10:39 +0000 (16:10 +0200)]
cortex-a: fix single-step on infinite loop

On ARMv7a/r the single-step is implemented through a HW breakpoint
that hits instructions at any address except the address of the
current instruction.

The method above fails in case of an infinite loop coded by a
single instruction that jumps on itself; in such case, the same
instruction (at the same address) is executed over and over and
the breakpoint never hits. In current code this case is wrongly
considered as an error.

Reduce the timeout while waiting for the HW breakpoint being hit,
then halt.

The jump on itself would be executed several times before the
timeout and the halt, but this is not an issue. There are few
"pathological" instructions in ARMv7a/r that jumps on itself and
that can have side effects if executed more than once. They are
listed in the code. We do not consider these as real use cases
generated by a compiler.

Document the method in the code.

Report that the single-step function is not properly managing the
HW breakpoints if it exits on error. To be fixed in the future.

Change-Id: I9641a4a3e2f68b83897ccf3a12d3c34e98a7805c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8871
Tested-by: jenkins
4 weeks agohelper: add base64 encoding/decoding helpers from FreeBSD
Bernhard Rosenkränzer [Mon, 5 May 2025 23:07:06 +0000 (01:07 +0200)]
helper: add base64 encoding/decoding helpers from FreeBSD

These helpers are needed by the updated RISC-V target files.

Change-Id: I5aa9f4e58eb75e1c7a1e8e0e3961725e2a915ebb
Signed-off-by: Bernhard Rosenkränzer <bero@baylibre.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8895
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 weeks agohelper: add bitfield helper macros
Walter Ji [Mon, 4 Mar 2024 09:29:15 +0000 (17:29 +0800)]
helper: add bitfield helper macros

This patch ports FIELD_{GET,PREP,FIT} macros and related macro
from FreeBSD, referenced file:
- `src/tree/sys/compat/linuxkpi/common/include/linux/bitfield.h`

Checkpatch-ignore: MACRO_ARG_REUSE

Change-Id: I6fdf4514d3f95d62fadf7654409a4878d470a600
Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8171
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 weeks agoLICENSES: add dual/CC-BY-4.0
Antonio Borneo [Mon, 5 May 2025 08:00:10 +0000 (10:00 +0200)]
LICENSES: add dual/CC-BY-4.0

The license CC-BY-4.0 is not compatible with GPLv2, but files can
be dual licensed with a GPLv2 compatible license 'OR' CC-BY-4.0.

This is the case for some file auto-generated by riscv project.

Change-Id: I4313d85a569a5e6423392129a730d1e22ef17c51
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8894
Reviewed-by: Bernhard Rosenkraenzer <bero@baylibre.com>
Tested-by: jenkins
5 weeks agotesting/tcl_commands: test `target create`, `cget`, `configure`
Evgeniy Naydanov [Fri, 29 Nov 2024 14:44:50 +0000 (17:44 +0300)]
testing/tcl_commands: test `target create`, `cget`, `configure`

Introduce basic testing of error-handling in target configuration
related commands.

The tests can be run via `make check` when JTAG `dummy` adapter is
enabled.

Change-Id: Id0f382046dd70007d8e696d82d2396a7ccab7a33
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8644
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 weeks agotarget: improve error reporting for `-event` option
Evgeniy Naydanov [Mon, 28 Apr 2025 13:55:35 +0000 (16:55 +0300)]
target: improve error reporting for `-event` option

`target create` calls can get quite long and an indication what is the
option that caused the error can be helpful.

Also, there can be multiple `-event` options for different events,
therefore indicating which one is it is also helpful.

Change-Id: I5ea61437ca9705e790ed8343183883a3fdfebc80
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8861
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
5 weeks agotarget: improve error messaging in `target create`
Evgeniy Naydanov [Mon, 28 Apr 2025 13:46:08 +0000 (16:46 +0300)]
target: improve error messaging in `target create`

There are a couple of issues with the usage string for `target create`,
namely:
* `-chain-position` is allowed to be not the first option.
* `-chain-position` should be ommited alltogether on ARM targets when
  DAP is specified.

Before the patch:
```
> openocd -c 'target create name testee'
...
  target create name type '-chain-position' name [options ...]
```

After the patch:
```
> openocd -c 'target create name testee'
...
-chain-position ?name? required when creating target
> openocd -c 'target create'
...
  target create name type [options ...]
```

Change-Id: Ia21a99ce6a4086e2e0676f5ef4685da3514a4f69
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8860
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
5 weeks agotarget: cget command fix for result output
Daniel Goehring [Thu, 1 May 2025 02:38:15 +0000 (22:38 -0400)]
target: cget command fix for result output

Function target_configure() when processing a "cget" command needs
to print the result to the console. Currently the result is only printed
when an error occurs. To fix this, move the command print statement from
the error handling section to the common code section.

The code was tested by executing a "$target_name cget -dap" command
and reviewing the result.

Change-Id: Iff1999de8c8e9a837055ba95714137aa03e68d4b
Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
Fixes: 61890e3dc320 ("target: rewrite function target_configure() as COMMAND_HELPER")
Reviewed-on: https://review.openocd.org/c/openocd/+/8870
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 weeks agotcl: board: convert transport select dapdirect_swd to swd
Antonio Borneo [Thu, 1 May 2025 16:41:51 +0000 (18:41 +0200)]
tcl: board: convert transport select dapdirect_swd to swd

Two new boards were added after the commit ad53fe659b46 ("tcl:
convert transport select to jtag and swd")

Align them too.

Change-Id: I53e36a3a1a7730822521f0239922682c7b2fcef6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8869
Tested-by: jenkins
5 weeks agotransport: fix incorrect statement
Antonio Borneo [Thu, 1 May 2025 17:38:42 +0000 (19:38 +0200)]
transport: fix incorrect statement

Commit 236208a5ff2d ("transport: use a bitmask for the transport")
has an incorrect C statement in place of a return.
The code is working thanks to the previous condition never true.

The issue has been detected by clang scan-build in OpenOCD ACI
since the missing return can make the following statement
dereferencing a NULL pointer.

Fix it!

Change-Id: I3bbe04d99ad9b1288f55ba3c45e2e487aef9ae40
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 236208a5ff2d ("transport: use a bitmask for the transport")
Reviewed-on: https://review.openocd.org/c/openocd/+/8868
Tested-by: jenkins
5 weeks agotarget: armv7a: use proper type for struct armv7a_cache_common::outer_cache
Antonio Borneo [Sat, 19 Apr 2025 15:05:16 +0000 (17:05 +0200)]
target: armv7a: use proper type for struct armv7a_cache_common::outer_cache

The field 'outer_cache' is always initialized and used as a
pointer to 'struct armv7a_l2x_cache'.
There is no reason for using type 'void *' for it.

Change the type of 'outer_cache'.
Drop the useless cast while reading 'outer_cache'.

Change-Id: Iaea9d02e247da26e230f887c85fbf8e9d7be34d5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8858
Tested-by: jenkins
5 weeks agotarget: armv7a: drop command 'cache_config l2x'
Antonio Borneo [Sat, 19 Apr 2025 14:28:50 +0000 (16:28 +0200)]
target: armv7a: drop command 'cache_config l2x'

The command was already tagged as deprecated in 2015 with commit
0df557728216 ("armv7a: remove l1 flush all data handler") but has
never been removed.
An equivalent command 'cache l2x conf' was introduced at the same
time in commit cd440bd32a12 ("add armv7a_cache handlers").

Drop it and deprecate it.
Replace the old command in the Tcl script.

Change-Id: Ie24eccc99a78786903704d10ee1d9f6c924529b5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8857
Tested-by: jenkins
5 weeks agortos/FreeRTOS: fix next pointer member offset in FreeRTOS lists
Chien Wong [Tue, 8 Apr 2025 12:33:56 +0000 (20:33 +0800)]
rtos/FreeRTOS: fix next pointer member offset in FreeRTOS lists

Currently, we are using offset of xListEnd.pxPrevious in List_t for
list_next_offset and offset of pxPrevious in ListItem_t for
list_elem_next_offset. This is confusing. Fix this.
As the related lists are doubly linked lists, only iteration order is
changed without breaking functionality.
Also document those offsets.

Change-Id: I8beacc235ee781ab4e3b415fccad7b72ec55b098
Signed-off-by: Chien Wong <m@xv97.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8833
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
5 weeks agortos: rework rtos_types[] and rtos_try_next()
Antonio Borneo [Fri, 18 Apr 2025 15:04:47 +0000 (17:04 +0200)]
rtos: rework rtos_types[] and rtos_try_next()

Drop the NULL sentinel at the end of the array and use ARRAY_SIZE()
to bound the loops.
Adapt rtos_try_next() to use ARRAY_SIZE().

While there:
- change to bool the return type of rtos_try_next();
- move rtos_try_next() to avoid the forward declaration.

Change-Id: I1bee11db943b670789e62f1bebe2509bbef451a0
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8855
Tested-by: jenkins
5 weeks agortos: rework rtos_create()
Antonio Borneo [Sun, 3 Dec 2023 21:54:51 +0000 (22:54 +0100)]
rtos: rework rtos_create()

To simplify the caller of rtos_create(), convert the code from
jimtcl oriented to OpenOCD commands.

While there, fix inconsistencies in almost every rtos create()
method and reset rtos_auto_detect to better cooperate on run-time
rtos configuration.

Change-Id: I59c443aaed77a48174facdfc86db75d6b28c8480
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8830
Tested-by: jenkins
6 weeks agogithub/workflow: fix warnings for github actions
Samuel Obuch [Thu, 13 Feb 2025 13:28:27 +0000 (14:28 +0100)]
github/workflow: fix warnings for github actions

- update runner to ubuntu-latest
- pass GITHUB_TOKEN to delete-tag-and-release as input

Change-Id: I83d69cfd7af7c44e67b1115ac843a0b41d6f87b9
Signed-off-by: Samuel Obuch <samuel.obuch@espressif.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8756
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
6 weeks agodoc/manual: Add guideline for configuration files
Marc Schink [Sat, 17 Aug 2024 10:35:30 +0000 (12:35 +0200)]
doc/manual: Add guideline for configuration files

The goal of this guideline is to have consistent and well-structured
configurations files. The focus of this patch is on filenames and
directory structure. A guideline for the content of the files should be
included in a subsequent patch.

This patch addresses a long outstanding task listed in 'Pending and Open
Tasks'.

Change-Id: Ib32dd8b9ed15c3f647cd8d74cfc79edf0e79a3df
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8854
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
6 weeks agodoc/manual: Fix Tcl spelling
Marc Schink [Mon, 14 Apr 2025 07:11:36 +0000 (09:11 +0200)]
doc/manual: Fix Tcl spelling

Use 'Tcl' because it is the official spelling.

While at it, fix some misspellings of 'Jim Tcl'.

Change-Id: I2d96f63b0dbc96ae62fe00ae41d2eb16897250fb
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8853
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
6 weeks agodoc/openocd: Fix Tcl spelling
Marc Schink [Mon, 14 Apr 2025 07:09:49 +0000 (09:09 +0200)]
doc/openocd: Fix Tcl spelling

Use 'Tcl' because it is the official spelling.

While at it, fix some misspellings of 'Jim Tcl'.

Change-Id: I084541a1cc0276d15a263b843ba740da04efc30a
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8852
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
6 weeks agotcl/board: Add config for NUCLEO-U083RC
Marc Schink [Fri, 13 Dec 2024 07:34:38 +0000 (07:34 +0000)]
tcl/board: Add config for NUCLEO-U083RC

Tested with NUCLEO-U083RC development board.

Change-Id: I5e7ed1a9a19dbab70ee3155f92d67874c33b1ac2
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8649
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
6 weeks agoconfigure.ac: show the sysfsgpio adapter in the config summary
R. Diez [Thu, 10 Apr 2025 18:57:49 +0000 (20:57 +0200)]
configure.ac: show the sysfsgpio adapter in the config summary

Also enable this adapter by default (auto).

Change-Id: I43b9f1a1873b381d015114da57efc1d78e6e7780
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8834
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
6 weeks agoconfigure.ac: show the Amontec JTAG-Accelerator driver in the config summary
R. Diez [Fri, 11 Apr 2025 13:30:22 +0000 (15:30 +0200)]
configure.ac: show the Amontec JTAG-Accelerator driver in the config summary

Also enable this driver by default (auto).

Change-Id: I7f592dd697c6ee150a81e151ff2333447cd9130d
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8835
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
6 weeks agostlink: simplify the use of deprecated HLA transport
Antonio Borneo [Mon, 23 Dec 2024 19:20:08 +0000 (20:20 +0100)]
stlink: simplify the use of deprecated HLA transport

Commit 34ec5536c0ba ("stlink: deprecate HLA support") makes hard
to use the still functional HLA transport with the stlink listed
in board config files.
Now that the prefixes 'hla_' and 'dapdirect_' has been dropped
from the transport name, allow overriding the transport by using
the 'stlink-hla' script in front of the board file, e.g.:

openocd -f interface/stlink-hla.cfg -f board/st_nucleo_f4.cfg

Revert the documentation changes of the change above.
Improve the documentation to explain how to use the compatibility
HLA mode.
Improve the error message in stlink driver to guide the user to
update the stlink firmware and to use the compatibility HLA mode.

Change-Id: I5d0bc7954511692cebe024bda2aaa72767b97681
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8679
Tested-by: jenkins
6 weeks agotcl: convert transport select to jtag and swd
Antonio Borneo [Mon, 23 Dec 2024 17:10:10 +0000 (18:10 +0100)]
tcl: convert transport select to jtag and swd

Convert every transport select command:
- hla_swd -> swd
- dapdirect_swd -> swd
- hla_jtag -> jtag
- dapdirect_jtag -> jtag

Change-Id: I81971e06f7aefd21a570a4e098cf3822a775464b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8678
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
6 weeks agotransport: allow transport name jtag/swd for hla and dapdirect
Antonio Borneo [Wed, 12 Feb 2025 15:30:46 +0000 (16:30 +0100)]
transport: allow transport name jtag/swd for hla and dapdirect

The transport used on adapter's wires is either 'jtag' or 'swd'
but, depending on the adapter, in the command 'transport select'
we have to use either 'jtag' or 'swd' or the similar 'hla_jtag',
'hla_swd', 'dapdirect_jtag' or 'dapdirect_swd'.
This becomes cumbersome when we just want to change adapter and we
get forced to modify the 'transport select' command too.

There is no reason for an adapter driver to support two of the
similar transports. In fact 'dapdirect' one is a superset of the
'hla', and the native 'jtag' or 'swd' is a superset of the
'dapdirect' one.
While the adapter could support more than one similar transports,
its adapter driver should only support the most complete of these
similar transports.

Modify the 'transport select' code to accept 'jtag' or 'swd' for
the 'dapdirect' and the 'hla' adapters too.
Issue a deprecated message for the old 'dapdirect' and 'hla'
transport names.
In command 'transport list', print only the transport names that
can be selected through 'transport select' skipping information
about 'dapdirect' and 'hla' versions and avoid duplicated entries.

This improvement was listed in the TODO file. Update it!

Change-Id: I626b50e7a94c141c042eab388cd1ffe77eb864c2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8677
Tested-by: jenkins
6 weeks agotransport: store the transports sorted by alphabetic name order
Antonio Borneo [Tue, 31 Dec 2024 16:01:41 +0000 (17:01 +0100)]
transport: store the transports sorted by alphabetic name order

While this operation has no real interest so far, it will be used
later to avoid listing twice protocols with the same name.

Change-Id: I59f3634830f94dc992d28863cf29d5d869726918
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8685
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
6 weeks agotransport: use helper/list.h for the list of transports
Antonio Borneo [Tue, 31 Dec 2024 15:29:46 +0000 (16:29 +0100)]
transport: use helper/list.h for the list of transports

No behavioral change, just use the list's helpers.

Change-Id: I69712648ef77689bfe6acc4811adad7293fb9009
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8684
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
6 weeks agotransport: validate the transport id's from the driver
Antonio Borneo [Sun, 22 Dec 2024 22:59:19 +0000 (23:59 +0100)]
transport: validate the transport id's from the driver

Verify that it contains only valid transports.

While JTAG and SWD are the more permissive transports, the
respective 'dapdirect' versions are slightly limited, and the
respective 'hla' versions are even more limited.
A driver should not provide two version of the same transport.
Verify that only one JTAG and only one SWD transport is present.
Verify that the preferred transport is valid too.

Change-Id: Iace2f881dd65fc763e81b33e6a7113961a7008af
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8676
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
6 weeks agoadapter: use bitmask for driver's transports
Antonio Borneo [Wed, 12 Feb 2025 15:39:18 +0000 (16:39 +0100)]
adapter: use bitmask for driver's transports

In every driver, replace the array of strings with a bitmask that
lists the supported transports.
Add an extra field to carry the former first listed transport as a
"preferred" transport. It would be used as default when no command
'transport select' is used. This keeps backward compatibility with
scripts that do not define the transport, relying on such default.

Change-Id: I4976583f1a38fdcc1f85045023dc7c629001f743
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8675
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
6 weeks agotransport: use a bitmask for the transport
Antonio Borneo [Sun, 22 Dec 2024 16:06:12 +0000 (17:06 +0100)]
transport: use a bitmask for the transport

Move the transport's names in a local array in the transport
framework.

Replace the string struct transport::name, that identifies the
transport, with a bitmask where each bit corresponds to one of the
available transports.

Change-Id: I6bdf7264d5979c355299f63fcf80bf54dcd95cee
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8674
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
6 weeks agotransport: deprecate auto-selection of transport
Antonio Borneo [Sat, 4 Jan 2025 15:54:14 +0000 (16:54 +0100)]
transport: deprecate auto-selection of transport

Historically, if the user does not specify a transport, OpenOCD
select automatically the first transport listed in the adapter
driver.
This auto-selection can behave differently by changing adapter,
so the transport should be enforced in the configuration file.

Deprecate the auto-selection and print a warning message when a
transport gets auto-selected.
There are two cases:
- adapter offers one transport only. The code early auto-selects
  the transport but does not print anything. If later the user
  selects the transport then no deprecation will be printed during
  'transport init';
- user runs 'transport select', e.g. in 'swj-dp' script, and this
  triggers the auto-selection and the deprecated message.

Change-Id: I2e55b9dcc6da77ca937978fbfb36bc365b803f0d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8692
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
6 weeks agoadapter: list supported transports beside adapter name
Antonio Borneo [Sat, 4 Jan 2025 17:41:41 +0000 (18:41 +0100)]
adapter: list supported transports beside adapter name

Modify the command 'adapter list' to output the list of transports
supported by each adapter driver.
Drop the line number, as there is no real interest on it.
Format the output as a TCL dictionary indexed by the adapter name
and containing the transports in a TCL list. E.g:
dummy          { jtag }
ftdi           { jtag swd }

This format is easily handled by TCL scripts, e.g.:
dict get [adapter list] ftdi

Document the command output.

Change-Id: I69f73b71da2f1756866a63bc2c0ba33459a29063
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8691
Tested-by: jenkins
6 weeks agoadapter: replace 'interface' with 'adapter driver'
Antonio Borneo [Sun, 16 Mar 2025 13:31:01 +0000 (14:31 +0100)]
adapter: replace 'interface' with 'adapter driver'

Comments and output strings still reference the term 'interface',
while 'adapter driver' should be used.

While there, drop the useless test if CMD_ARGV[0] is an empty
string, as this is not possible when CMD_ARGC > 0.

Change-Id: I7b46b5dd3cec53d8b5b7559d941ee9ae3bd1d89b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8808
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
6 weeks agotarget: stm8: drop include file stm8.h
Antonio Borneo [Sat, 19 Apr 2025 09:03:46 +0000 (11:03 +0200)]
target: stm8: drop include file stm8.h

The file stm8.h is only included by stm8.c and provides some basic
declaration that can be simply part of the C file.

Drop the file stm8.h and move its content in stm8.c
Replace the macro 'STM8_NUM_CORE_REGS' with the existing macro
'STM8_NUM_REGS'.

While there:
- drop the useless include of "hello.h".

Change-Id: Iecd1a27f0630cdbbfd51033d34aa3d468aa63464
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8856
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
7 weeks agoflash/nor/rp2xxx: define macro BOOTROM_MAGIC_MASK
Tomas Vanek [Fri, 21 Mar 2025 20:56:39 +0000 (21:56 +0100)]
flash/nor/rp2xxx: define macro BOOTROM_MAGIC_MASK

and use it instead of magic value.

Change-Id: I5d006aaf990d4ef3a82e622b1e41cd2bfec359f7
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reported-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8810
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
7 weeks agoflash/nor/rp2xxx: fix LOG_xxx messages
Tomas Vanek [Fri, 21 Mar 2025 20:30:13 +0000 (21:30 +0100)]
flash/nor/rp2xxx: fix LOG_xxx messages

Use proper format specifiers for uint16_t and uint32_t arguments.
Use LOG_TARGET_DEBUG instead of target->cmd_name as a parameter.
Use command_print() in command handler.
Drop dots and new lines at end of messages.

Change-Id: I37c7d3680a352210b1d7e69f2c9b4ba0efe6ec15
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reported-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8809
Tested-by: jenkins
7 weeks agoflash/nor/rp2xxx: fix flash operation after halt in RISC-V bootsel
Luke Wren [Fri, 13 Dec 2024 20:56:45 +0000 (21:56 +0100)]
flash/nor/rp2xxx: fix flash operation after halt in RISC-V bootsel

Calling ROM API set_bootrom_stack() function allows ROM API functionality
after OpenOCD halt or reset halt in RISC-V bootloder (emulated ARM code)

Change-Id: I3b255738d61876e876a94207804d9cbe1a7593c2
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: Luke Wren <luke@raspberrypi.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8729
Tested-by: jenkins
7 weeks agotcl/target/rp2040: add flash size override and reset init event
Tomas Vanek [Sat, 17 Aug 2024 14:21:06 +0000 (16:21 +0200)]
tcl/target/rp2040: add flash size override and reset init event

Allow flash size override and suppress flash size detection
by setting FLASHSIZE Tcl variable.

reset-init event calls 'connect XIP' ROM API function to make
flash content accessible at the XIP mapping memory area.

Ported from rp2350.cfg

Change-Id: I9b352b1ef6d4c6d4b78a6b61e900ce01355c8eff
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8461
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Tested-by: jenkins
7 weeks agoflash/nor/rp2xxx: fix endianness error
Tomas Vanek [Fri, 16 Aug 2024 21:35:06 +0000 (23:35 +0200)]
flash/nor/rp2xxx: fix endianness error

struct rp2xxx_rom_call_batch_record consists of uint32_t in the host
endianness. Therefore it should be converted to the target endianness
not just simply copied by target_write_buffer().

Concatenate algo code, converted batch records and terminator
to the host resident buffer and copy it at once to the target and
save some adapter turnaround times.

While on it remove typedef rp2xxx_rom_call_batch_record_t

Change-Id: I0e698396003869bee5dde4141d48ddd7d62b3cbc
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8460
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Tested-by: jenkins
7 weeks agoflash/nor/rp2xxx: drop couple of Java-like const
Tomas Vanek [Fri, 16 Aug 2024 20:53:36 +0000 (22:53 +0200)]
flash/nor/rp2xxx: drop couple of Java-like const

The compiler knows what variable remains constant during its lifetime
and there is no need to emphasise constantness.

Change-Id: Ib515f96a3c77afea87274f33b8ccac7a71bfb932
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8459
Tested-by: jenkins
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
7 weeks agoflash/nor/rp2xxx: minor code improvements
Tomas Vanek [Wed, 14 Aug 2024 15:43:13 +0000 (17:43 +0200)]
flash/nor/rp2xxx: minor code improvements

Add error messages and proper error propagation.
Type cleaning.
Use saved chip id.
Cosmetics: separating lines added.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I151e684e1fbfc9476ec429036caf85f4c9329547
Reviewed-on: https://review.openocd.org/c/openocd/+/8457
Tested-by: jenkins
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
7 weeks agodoc: document changes in rp2xxx flash driver
Tomas Vanek [Wed, 14 Aug 2024 15:14:17 +0000 (17:14 +0200)]
doc: document changes in rp2xxx flash driver

Namely the driver name changed from rp2040_flash and added RP2350 support.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I2ec9e62786002d71f655dbe0edc9f2e9ac4141b7
Reviewed-on: https://review.openocd.org/c/openocd/+/8456
Tested-by: jenkins
7 weeks agoflash/nor/rp2040: refactoring: change rp2040 to rp2xxx
Tomas Vanek [Wed, 14 Aug 2024 09:29:21 +0000 (11:29 +0200)]
flash/nor/rp2040: refactoring: change rp2040 to rp2xxx

While on it use calloc() instead of malloc()/memset()
Drop useless implementation of rp2040_flash_free_driver_priv()
- exactly same as default_flash_free_driver_priv()
Code style fixes forced by checkpatch

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I5c56c4a7d586c0dcab164a45e8f6200ea9a3bd1d
Reviewed-on: https://review.openocd.org/c/openocd/+/8455
Tested-by: jenkins
7 weeks agoflash/nor/rp2040: refactor finalizing calls and use them after erase
Tomas Vanek [Wed, 14 Aug 2024 08:47:36 +0000 (10:47 +0200)]
flash/nor/rp2040: refactor finalizing calls and use them after erase

Invalidate cache and restore flash XIP mode after erase and also
in error cleanup after write/erase.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: If7e0c2d75f50f923e6bcbf0aa7bab53fe91b6cc8
Reviewed-on: https://review.openocd.org/c/openocd/+/8454
Tested-by: jenkins
7 weeks agoflash/nor/rp2040: improve flash write buffer size computation
Tomas Vanek [Wed, 14 Aug 2024 08:41:55 +0000 (10:41 +0200)]
flash/nor/rp2040: improve flash write buffer size computation

While on it:
Define the names for the fixed flash page/sector sizes and use them
instead of magic values.
Fix memory leak on error return.

Partially backported from former upstream rp2040.c

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: If51c912f4d381ee47756a70f616ecdbee1ac0da7
Reviewed-on: https://review.openocd.org/c/openocd/+/8453
Tested-by: jenkins
7 weeks agoflash/nor/rp2040: add missing TARGET_HALTED checks
Tomas Vanek [Wed, 14 Aug 2024 07:39:42 +0000 (09:39 +0200)]
flash/nor/rp2040: add missing TARGET_HALTED checks

Flash erase and write require this guard, unfortunately it is also
partially needed in the flash probe.

Partially backported from former upstream rp2040.c

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: Ie8a240e66c3ed68e08f872cbbfdd90a6d80e1f1e
Reviewed-on: https://review.openocd.org/c/openocd/+/8452
Tested-by: jenkins
7 weeks agoflash/nor/rp2040: detect flash size including SFDP
Tomas Vanek [Wed, 14 Aug 2024 07:10:31 +0000 (09:10 +0200)]
flash/nor/rp2040: detect flash size including SFDP

Also keep size override by FLASHSIZE Tcl variable possible.

Partially backported from former upstream rp2040.c

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I224c3644450e8b46e35714bfc5436219ffdee563
Reviewed-on: https://review.openocd.org/c/openocd/+/8451
Tested-by: jenkins
7 weeks agotcl/target/rp2350: workarounds for ROM API issues
Tomas Vanek [Tue, 13 Aug 2024 14:23:20 +0000 (16:23 +0200)]
tcl/target/rp2350: workarounds for ROM API issues

A0 chip: remove pad isolation
A2 chip: instead of reset init fixes we will fix the flash driver
with the following patch by Luke Wren:
8729: flash/nor/rp2xxx: fix flash operation after halt in RISC-V bootsel
https://review.openocd.org/c/openocd/+/8729

I don't have A1 version to test.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I9e9fab04ead929fe6e0a17c6c2f32a6f02e9beb9
Reviewed-on: https://review.openocd.org/c/openocd/+/8450
Tested-by: jenkins
7 weeks agotcl/target/rp2350: universal config for any combination of CM/RV cores
Tomas Vanek [Sun, 11 Aug 2024 13:03:05 +0000 (15:03 +0200)]
tcl/target/rp2350: universal config for any combination of CM/RV cores

RP2350 has 2 slots where either Cortex-M33 or RISC-V can be selected.
Tcl variable USE_CORE selects what cores will be configured for debug.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I56fe1aa94304bdfd1ec98bba57cc3fa792a35f69
Reviewed-on: https://review.openocd.org/c/openocd/+/8449
Tested-by: jenkins
7 weeks agoflash/nor/rp2040: flash bank target switching for RP2350
Tomas Vanek [Sat, 10 Aug 2024 14:10:43 +0000 (16:10 +0200)]
flash/nor/rp2040: flash bank target switching for RP2350

RP2350 can switch either core to Cortex-M33 or RISC-V.
The different architectures have to be supported as
distinct targets in OpenOCD.

Introduce 'rp2xxx _switch target' Tcl command to adapt flash
bank to architecture changes.

Keep the target and priv pointers intact until a flash operation
is finished to prevent sudden change in the middle of write/erase.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I764354ab469e253042128958dfe70c09d04d6411
Reviewed-on: https://review.openocd.org/c/openocd/+/8448
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
7 weeks agoflash/nor/rp2040: allow arbitrary ROM API call from Tcl
Tomas Vanek [Wed, 17 Jul 2024 09:49:55 +0000 (11:49 +0200)]
flash/nor/rp2040: allow arbitrary ROM API call from Tcl

The new flash command could be handy for a reboot to BOOTSEL mode
and for making (Q)SPI flash content visible at 0x10xxxxxx
address mapping area after a rescue reset.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I1b532afcc41a4051298313e685658e86c02c53f9
Reviewed-on: https://review.openocd.org/c/openocd/+/8447
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
7 weeks agoflash/nor/rp2040: allow flash size override from cfg
Tomas Vanek [Tue, 6 Aug 2024 15:39:44 +0000 (17:39 +0200)]
flash/nor/rp2040: allow flash size override from cfg

Do not enforce hard-wired size 32 MiB

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I54608f75cc13996fda38ebd5d330e3b1893c2fd9
Reviewed-on: https://review.openocd.org/c/openocd/+/8446
Tested-by: jenkins
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
7 weeks agoflash/nor/rp2040: Fix incorrect erase bounds calculation
Luke Wren [Tue, 6 Aug 2024 10:57:04 +0000 (11:57 +0100)]
flash/nor/rp2040: Fix incorrect erase bounds calculation

when erase region does not start at 0

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: Luke Wren <luke@raspberrypi.com>
Change-Id: I2b9db61e8ac837b6c6431aacf3b73ed3a1772fbc
Reviewed-on: https://review.openocd.org/c/openocd/+/8445
Tested-by: jenkins
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
7 weeks agoflash/nor/rp2040: Avoid ROM call timeout on long erases by splitting into chunks
Luke Wren [Thu, 25 Jul 2024 09:55:41 +0000 (10:55 +0100)]
flash/nor/rp2040: Avoid ROM call timeout on long erases by splitting into chunks

Also add keep_alive() to erase/program to avoid nasty GDB message.

TV: Fixed style problems.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: Luke Wren <luke@raspberrypi.com>
Change-Id: Ibb18775aeed192361ae1585bfdaad03760583cf3
Reviewed-on: https://review.openocd.org/c/openocd/+/8444
Tested-by: jenkins
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
7 weeks agoflash/nor/rp2040: Fix up ROM table lookup for RP2350 A2
Luke Wren [Fri, 28 Jun 2024 15:41:48 +0000 (16:41 +0100)]
flash/nor/rp2040: Fix up ROM table lookup for RP2350 A2

which has 16-bit well-known pointers.

Change-Id: Ia0838a0b062f73a9c5751abb48f1b4d55100bd1d
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: Luke Wren <luke@raspberrypi.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8443
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Tested-by: jenkins
7 weeks agoflash/nor/rp2040: RP2350 A1 changes
graham sanderson [Sun, 24 Mar 2024 23:33:24 +0000 (18:33 -0500)]
flash/nor/rp2040: RP2350 A1 changes

TV: cortex_m.c changes removed.

Change-Id: I85830f2d64f8afb86690737f9ae70dde5e6143e1
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: graham sanderson <graham.sanderson@raspberrypi.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8442
Tested-by: jenkins
7 weeks agoflash/nor/rp2040: Add RISC-V ROM algorithm batch call support
Luke Wren [Wed, 14 Jul 2021 15:36:13 +0000 (16:36 +0100)]
flash/nor/rp2040: Add RISC-V ROM algorithm batch call support

And add support for A1 ROM table.

TV: cortex_m smp change removed.
Fixed style problems.
'uint' replaced by unsigned int

Change-Id: Iff2710fa0734dc7074d8d490d8fae43dc27c0c2a
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: Luke Wren <wren6991@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8441
Tested-by: jenkins
7 weeks agoflash/nor/rp2040: add RP2350 support
graham sanderson [Fri, 3 Nov 2023 20:55:41 +0000 (15:55 -0500)]
flash/nor/rp2040: add RP2350 support

TV: Extracted RP2040/2350 flash driver part only.
Fixed style problems.

Change-Id: I88a7d5aa0a239ae93d72bd5671686b19c6ca11ad
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: graham sanderson <graham.sanderson@raspberrypi.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8440
Tested-by: jenkins
8 weeks agoflash: stellaris: fix deprecated command
Antonio Borneo [Sun, 6 Apr 2025 12:59:50 +0000 (14:59 +0200)]
flash: stellaris: fix deprecated command

The driver directly runs a TCL command that has been renamed with
commit 4d99e77419e3 ("jtag/hla: Restructure commands"), while the
original name has been deprecated.

Update the TCL command to the new syntax.

Change-Id: I2fc9ef9a209bae1d78951e253d54164b2ac00cdd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 4d99e77419e3 ("jtag/hla: Restructure commands")
Reviewed-on: https://review.openocd.org/c/openocd/+/8832
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
8 weeks agotcl/target: Add RCPU support for Spacemit K1
Junhui Liu [Wed, 26 Mar 2025 15:05:39 +0000 (23:05 +0800)]
tcl/target: Add RCPU support for Spacemit K1

Add support for the Real-Time CPU (RCPU) of K1, which is a 32-bit RISC-V
N308 High-Efficiency Processor Core designed by Nuclei System Technology
Co. Ltd.

The JTAG interface can be configured to connect to either X60s or RCPU
processors. To enable JTAG for RCPU, set TARGET to "rcpu".

For example:
openocd -c "set TARGET rcpu" -f interface/cmsis-dap.cfg \
        -f target/spacemit-k1.cfg

Change-Id: I9cd62fac332137afac17efa52702818de8f0b6f5
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-on: https://review.openocd.org/c/openocd/+/8821
Reviewed-by: liangzhen <zhen.liang@spacemit.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
8 weeks agoflash/stm32l4x: support STM32C05/09x devices
HAOUES Ahmed [Tue, 25 Mar 2025 13:29:30 +0000 (14:29 +0100)]
flash/stm32l4x: support STM32C05/09x devices

STM32C05/09x devices are similar to STM32C03/07x devices

Change-Id: I77c803356c32f06699c14622828585609c90a136
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8618
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
8 weeks agotarget: drop unused parameter to target_create()
Antonio Borneo [Sun, 6 Apr 2025 12:10:28 +0000 (14:10 +0200)]
target: drop unused parameter to target_create()

The parameter Jim_Interp to the target API target_create() is not
used by any target.

Drop it.

Change-Id: I67c492078a6c808db974505f9e297c45165f64d0
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8831
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>