Commit Graph

897 Commits

Author SHA1 Message Date
Marc Schink e8e62c5aca target/tcl: Add get_reg function
Change-Id: Id1be9554d1df2c07cec3161a0fd3a586fdf18246
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/5312
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-05 13:21:24 +00:00
Marc Schink da73280101 target/tcl: Add set_reg function
Change-Id: I97a01b93046cb7af289792489f77f5580312585a
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/5313
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-05 13:11:25 +00:00
Jacek Wuwer f998a2aaf1 Cadence virtual debug interface (vdebug) integration
Change-Id: I1bc105b3addc3f34161c2356c482ff3011e3f2cc
Signed-off-by: Jacek Wuwer <jacekmw8@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6097
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-02-14 15:12:10 +00:00
Zoltán Dudás 5ab74bde06 semihosting: User defined operation, Tcl command exec on host
Enabling a portion (0x100 - 0x107) of the user defined semihosting
operation number range (0x100 - 0x1FF) to be processed with the help of
the existing target event mechanism, to implement a general-purpose Tcl
interface for the target available on the host, via semihosting
interface.

Example usage:
- The user configures a Tcl command as a callback for one of the newly
	defined events (semihosting-user-cmd-0x10X) in the configuration
	file.
- The target can make a semihosting call with <opnum>, passing optional
	parameters for the call.

If there is no callback registered to the user defined operation number,
nothing happens.

Example usage: Configure RTT automatically with the exact, linked
control block location from target.

Signed-off-by: Zoltán Dudás <zedudi@gmail.com>
Change-Id: I10e1784b1fecd4e630d78df81cb44bf1aa2fc247
Reviewed-on: https://review.openocd.org/c/openocd/+/6748
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-02-05 21:40:17 +00:00
Adrien Grassein 666ff828b2 jtag: Add an option to ignore the bypass bit
Some CPU wrongly indicate the bypas bit in the codeid.
It's the case of the NanoXplore NG-ULTRA chip that export a
configurable (and potentially invalid) ID for one of
its component.
Add an option to ignore it.

Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com>
Change-Id: Ic59743f23bfc4d4e23da0e8535fec8ca9e87ff1a
Reviewed-on: https://review.openocd.org/c/openocd/+/6802
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2022-01-22 10:20:17 +00:00
Antonio Borneo 5a8d32fcb9 doc: use the new jimtcl syntax for 'expr'
With jimtcl 0.81 the syntax of the TCL command 'expr' requires the
multiple arguments to be within curly brackets.

Update the examples in the documentation to follow the new syntax.
While there, split one example to avoid it to exceed the line size
during pdf document generation.

Change-Id: I91cca419f8273415ccb0c2ce369fc6ac476e34e5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6809
Tested-by: jenkins
2022-01-22 10:13:36 +00:00
Doug Brunner aad8718058 flash/nor/efr32: fixed lockbits and user data
Changed flash driver to support writing to the user data page, as well as to any portion of the lockbits page above 512 bytes (the amount used for the actual page lock words). The top part of the lockbits page is used on at least the EFR32xG1 chips for the SiLabs bootloader encryption keys.

As presented to the user, the lockbits page is the same size as the other pages, but any attempt to write to its low 512 bytes is an error. To enforce this, efr32x_write is renamed to efm32x_priv_write and a wrapper function is provided in its place. If the user erases the lockbits page, the driver rewrites the cached lock words after the erase. When the driver erases the lockbits page in order to update the lock words, it first takes a copy of anything stored in the top part of the page, and re-programs it after the erase operation.

There are now multiple instances of flash_bank for each target, and the flash_bank instances must share their cached lock words to operate as intended. Therefore, when a bank is created, the global flash bank list is used to find any other banks that share the same target. Since some banks in the global list are invalid at the time free_driver_priv is called, reference counting is used to decide when to free driver_priv.

To avoid the need to find the lockbits flash_bank from another flash_bank, efm32x_priv_write and efm32x_erase_page now take an absolute address.

There didn't seem to be any reason to prohibit unprotecting individual flash pages, so that limitation is removed from efm32x_protect().

This addresses ticket #185.

Valgrind-clean, except for 2x 4kiB not freed/still reachable blocks that were allocated by libudev.
No new Clang analyzer warnings, no new sanitizer warnings.

Signed-off-by: Doug Brunner <doug.a.brunner@gmail.com>
Change-Id: Ifb22e6149939d893f386706e99b928691ec1d41b
Reviewed-on: https://review.openocd.org/c/openocd/+/6665
Tested-by: jenkins
Reviewed-by: Fredrik Hederstierna <fredrik.hederstierna@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-01-05 17:57:08 +00:00
Tim Newsome d27d66bc1b Document how vector registers are exposed to gdb.
See https://github.com/riscv/riscv-openocd/pull/570

Change-Id: Ie7cdef3717e107a9df0b48316cfbc547dea9a7fd
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6776
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-24 15:13:14 +00:00
Jan Matyas 654c18a408 doc: Updated RISC-V memory-related cmds in documentation
- "riscv set_prefer_sba" - removed from the doc, superseded
  by the latter
- "riscv set_mem_access" - new command, new entry added
  into the doc

This change only addresses the documentation. The corresponding
implementation of the RISC-V commands is already merged.

Change-Id: I3c07672cde94324407cf667504dba5402f63a543
Signed-off-by: Jan Matyas <matyas@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6743
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2021-12-11 17:44:17 +00:00
Jan Matyas d8f64f8e35 doc: Update doc for commands "riscv expose_csrs" and "riscv expose_custom"
These commands were extended/improved in the last drop
of RISC-V target updates. Update also the documentation
to properly describe how the commands should be used now.

Change-Id: I9e2ba6adbe1a4c032b96f5f8ff2d4791fa4c2527
Signed-off-by: Jan Matyas <matyas@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6738
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tim Newsome <tim@sifive.com>
2021-12-11 17:43:40 +00:00
Yasushi SHOJI e5a93e3e7a doc/openocd.texi: Document find and ocd_find command
Document both find and ocd_find command under Config File Guidelines
-> Interface Config Files.  find command is used in the previous
section as well but the previous section is more about using OpenOCD.

The section added is "aimed at any user who needs to write a config
file".

Change-Id: I698207fe58d564c615a15b50756aa5547a5f40b7
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6737
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-11 17:42:52 +00:00
Yasushi SHOJI 37407f4a7b doc/openocd.texi: Document command mode command
Document "command mode" command Server Configuration -> Configuration
Stage.  The text is taken from command's help string.

In addition to the help string, this commit explain the words
mismatch, the doc uses "stage" but the command and source code uses
"mode" to describe the same thing.

Change-Id: I1d5fc8c64a3a0b07ea8430bf016bcbd54e52da1c
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6736
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-11 17:42:33 +00:00
Tomas Vanek 2753c9868e doc: document noinit command
Change-Id: I915c7d3231935fd44407b5fa65d86d4cb93e8db5
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6761
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-11 17:41:01 +00:00
Tomas Vanek dfc9b8e90d doc: list internal commands called by init
Change-Id: I5534c94a983906533a1b38c30ec3eb982e62dee7
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6760
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-11 17:40:43 +00:00
Yasushi SHOJI 15110b2b5b doc/openocd.texi: Document usage command
Document usage command under General Commands -> Server Commands. The
text is taken from the command's help string.

Change-Id: I957cb46cca98181c3c5e676228c5c103e47bb655
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6735
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-03 21:55:46 +00:00
Yasushi SHOJI 39197e3e53 doc/openocd.texi: Document add_help_text and add_usage_text
Document add_help_text and add_usage_text under Genral Commands ->
Misc Commands.  The text are taken from command's help strings.

Change-Id: I2bbbee8e5faa8d9654227c304e0528f5144275e8
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6734
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-03 21:55:02 +00:00
Tomas Vanek 6179d9f848 doc: document 'cmsis-dap cmd' command
Change-Id: I90b7f020ee2bf078fdf22e3d21423f333ae061ac
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6732
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-03 21:54:03 +00:00
Tomas Vanek bbe8b0df17 doc: fix list of supported nRF52 devices
Change-Id: I64d6d851dd9333689556b7062b1ff38d41b5ad32
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6731
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-03 21:53:49 +00:00
Tomas Vanek c07e4b3782 doc: document 'atsamv gpnvm' command
Change-Id: I922c75e2d074447558f85bfda5421aa24a850be1
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6729
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-03 21:53:22 +00:00
Tomas Vanek af723387be doc: mention SWD multidrop
Change-Id: I361dc351c407b67613eadef4d29e27ed0e00bd05
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6744
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2021-12-03 21:52:12 +00:00
Antonio Borneo 1d1386e31e drivers: call adapter_get_required_serial() in jtag_libusb_open()
Now that adapter serial is handled independently from the adapter
drivers, move inside jtag_libusb_open() the call to
adapter_get_required_serial(), so every adapter that uses libusb
will automagically get USB serial support.

Extend the documentation to list the adapters involved.

Change-Id: I75b3482d38f8ed3418329f3106c5e8b689fd460b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6663
Tested-by: jenkins
2021-11-28 11:01:32 +00:00
Antonio Borneo c6460ea36d jtag/hla, jtag/stlink: switch to command 'adapter serial'
The driver hla defines the command 'hla_serial' to specify the
serial string of the adapter.
The driver st-link defines the command 'st-link serial' to specify
the serial string of the adapter.

Remove and deprecate the driver commands and use 'adapter serial'.

Change-Id: I9505c398a77125b1ebf4ba71da7baf4d663b75be
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6657
Tested-by: jenkins
2021-11-28 11:01:16 +00:00
Antonio Borneo ad18c1a47f jtag/jlink: switch to command 'adapter serial'
The driver jlink defines the command 'jlink serial' to specify the
serial string of the adapter.

Remove and deprecate the driver command, and use 'adapter serial'.

Note: in former code the commands 'jlink serial' and 'jlink usb'
were mutually exclusive; running one of them would invalidate the
effect of a previous execution of the other. The new code gives
priority to 'adapter serial', even if executed before 'jlink usb'.

Change-Id: I920b0c136716f459b6fd6f7da8a01a7fa1ed389f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6656
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
2021-11-28 11:00:55 +00:00
Antonio Borneo 61a2f3284b jtag/xds110: switch to command 'adapter serial'
The driver xds110 defines the command 'xds110 serial' to specify
the serial string of the adapter.

Remove and deprecate the driver command, and use 'adapter serial'.

Note: the original command 'xds110 serial' used a complex and
undocumented conversion of the serial number through multibyte
string, wide-character string and C cast. The XDS110 I can access
and the lsusb dumps available through Google don't show any
exotic USB serial that require such conversion. The original
developer doesn't remember any constraint that mandates such
conversion (see comments in https://review.openocd.org/4322/).
The conversion is removed by this patch.

Change-Id: I38909918079b2c1797ad85ebec2fea1b33743606
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6655
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2021-11-28 10:59:23 +00:00
Antonio Borneo 271e5416af jtag/vsllink: switch to command 'adapter serial'
The driver vsllink defines the command 'vsllink usb_serial' to
specify the serial string of the adapter.

Remove and deprecate the driver command, and use 'adapter serial'.

Change-Id: Iadcc018b8aa8974ccd7156915b84e58270fad29d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6654
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2021-11-28 10:59:01 +00:00
Antonio Borneo c41d9f6190 jtag/presto: switch to command 'adapter serial'
The driver presto defines the command 'presto serial' to specify
the serial string of the adapter.

Remove and deprecate the driver command, and use 'adapter serial'.

Change-Id: I1a69acce7d4910082d2029d5941ae84f9424314c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6653
Tested-by: jenkins
2021-11-28 10:58:48 +00:00
Antonio Borneo d7b2313b5a jtag/kitprog: switch to command 'adapter serial'
The driver kitprog defines the command 'kitprog_serial' to specify
the serial string of the adapter.

Remove and deprecate the driver command, and use 'adapter serial'.

Change-Id: I844cb815af01137392b6d12e1b5972fc77ac092d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6652
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2021-11-28 10:58:14 +00:00
Antonio Borneo b1afd3dba4 jtag/ftdi: switch to command 'adapter serial'
The driver ftdi defines the command 'ftdi serial' to specify the
serial string of the adapter.

Remove and deprecate the driver command, and use 'adapter serial'.

Change-Id: Ia5b1f325b9fab8f58b5ea70f8b807e50b148b939
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6651
Tested-by: jenkins
2021-11-28 10:57:22 +00:00
Antonio Borneo 52b9497724 jtag/ft232r: switch to command 'adapter serial'
The driver ft232r defines the command 'ft232r serial_desc' to
specify the serial string of the adapter.

Remove and deprecate the driver command, and use 'adapter serial'.

Change-Id: I0bd909923a668420604fed3c9f6a260716b044c7
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6650
Tested-by: jenkins
2021-11-28 10:56:16 +00:00
Antonio Borneo 248161cbf4 jtag/cmsis_dap: switch to command 'adapter serial'
The driver cmsis_dap defines the command 'cmsis_dap_serial' to
specify the serial string of the adapter.

Remove and deprecate the driver command, and use 'adapter serial'.

Change-Id: I88e2d4de360a6c6f23529bb18494962a267250df
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6649
Tested-by: jenkins
2021-11-28 10:55:49 +00:00
Antonio Borneo 0343ae7cc7 jtag/adapter: add command 'adapter serial'
Several adapter define their own command to specify the USB serial
number or serial string to be used during USB search.

Define a general command 'adapter serial' to be proposed as
replacement of the driver specific ones.
No driver is changed so far to use it.

Change-Id: I7631687a4163ccc63a9bdf3ad1fcb300fc483d3a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6647
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2021-11-28 10:49:51 +00:00
Antonio Borneo 4626af4401 doc: fix typos in commands definition
Change-Id: Ie07260f229c6bd227bae0bf3dd97d29bf84c72ec
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6725
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-11-23 11:07:24 +00:00
Antonio Borneo 55159ea2e5 doc: remove non-existing command readgroup
The documentation included it in commit 4e79b48e2c ("Add new
target type: OpenRISC"), but the command was never added.

Remove it!

Change-Id: Ice5fa1ee4086b5f5ceb942c3ce68bc9bbd75d19b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 4e79b48e2c ("Add new target type: OpenRISC")
Reviewed-on: https://review.openocd.org/c/openocd/+/6723
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-11-23 11:07:03 +00:00
Antonio Borneo 563a5f5d78 doc: remove non-existing command swd wcr
The commands has been dropped in commit 150b7d26f2 ("arm_adi_v5:
Update DP (Debug Port) registers defined in ADIv5.2.") but the
documentation still keeps it.

Remove it!

Change-Id: I4e88f481d943f064d919f8065562052244122bf0
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 150b7d26f2 ("arm_adi_v5: Update DP (Debug Port) registers defined in ADIv5.2.")
Reviewed-on: https://review.openocd.org/c/openocd/+/6722
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-11-23 11:06:49 +00:00
Antonio Borneo cb97a4e821 doc: remove non-existing command riscv set_scratch_ram
The command was proposed in http://review.openocd.org/#/c/4578/2
and dropped in favor on existing work area commands.
Nevertheless the command landed in documentation.

Remove it!

Change-Id: I6e18124256f29be15d8593c07d96f61d19e983f8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: a51ab8ddf6 ("Add RISC-V support.")
Reviewed-on: https://review.openocd.org/c/openocd/+/6721
Tested-by: jenkins
Reviewed-by: Jan Matyas <matyas@codasip.com>
2021-11-23 11:05:35 +00:00
Tomas Vanek b973a76d86 target/arm_adi_v5,arm_dap: introduce multidrop_targetsel and its configuration
Add multidrop_targetsel to struct adiv5_dap.
Add option -dp-id and -instance-id to dap create command.
Add convenience function dap_is_multidrop()

Change-Id: Ibb93abb5f50b3665c320a10c1497421035762134
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6140
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-11-20 14:47:04 +00:00
asier70 5a0b4889d0 flash/nor/stm32f1x: Add support for GD32E23x
GD32E23x from GigaDevice is cortex-M23 microcontroller and it can work with the stm32f1x driver.
Modifications are similar to this done for GD32F1x0 in #6164 (https://review.openocd.org/c/openocd/+/6164).
Configuration file is added because its cortex-M23 CPU ID is different.
I think that GigaDevice microcontrollers should be handled in an independent unit to separate them from STM32,
but nowadays quick solution is welcome.

Signed-off-by: asier70Andrzej Sierżęga <asier70@gmail.com>
Change-Id: I91f31f5f66808bc50a8f607ac2c107e6b7c5e2b8
Reviewed-on: https://review.openocd.org/c/openocd/+/6527
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-11-15 15:35:50 +00:00
Andreas Bolsch be57b0ab84 Update jtagspi driver for 1-, 2- and 4-byte addresses
jtagspi driver always used 3-byte addresses regardless of actual
device capcity. Now select 1- to 4-byte addresses depending on
device capacity.
Some devices need a special command to activate the 4-byte address
mode, a special command to accomplish this, and a further command
for setting device properties are added.
Additionally, restriction (start of range had to be page aligned)
removed.
Tested with XCS6SLX16 board and W25Q256FV in 3- and 4-byte address
modes.

Change-Id: I88b2877517a18dac460253ae6d97f3dded054e6c
Signed-off-by: Andreas Bolsch <hyphen0break@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/4876
Reviewed-by: Jan Matyas <matyas@codasip.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
2021-11-12 20:31:46 +00:00
Paul Fertser da434d7d59 jtag: drivers: bcm2835gpio: don't allow GPIOs > 31
Current code assumes all the GPIO signals are manipulated via a single
32-bit register so using higher GPIOs silently fails.

Fix the check instead of trying to handle additional GPIOs (available on
Raspberry Pi Compute Modules) as that would slow the driver down.

Change-Id: Ib3b5864afb3b972d952f9b74665201cd93924959
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6658
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-11-05 22:44:47 +00:00
Andreas Fritiofson 4afd8852bb Remove remaining references to FTD2XX driver
This includes a USB blaster configuration that only worked with that
low-level access and some obsolete build-tests.

Change-Id: I53d27cbf782ebbd131b1af25e358adf35f2b4500
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6660
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-11-05 22:44:19 +00:00
Antonio Borneo b5a24386e4 stlink-dap: add 'cmd' to send arbitrary commands
Either for testing new commands and to retrieve information that
don't fit in any specific place of OpenOCD, for example monitoring
the target's VDD power supply from a TCL script.

Change-Id: Id43ced92c799b115bb1da1c236090b0752329051
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6564
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2021-10-02 13:17:04 +00:00
Oleksij Rempel a0bd3c9924 Partially Revert "flash/stm32l4x: introduce flash programming without loader"
This partially reverts commit 1247eee4e6.

There is no reasonable use cases where work-area should be enabled
and working, and it can't be used for the flash loader.

Instead of introducing driver specific property, users can disable
flash load by disabling work-area, for example by setting it to 0.

But still we keep the function stm32l4_write_block_without_loader
to be used when workarea is not available (no sufficient size or zero)

Change-Id: Ibb046c74df354c6067bac978e8ef7efb47d9fd2b
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6569
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2021-09-18 18:15:35 +00:00
Tarek BOCHKATI ea562985b5 gerrit url: update the gerrit server address to https://review.openocd.org
change the gerrit server address from http://openocd.zylin.com to the new
address in order to avoid re-directions.

Change-Id: I76e128c277f63783d1a6f63a6a387aa838f51f80
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6481
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-09-18 15:21:02 +00:00
Tarek BOCHKATI c865879eb8 doc: add a note to use 'stm32l4x option_load' after changing option bytes
Change-Id: I502be27da892e393731d11e02203c736e77033d0
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6533
Tested-by: jenkins
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-09-17 12:59:05 +00:00
Wealian Liao 385eedfc6f flash/nor: add support for Nuvoton NPCX series flash
Added NPCX flash driver to support the Nuvoton NPCX series
microcontrollers. Add config file for NPCX series.

Change-Id: Ia10b019a3521f59ad1e10ccdc56827ba30c3eac8
Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/5950
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2021-09-02 06:42:54 +00:00
Tarek BOCHKATI c2ad18d68b flash/stm32l4x: add support of STM32U57x/U58x
this device flash registers are quite similar to STM32L5
with this changes :
 - flash size is up to 2MB
 - 2MB variants are always dual bank
 - 1MB and 512KB variants could be dual bank (contiguous addressing)
   depending on DUALBANK bit(21)
 - flash data width is 16 bytes (quad-word)

Change-Id: Id13c552270ce1071479ad418526e8a39ebe83cb1
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6108
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2021-08-30 07:51:52 +00:00
Tarek BOCHKATI 1247eee4e6 flash/stm32l4x: introduce flash programming without loader
this capability permits to program the flash if we cannot reserve a workarea.

the introduction the command 'stm32l4x flashloader <bank_id> [enable|disable]'
helps to automatically skip using the flashloader if needed.

Change-Id: Id29213c85ee5c7c487cfee21554f5a7ea50db6c9
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6273
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Tested-by: jenkins
2021-08-26 06:27:17 +00:00
Tarek BOCHKATI 84291d0269 flash/stm32l4x: introduce 'stm32l4x trustzone [enable|disable]' command
this command will help to enable/disable or display the TrustZone security,
using the TZEN option bit.

Note: This command works only with devices with TrustZone, eg. STM32L5.
Note: This command will perform an OBL_Launch after modifying the TZEN.

Change-Id: I4aef15bf57d09c1658d37858143d23b1d43de1f0
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/5542
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2021-08-26 06:17:12 +00:00
Marc Schink 186ed3311d drivers/ft232r: Group adapter commands
Use a command group 'ft232r' with subcommands instead of individual
commands with 'ft232r_' prefix.

The old commands are still available for backward compatibility but
marked as deprecated.

Change-Id: I0dbeb4716330c83f8ce89b0d054eb0286b887bdf
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6409
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-08-14 13:37:36 +01:00
Marc Schink 1549bad5b3 drivers/usb_blaster: Group adapter commands
Use a command group 'usb_blaster' with subcommands instead of individual
commands with 'usb_blaster_' prefix.

The old commands are still available for backward compatibility but
marked as deprecated.

Change-Id: I2ae3d96ba864c20d7db67c74677781a62bfc4eb5
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6407
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-08-14 13:37:19 +01:00