aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)AuthorFilesLines
2020-11-15flash/stm32l4x: STM32L55/L56xx basic support (non-secure mode)Tarek BOCHKATI1-3/+2
STM32L5 have 512 Kbytes of Flash memory with dual bank architecture. STM32L5 flash is quite similar to L4 flash, mainly register names and offsets and some bits are changed. NON-SECURE flash is located at 0x8000000 like L4 devices, so no big change is needed (secure flash will be subject of another change). Note: flash driver name is set stm32l5x, in order to extend the commands with specific L5 commands (to manage TZEN for example ...) Note: this works only when TZEN=0 Change-Id: Ie758abb4aa19a3f29eeb0702d7dcb43992e4c639 Signed-off-by: Michael Jung <mijung@gmx.net> Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5510 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-11-15doc: document CMSIS-DAP v2Tomas Vanek1-1/+19
Change-Id: Ie54e855901c079b456c26a6239177c7678cdcac7 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/5930 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-11-08Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interfaceAndreas Bolsch1-0/+123
- write speed up to 150 kByte/s on STM32F469I-disco (due to SWD clock and USB connection), up to 1 MByte/s on Nucleo-F767ZI with external STLink-V3 or Nucleo-G474RE with two W25Q256FV in dual 4-line mode or STM32H73BI-Disco in octal mode - tested with STM32L476G-disco (64MBit flash, 3-byte addr), STM32F412G-Disco, STM32F469I-Disco, STM32F746G-Disco, and STM32L476G-Disco (all 128Mbit flash, 3-byte addr), STM32F723E-Disco, STM32F769I-Disco (512Mbit flash, 4-byte addr) STM32L4R9I-Disco, STM32L4P5G-Disco (512MBit octo-flash, DTR, 4-byte addr) STM32H745I-Disco, STM32H747I-Disco (two 512MBit flash, 4-byte addr) STM32H73BI-Disco, STM32H735G-Disco (512MBit octo-flash, DTR, 4-byte addr) - suitable cfg for Discovery boards included - limited parsing of SFDP data if flash device not hardcoded (tested only in single/quad mode as most devices either don't support SFDP at all or have empty(!) SFDP memory) - 'set' command for auto detection override (e. g. for EEPROMs) - 'cmd' command for arbitrary SPI commands (reconfiguration, testing etc.) - makefile for creation of binary loader files - tcl/board/stm32f469discovery.cfg superseded by stm32f469i-disco.cfg - tcl/board/stm32f7discovery.cfg removed as name is ambiguous (superseded by stm32f746g-disco.cfg vs. stm32f769i-disco.cfg) - dual 4-line mode tested on Nucleo-F767ZI, Nucleo-H743ZI and Nucleo-H7A3ZI-Q with two W25Q256FV, and on Nucleo-L496ZP-P and Nucleo-L4R5ZI with two W25Q128FV, sample cfg files included and on STM32H745I-Disco, STM32H747I-Disco, STM32H750B-Disco - read/verify/erase_check uses indirect read mode to work around silicon bug in H7, L4+ and MP1 memory mapped mode (last bytes not readable, accessing last bytes causes debug interface to hang) - octospi supported only in single/dual 1-line, 2-line, 4-line and single 8-line modes, (not in hyper flash mode) Requirements: GPIOs must be initialized appropriately, and SPI flash chip be configured appropriately (1-line ..., QPI, 4-byte addresses ...). This is board/chip specific, cf. included cfg files. The driver infers most parameters from current setting in CR, CCR, ... registers. Change-Id: I54858fbbe8758c3a5fe58812e93f5f39514704f8 Signed-off-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-on: http://openocd.zylin.com/4321 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Christopher Head <chead@zaber.com>
2020-11-07doc: remove reference to already dropped tftp supportAntonio Borneo1-23/+0
The only code dealing with tftp in OpenOCD was in eCos build, code already dropped in commit 39650e2273bc ("ecosboard: delete bit-rotted eCos code") almost 8 years ago. Drop tftp related documentation too. Change-Id: I0defc8f844e74c90894dca04a652dcc497a520e1 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5913 Tested-by: jenkins Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li>
2020-11-07doc: Improve 'jlink usb' descriptionMarc Schink1-2/+2
Change-Id: Ica44980ac0ba8a4f0ff03b42ce37d1de861d4fb5 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5918 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-11-07armv7m: add a TCP channel to stream captured traceTarek BOCHKATI1-12/+17
When trace capturing the trace is enabled using 'tpiu_config internal' (via the internal mode), OpenOCD can collect the trace buffers then append it to a specified file or named pipe and propagate the trace to 'tcl_trace' command. This change is allowing OpenOCD to stream the captured trace over TCP. When using this configuration OpenOCD acts like a server and multiple clients can connect and receive the captured trace. Example on STM32F7 running at 216MHz: itm port 0 on tpiu config internal :3344 uart off 216000000 Change-Id: Idea43e7e26e87b98a33da7fb9acf7ea50fe3b345 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5345 Tested-by: jenkins Reviewed-by: Karl Palsson <karlp@tweak.net.au> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-11-04gdb_server: allow multiple GDB connections to selected targetsAntonio Borneo1-1/+12
The default way of working is to have a single GDB attached to one target, so OpenOCD accepts only one connection to the GDB port of each targets and rejects any further connection. There are some barely safe use cases in which it could get useful having a second GDB connection to the same target. One such use case is while using GDB as a 'non-intrusive memory inspector', as explained in the OpenOCD documentation. One GDB can be left running an infinite loop to dump some memory area, or even analysing the content, while keeping a second GDB ready for user interaction or spot memory check. Add a target configure option to specify the maximum number of GDB connections allowed for that target, keeping the default to 1. Change-Id: I4985a602e61588df0b527d2f2aa5b955c93e125e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5865 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2020-11-04target/arm_cti: use adiv5_jim_mem_ap_spot_configure()Antonio Borneo1-1/+1
To avoid code duplication, reorganize the code to replace cti_configure() with adiv5_jim_mem_ap_spot_configure(). Reorganize 'struct arm_cti_object' and its sub-'struct arm_cti' moving DAP and mem-AP info in a 'struct adiv5_mem_ap_spot'. Replace cti_configure() with adiv5_jim_mem_ap_spot_configure(). Deprecate the use of '-ctibase' in favor of '-baseaddr'. Change-Id: I43740a37c80de67c0f5e4dc79c3400b91a12e9e8 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5869 Tested-by: jenkins
2020-10-14Upstream tons of RISC-V changes.Tim Newsome1-3/+46
These are all the changes from https://github.com/riscv/riscv-openocd (approximately 91dc0c0c) made just to src/target/riscv/*. Some of the new code is disabled because it requires some other target-independent changes which I didn't want to include here. Built like this, OpenOCD passes: * All single-RV32 tests against spike. * All single-RV64 tests against spike. * Enough HiFive1 tests. (I suspect the failures are due to the test suite rotting.) * Many dual-RV32 (-rtos hwthread) against spike. * Many dual-RV64 (-rtos hwthread) against spike. I suspect this is an overall improvement compared to what's in mainline right now, and it gets me a lot closer to getting all the riscv-openocd work upstreamed. Change-Id: Ide2f80c9397400780ff6780d78a206bc6a6e2f98 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/5821 Tested-by: jenkins Reviewed-by: Jan Matyas <matyas@codasip.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2020-10-03Update user dir config file search pathAndreas Fritiofson1-1/+4
Search in XDG_CONFIG_HOME as per XDG Base Directory Specification in addition to $HOME/.openocd. On Darwin, search in ~/Library/Preferences/org.openocd/ which appears to be one of the conventional locations. Make $OPENOCD_SCRIPTS highest priority on all platforms, previously it was only higher on WIN32. Update the documentation to reflect the search order. Change-Id: Ibaf4b59b51fdf452712d91b47ea2b5312bb5ada9 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3890 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-10-03ARM|Driver: Add DPI Driver for emulationKevin Burke1-0/+22
This driver provides support for Cadence JTAG BFM The "jtag_dpi" driver implements a JTAG driver acting as a client for the SystemVerilog Direct Programming Interface (DPI) for JTAG devices. DPI allows OpenOCD to connect to the JTAG interface of a hardware model written in SystemVerilog, for example, on an emulation model of target hardware. Tested on Ampere emulation with Altra and Altra Max models Change-Id: Iaef8ba5cc1398ee2c888f39a606e8cb592484625 Signed-off-by: Kevin Burke <kevinb@os.amperecomputing.com> Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com> Reviewed-on: http://openocd.zylin.com/5573 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-10-03target/aarch64: a64 disassemblerMete Balci1-0/+6
Add A64 (AArch64) Disassembler using Capstone framework. Change-Id: Ia92b57001843b11a818af940a468b131e42a03fd Signed-off-by: Mete Balci <metebalci@gmail.com> [Antonio Borneo: Rebased on current HEAD] Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5004 Tested-by: jenkins
2020-08-02nulink: add minimal support for Nu-Link2Antonio Borneo1-1/+1
Implementation largely taken from Nuvoton github https://github.com/OpenNuvoton/OpenOCD-Nuvoton Reset is still not fully compatible with OpenOCD framework. Adapted to hidapi. Change-Id: Ieb1791b1b7f0b444c15c9668f8f2bcf34975d48f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Zale Yu <cyyu@nuvoton.com> Reviewed-on: http://openocd.zylin.com/5720 Tested-by: jenkins Reviewed-by: Saravanan Sekar <saravanan@linumiz.com> Reviewed-by: Marc Schink <dev@zapb.de>
2020-08-02jtag/drivers: add support for Nu-Link (Nuvoton ICE) over usbZale Yu1-2/+9
Add support for Nu-Link1 over usb hidapi and config file. The original work is fetched from Nuvoton github. Code cleanup, fix merge conflicts, compile and runtime issues. Switch the code from libusb to hidapi, being the device HID based. Add documentation. Merge fixes for multi-word memory read. Reset is not fully compatible with openocd framework; currently the target is reset and then halt at openocd start. Change-Id: I9738de4e26783ba462ea3e39ec32069fd5bb7d94 Signed-off-by: Zale Yu <cyyu@nuvoton.com> Signed-off-by: Saravanan Sekar <saravanan@linumiz.com> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5635 Tested-by: jenkins Reviewed-by: Marc Schink <dev@zapb.de>
2020-07-26rtos: add support for RIOTDaniel Krebs1-1/+5
Add threads support for RIOT (https://github.com/RIOT-OS/RIOT). Original code is from Daniel Krebs. Change-Id: I83fe3b91dd75949e800b5aea1015d8fa37b09c61 Signed-off-by: Daniel Krebs <github@daniel-krebs.net> Signed-off-by: Vincent Dupont <vincent@otakeys.com> Signed-off-by: Benjamin Valentin <benpicco@googlemail.com> Reviewed-on: http://openocd.zylin.com/4256 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-26doc/target/mips: fix grammarChristopher Head1-4/+4
Change-Id: Ib9012a1cfccbe4f69682d106688536c4d92392dd Signed-off-by: Christopher Head <chead@zaber.com> Reviewed-on: http://openocd.zylin.com/5777 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2020-07-14doc: remove duplicated wordsAntonio Borneo4-10/+10
Remove occurrences of duplicated words in the documentation. Change-Id: Ib6ef1607fc5e6387764be108b2b9c0c93ac10a62 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5754 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-07-08gdb_server: suggest user to prefer GDB extended modeAntonio Borneo1-6/+19
In case of GDB connection not using extended mode, issue a warning message to suggest the user to switch using the extended mode. Issue the message only once at each run of OpenOCD, to avoid too much noise. Update the documentation to suggest using extended mode. Change-Id: I9326e84f748d5d7912d5a48f00f0fb541ca19221 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5311 Tested-by: jenkins Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2020-06-27jtag: drivers: xlnx-pcie-xvc: Add support for SWD mode.Moritz Fischer1-2/+2
Add support for SWD debug to the Xilinx XVC/PCIe driver. This is possible since the device is essentially a shift-register. So doing SWD vs JTAG is a matter of wiring things correctly on the RTL side (use TMS for SWDI, TDO for SWDO). The clang static checker doesn't find any new problems with this change. Change-Id: I3959e21440cd1036769e8e56a55e601d3e4aee9a Signed-off-by: Moritz Fischer <moritzf@google.com> Reviewed-on: http://openocd.zylin.com/5447 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-05-24swim: add new transportAntonio Borneo1-0/+24
Add SWIM and STM8 to documentation and update TODO file. Introduce transport "swim" and command "swim newtap". Switch in swim.c from HLA API to the new SWIM API. Implement in stlink driver the SWIM APIs as wrappers of existing HLA functions. Remove any SWIM related reference from HLA files. Update stm8 config files and stlink-dap interface config file. Change-Id: I2bb9f58d52900f6eb4df05f979f7ef11fd439c24 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5530 Tested-by: jenkins
2020-05-09doc: fix typo and spellingAntonio Borneo2-6/+6
Identified by checkpatch script from Linux kernel v5.7-rc1 using the command find doc/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types TYPO_SPELLING --strict -f {} \; Change-Id: I1269ac966027439e16eb6e63179e43925bec37fa Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5614 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2020-05-09doc: fix texinfo warning on @deffn not at the line beginningAntonio Borneo1-18/+23
Commit 87a4158acf56 ("drivers: xds110: Clean up command syntax and documentation") does not follow the documentation structure that lists the adapters in cpt 2 "Debug Adapter Hardware" then lists the adapter commands in cpt 8.2 "Interface Drivers"; it puts all in cpt 2. While doing that, uses an incorrect texinfo syntax that causes the following warnings at compile time: doc/openocd.texi:543: warning: @deffn should only appear at the beginning of a line doc/openocd.texi:547: warning: @deffn should only appear at the beginning of a line doc/openocd.texi:552: warning: @deffn should only appear at the beginning of a line Move the documentation of xds110 commands in the proper chapter and fix the texinfo syntax. Change-Id: I0b3f0fe0c687f194bb02e2d81aca86fcd4fdd718 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: 87a4158acf56 ("drivers: xds110: Clean up command syntax and documentation") Reviewed-on: http://openocd.zylin.com/5613 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Edward Fewell <efewell@ti.com>
2020-04-21flash/nor: add flash mdw/h/b commandsTomas Vanek1-0/+13
Some flash banks are not mapped in the target memory (e.g. SPI flash, some special pages). Add flash version of mdw/h/b which reads data using the flash driver. Change-Id: I66910e0a69cf523fe5ca1ed6ce7b9e8e176aef4a Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4776 Tested-by: jenkins Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-04-20Add documentation section for ARCv2Evgeniy Didin1-0/+129
Changes since v1: -Moved from http://openocd.zylin.com/#/c/5332/4 into separate commit. 28.02.2020: -Removed multiple cpu configuration section, currently only ARC EM is supported. 17.03.2020: -Some cleanup -For "arc set-reg-exists" command limitize the number of arguments (50 maximum). 17.03.2020(v2): -Revert limitation for "arc set-reg-exist" command Change-Id: I4b06f89df95f2773bfde6e1bd2ae2b6b880bfaa8 Signed-off-by: Evgeniy Didin <didin@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-on: http://openocd.zylin.com/5351 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-04-09target: added events TARGET_EVENT_STEP_START and _ENDJan Matyas1-0/+4
Events TARGET_EVENT_STEP_START and TARGET_EVENT_STEP_END have been added - analogous to already existing events TARGET_EVENT_RESUME_*. This is an example of a concrete use case where having these events is important: In RISC-V processors without Debug Program Buffer, OpenOCD cannot execute fence/fence.i when resuming or single- stepping. With these events implemented, the user can instead provide custom operations to achieve that same effect prior to resuming the processor. Change-Id: I786348ff08940759d99b0f24e9e0ed5a44581094 Signed-off-by: Jan Matyas <matyas@codasip.com> Reviewed-on: http://openocd.zylin.com/5551 Tested-by: jenkins Reviewed-by: Tim Newsome <tim@sifive.com>
2020-03-27doc: add missing target typesTarek BOCHKATI1-13/+27
missing target types are arm946e, avr32_ap7k, cortex_r4, dsp5680xx, hla_target, mips_mips64, nds32_v2, nds32_v3, nds32_v3m, quark_d20xx, quark_x10xx, riscv, stm8 and testee Change-Id: I38f6ed78ee88c09add4b779cd409ebb1e219304f Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5487 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins Reviewed-by: Tim Newsome <tim@casualhacker.net> Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-03-27doc: enhance target types descriptionTarek BOCHKATI1-8/+8
target types are sorted alphabetically minor changes for some precision: - cortex_a : it's an ARMv7-A core - cortex_m : besides the ARMv7-M it support the v6-M and v8-M cores Change-Id: I37ade2392fe3948fba4156a2831bbd8739fa9993 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5486 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-03-27doc: fix OpenRISC target documentationTarek BOCHKATI1-2/+2
OpenRISC correct target name is 'or1k' not 'openrisc' http://openocd.zylin.com/3096 introduced a conflict between 'openrisc' and 'ls1_sap' documentations Change-Id: Iedebbf9809300e1272334c5b63d0b31a41062282 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5485 Tested-by: jenkins Reviewed-by: Esben Haabendal <esbenhaabendal@gmail.com> Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-03-26target: Add possibility to remove all breakpointsMarc Schink1-2/+2
Change-Id: I46acd57956846d66bef974e0538452462b197cd0 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/4916 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-03-24doc: fix texinfo files attributes on WindowsAntonio Borneo1-0/+3
While installing git on Windows, the user is prompted by a dialog "Configuring the line ending conversions" to select the value for the git property "core.autocrlf". The default choice proposed by the installer is "Checkout Windows-style, commit Unix-style line endings", that corresponds to "core.autocrlf=true". Even if the dialog provides technical explanation of the different choices, most users will blindly accept the default proposal. With "core.autocrlf=true" git will convert to DOS mode all the text files during "clone" (so can be edited by any crap Windows tool) and convert back to UNIX mode during "push" operation. While this is safe enough for C and TCL files, it breaks the texinfo files. The trailing '@' character used for command continuation in https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Def-Cmd-Continuation-Lines.html does not accept being followed by CR+LF (DOS mode), generating a build error. Same error can be replicated on Linux by passing the file doc/openocd.texi through "unix2dos" command. Tentative to fix this has already been proposed in http://openocd.zylin.com/5294 http://openocd.zylin.com/5413 by breaking the command continuation syntax, which is a no go. The correct fix would require to force/suggest all the Windows users to get rid of the crap DOS mode, but this could have side effects. To workaround the issue, add a .gitattributes file in the doc folder, specifying a local conversion attribute for the files .txt and .texi in the doc folder and overriding the eventual incorrect global value of "core.autocrlf" selected during installation. The local attribute "text eol=lf" is equivalent to the global one "core.autocrlf=input". Change-Id: I468a8f8125b6bc4628fce6c66eb082824ba3413f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5499 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-03-24drivers: xds110: Clean up command syntax and documentationEdward Fewell1-9/+19
Arrange all commands under a top level xds110 command. Fix documentation to properly reflect the current functionality. Also updated the links in the document to the new permanent links for the XDS110 only support. Patch updated for comments from code review. Return ERROR_COMMAND_SYNTAX_ERROR for wrong number of args in commands. Added deprecated commands to src/jtag/startup.tcl. Change-Id: Ica45f65e1fdf7fa72866f4e28c4f6bce428d8ac9 Signed-off-by: Edward Fewell <efewell@ti.com> Reviewed-on: http://openocd.zylin.com/5495 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-03-23flash/stm32l4x: add support of STM32WLEx devicesTarek BOCHKATI1-1/+1
STM32WLEx devices are based on arm Cortex-M4 running at 48MHz, contains a single bank of maximum 256 Kbytes of flash memory. there is 3 variants with different Flash/RAM sizes: STM32WLE5JC : 256K/64K STM32WLE5JB : 128K/48K STM32WLE5J8 : 64K/20K the work-area size is set to 20 kb to fit in STM32WLE5J8 Change-Id: Ie8e186fe4be97cbc25c53ef0ade4b4dbbcee6f66 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5450 Tested-by: jenkins Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-03-16Flash driver for STM32G0xx and STM32G4xxAndreas Bolsch1-4/+7
Flash module of STM32G0/G4 family is quite similar to the one of STM32L4, so only minor changes are required, in particular adaption of flash loader to Cortex-M0. Register addresses passed to flash loader to simplify integration of L5. Added re-probe after option byte load. Added flash size override via cfg file. WRPxxR mask now based on max. number of pages instead of fixed 0xFF, as G4 devices fill up unused bits with '1'. Sizes in stm32l4_probe changed to multiples of 1kB. Tested with Nucleo-G071RB, G030J6, Nucleo-G431RB and Nucleo-G474RE. Gap handling in G4 Cat. 3 dual bank mode tested with STM32G473RB. This handling isn't optimal as the bank size includes the size of the gap. WB not tested. Change-Id: I24df7c065afeb71c11c7e96de4aa9fdb91845593 Signed-off-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-on: http://openocd.zylin.com/4807 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-03-12target: add examine-fail eventTomas Vanek1-1/+4
A configuration script may want to check the reason why examine fails e.g. device has security lock engaged. tcl/target/kx.cfg and klx.cfg is modified to use the new event for testing of the security lock of Kinetis MCU Change-Id: Id1d3a79d24e84b513f4ea35586cd2ab0437ff9b3 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4289 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-03-07flash/nor: update support for TI MSP432 devicesEdward Fewell1-4/+4
Added fixes for issues found in additional code reviews. Fixed host Endianness issues with using buffer reads and writes instead of the *_u32 variants. Changed code that tried to ID banks by hardcode bank_number values to use instead the bank base address. This fixes problems using configurations with multiple devices. Note that this replaces Change 4786 which has been abandoned because of extensive changes to the code to stop IDing banks by name. And I think I really messed up a rebase/merge on the document file. Tested on MSP432P401R, MSP432P4111, and MSP432E401Y Launchpads. Change-Id: Id05798b3aa78ae5cbe725ee762a164d673ee5767 Signed-off-by: Edward Fewell <efewell@ti.com> Reviewed-on: http://openocd.zylin.com/5481 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-03-07bluenrg-x: simplyfied the driverluca vinci1-9/+1
Adopted only fast algorithm for flash programming: - write_word and write_byte methods have been removed. - start and end write alignments have been defined. Moved flash controller registers offsets in a common file shared with the flash algorithm. - the flash base address is passed to the flash algorithm as a parameter. Removed unused functions Change-Id: I80aeab3994e477044bbcf02e66d9525dae0cb491 Signed-off-by: luca vinci <luca.vinci@st.com> Reviewed-on: http://openocd.zylin.com/5393 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Michele Sardo <msmttchr@gmail.com>
2020-03-07bluenrg-x: added support for BlueNRG-LP deviceluca vinci1-1/+5
Extended bluenrg-x flash driver with BlueNRG-LP flash controller. Changes include: - register set for the flash controller - made software structure prone to support more easily future devices - updated target config file Change-Id: I2e2dc70db32cf98c62e3a43f2e44a4600a25ac5b Signed-off-by: luca vinci <luca.vinci@st.com> Reviewed-on: http://openocd.zylin.com/5343 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-02-24coding style: doc: remove empty lines at end of text filesAntonio Borneo1-1/+0
Empty lines at end of text files are useless. Remove them. Change-Id: I30e4d3d03c4ce846aa7bcefa7366f88732275557 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5170 Tested-by: jenkins
2020-02-24log: let command "log_output" to set back its defaultAntonio Borneo1-3/+3
The default log output is stderr. After the command "log_output" has been used to set an output log file, it is possible to return back to stderr only on *NIX hosts specifying a new log output file as "/dev/stderr", but this is not intuitive, not documented and not portable out of *NIX. Make command "log_output" able to set back the default output to stderr when the parameter is either "default" or is missing. While there, add debug message to log the change and make the command return error on incorrect syntax. Change-Id: I8c7c929780f58e2c23936737c8e7274a96734786 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5233 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-02-23flash/nor/tcl.c: add filld command to write double-word with 64-bit valueTarek BOCHKATI1-2/+3
Change-Id: I2eeda7af7d855ed1284083d025994f8fa9531969 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5443 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-02-13flash/stm32lx: mention explicitly that this driver covers STM32 L0 and L1Tarek BOCHKATI1-1/+1
this is to avoid confusion with STM32 L4, L4+ and L5 families also: - a warning message is changed to error - stm32l0x and stm32l1x aliases has been created to permit the usage of either names Change-Id: If3f16d2a3b7d1369959aa7407da37a9076ea91d7 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5437 Reviewed-by: Marc Schink <dev@zapb.de> Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-01-29doc: replace example command "interface" with "adapter driver"Antonio Borneo1-4/+4
Keep documentation consisted after commands renaming. Change-Id: I97b43887cae9d7c224b07e4ba0b7d04915a19fc4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5285 Tested-by: jenkins Reviewed-by: Marc Schink <dev@zapb.de> Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-01-29jtag: adapter: rework adapter related commandsOleksij Rempel1-22/+23
currently we have different types of same command group: - starting with adapter_* - starting with interface* - without adapter or interface prefix. Since interface name is already used, we can only use "adapter" command group by keeping old commands as well. Change-Id: Id0a1cb63a2ea6860c67ae1e7a3a06a37ddf464f4 Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-on: http://openocd.zylin.com/4774 Reviewed-by: Marc Schink <dev@zapb.de> Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-01-17jtag: drivers: xlnx-pcie-xvc: Add support for Xilinx XVC/PCIeMoritz Fischer1-0/+22
Add support for Xilinx Virtual Cable over PCIe JTAG controller. It is commonly used in Xilinx based PCI Express designs with JTAG IP in the FPGA fabric. Access to the JTAG registers happens via the PCI Express extended configuration space. This can be used to debug soft-cores instantiated in the FPGA fabric. The clang static checker doesn't find any new problems with this change. Change-Id: Ib12ede0d1f26dacfda808d5e05b947b640c5bde7 Signed-off-by: Moritz Fischer <moritzf@google.com> Reviewed-on: http://openocd.zylin.com/5314 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Marex Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-01-16flash/nor: add support of STM32WB on top STM32L4 flash driverTarek BOCHKATI1-2/+4
Change-Id: I9fb6700085d817d35a691f6484193f67939a4e0f Signed-off-by: Laurent LEMELE <laurent.lemele@st.com> Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/4933 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-01-14stlink: add DAP direct driverAntonio Borneo1-6/+31
STLINK-V3 and the new firmware V2J24 for ST-LINK/V2 provide API to directly access the DAP registers. This mode permits to use the native target in cortex_m.c, with no need to override it with the target in hla_target.c. Other advantages wrt HLA are: support for Cortex-A cores, support for SoC multi-core and/or multi AP, support for OpenOCD commands "dap" thus including control of CSW. This obsoletes the existing HLA driver for ST-Link, that should anyway be kept for those cases where it's not possible to update the ST-Link firmware. This commit introduces the minimal implementation for direct DAP access. The implementation is much slower than the HLA because every memory transfer requires several USB packets. Further commits will close the performance gap. The whole ST-Link driver is compiled under BUILD_HLADAPTER, to remove the need to split the driver between the two modes. This has to be reworked, but it's quite invasive! A new interface file stlink-dap.cfg is added and should be used in place of stlink.cfg to enable the DAP mode. Documentation is updated and reports limitation on the maximum AP number that can be accessed by ST-Link for some firmware already tested. Change-Id: I932ffe16bc81d00b1fe489e2944fda13470cce9b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/4904 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-01-02jtag: replace command "jtag_reset" with "adapter [de]assert"Antonio Borneo1-26/+35
Replace the JTAG transport specific command with a more generic one. Deprecate "jtag_reset" and update the documentation. While there, fix an error in the documentation, where the command "jtag_reset" was used in place of command "reset_config". Change-Id: I41a988d37ce69f7b35a960cbaf5306aab0299b99 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5286 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-01-02target/arm_cti: add new 'ack' and 'channel' commandsTarek BOCHKATI1-0/+9
these commands have been introduced to ease the manipulation of CTI trough script files, these commands are: - $cti_name ack $event : to acknowledge a CTI event - $cti_name channel $channel_number $operation: to perform an operation on a specific channel, the possible operations are: gate, ungate, set, clear and pulse Change-Id: I35463867a3c85072f3776c3aeb1e5788953ec435 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5315 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2019-11-27flash/nor/stm32h7x: remove options cache and some driver enhancementsTarek BOCHKATI1-0/+31
functions managing option bytes cache (stm32x_read/write_options) have bee removed, and a new functions to modify a single option byte have been introduced (stm32x_write/modify_option). by the way, some helpers have been introduced to access flash registers: - stm32x_read_flash_reg(bank, offset, *value): int - stm32x_write_flash_reg(bank, offset, value): int and a new commands to read and write a single flash option register: - stm32h7x option_read <bank> <option_reg offset> - stm32h7x option_write <bank> <option_reg offset> <value> [mask] also lock and unlock handlers' have been reduced by using the same routine (stm32x_set_rdp) and have been optimized to not write options unless there is a change in RDP level. finally, several functions have been fixed to lock flash / options in case of failure. Change-Id: I75057949ab9f5b4e0f602bafb76f9f80d53a522b Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5293 Tested-by: jenkins Reviewed-by: Christopher Head <chead@zaber.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2019-11-26flash/nor/nrf5: detect newer devices without HWID tableTomas Vanek1-0/+4
nrf5 flash driver detected devices by looking up the HWID in the table of known devices. Unfortunately chips are produced with many different HWIDs for each type. All nRF52 devices have FICR INFO field suitable for device identification without need of HWID lookup. Some newer nRF51 devices have FICR INFO too although undocumented. Use this information to identify the device. nrf5_info() is reworked to show just concise info. Decoding FICR and UICR registers was moved from nrf5_info() to a new command 'nrf5 info' without functional changes. The flash bank for UICR page has the same size as program flash sector. Change-Id: I900095b9ae23ee995f8e2bef8539b75d00300da5 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4848 Tested-by: jenkins