openocd.git
3 years agojtag/drivers/stlink_usb: fix SWO prescaler 56/5656/3
Cliff L. Biffle [Tue, 12 May 2020 20:28:04 +0000 (13:28 -0700)]
jtag/drivers/stlink_usb: fix SWO prescaler

The config_trace function has an out-parameter for generating the
prescaler for the TPIU. The STLink implementation wasn't always writing
it, causing the tpiu command to load uninitialized stack memory (minus
one) into the TPIU's prescaler register when 'external' was requested.

This change ensures that the out-parameter (and the other one,
trace_freq, which hadn't caused any buggy behavior for me) are written
every time.

Signed-off-by: Cliff L. Biffle <cliff@oxide.computer>
Change-Id: I222975869b1aa49cc6b1963c79d5ea0f46522b8c
Reviewed-on: http://openocd.zylin.com/5656
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agotarget: restore last run state after profiling 37/5237/5
Christopher Head [Fri, 14 Jun 2019 22:35:31 +0000 (15:35 -0700)]
target: restore last run state after profiling

Now that it’s possible to start profiling from either a running or a
halted state, rather than unconditionally halting after profiling
finishes, it makes more sense to restore the processor to whatever state
(running or halted) it was in before profiling started.

Change-Id: If6f6e70a1a365c1ce3b348a306c435c220b8bf12
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/5237
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agotarget/cortex_m: reduce duplication in profiling 36/5236/5
Christopher Head [Fri, 14 Jun 2019 22:25:26 +0000 (15:25 -0700)]
target/cortex_m: reduce duplication in profiling

The Cortex-M implementation of profiling contains a bunch of
conditionals and checks to handle both chips which have PCSR and chips
which do not. However, the net effect of the non-PCSR branches is
actually exactly the same as what target_profiling_default does. Rather
than duplicating this code, just detect the situation where PCSR isn’t
available and delegate to target_profiling_default.

Change-Id: I1be57ac77f983816ab6bf644a3cfca77b67d6f70
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/5236
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agotarget: allow profiling from running 35/5235/5
Christopher Head [Fri, 14 Jun 2019 22:12:28 +0000 (15:12 -0700)]
target: allow profiling from running

There are a handful of implementations of profiling. There is the
default implementation, which repeatedly halts and resumes the target,
sampling PC each time. There is the Cortex-M implementation, which
uses PCSR if available, otherwise falling back to halting and resuming
and sampling PC. There is the OR1K implementation, which reads NPC
repeatedly. Finally, there is the NDS32 implementation which uses some
kind of AICE commands with which I am unfamiliar.

None of these (with the possible exception of the NDS32
implementation) actually require the target to be halted when starting
profiling. The Cortex-M and OR1K actually resume the target as pretty
much their first action. The default implementation doesn’t do this,
but is written in such a way that the target just flips back and forth
between halted and running, and the code will do the right thing from
either initial state. The NDS32 implementation I don’t know about.

As such, for everything except NDS32, it is not really necessary that
the target be halted to start profiling. For the non-PCSR Cortex-M and
default implementations, there is no real harm in such a requirement,
because profiling is intrusive anyway, but there is no benefit. For
the PCSR-based Cortex-M and the OR1K, requiring that the target is
halted is annoying because it makes profiling more intrusive.

Remove the must-be-halted check from the target_profiling function.
Add it to the NDS32 implementation because I am not sure if that will
break when invoked with a running target. Do not add it to any of the
other implementations because they don’t need it.

Change-Id: I479dce999a80eccccfd3be4fa192c904f0a45709
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/5235
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoflash/nor/nrf5: unify size of HWID 89/5589/2
Tomas Vanek [Mon, 13 Apr 2020 18:19:41 +0000 (20:19 +0200)]
flash/nor/nrf5: unify size of HWID

HWID is a part of 32 bit CONFIGID register. hwid member of struct nrf5_info
was typed uint32_t to enable direct CONFIGID read and masked afterwards.

Change to uint16_t to unify with hwid in struct nrf5_device_spec
and RM description.

Change-Id: Ib720d3ce23c301aee41d074ea78a6f00a23aed68
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/5589
Tested-by: jenkins
3 years agoflash/nor/nrf5: improve handling of nRF52 flash errors 87/5587/2
Tomas Vanek [Mon, 13 Apr 2020 12:49:46 +0000 (14:49 +0200)]
flash/nor/nrf5: improve handling of nRF52 flash errors

nRF52 devices indicate a flash error by emitting hard fault
exception (unlike nRF51 series).

Change error message when NVMC READY read fails. A hard fault
from flash erase/write operation is detected here.

Check exit point of the flash write algo to ensure a failed
write is recognised.

Change-Id: I637eda268a6bf45f7f41bcb9dcd82db8f5cb41b4
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/5587
Tested-by: jenkins
3 years agoflash/nor/nrf5: check protection before flash erase/write on nRF51 22/5522/5
Tomas Vanek [Mon, 16 Mar 2020 14:49:54 +0000 (15:49 +0100)]
flash/nor/nrf5: check protection before flash erase/write on nRF51

nRF51 devices have a clumsy flash protection based on UICR CLENR0.
A code running in RAM can write to a protected flash region without
any hint the protection gets violated.
NVMC flash page erase obeys protection setting but fails absolutely
silently.

Before this change the first problem was not addressed in the code.
To justify the second one, protection was loaded during probe,
after protection setting and after a mass erase.

Move protection updates to the beginning of erase/write operation
and limit them to nRF51 series only. Check for protected sectors
before write.

The change also fixes the problem of 'nrf5 mass_erase' on
nRF52833/840 devices. They use ACL flash protection, which is not
supported in nrf5 driver. mass_erase then looked like it failed.

Change-Id: Ie58cda68eb104d410b02777c3df5b343408e2666
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/5522
Tested-by: jenkins
3 years agoflash/nor/nrf5: fix protection setting on nRF51 86/5586/3
Tomas Vanek [Sun, 12 Apr 2020 08:15:00 +0000 (10:15 +0200)]
flash/nor/nrf5: fix protection setting on nRF51

Protection setting has not ever worked. UICR CLENR0 register cannot
be simply written but has to programmed because it resides in UICR
page of the flash.

Enable flash programming before writing CLENR0 and set back to r/o
afterwards.

Inform the user that reset might be required.

Change-Id: Ib0f96c74ba3583ac33f4394ddb57d8c8895adf53
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/5586
Tested-by: jenkins
3 years agotcl/interface/ftdi: Add Steppenprobe open hardware interface 53/5653/3
Diego Herranz [Sun, 10 May 2020 17:57:46 +0000 (18:57 +0100)]
tcl/interface/ftdi: Add Steppenprobe open hardware interface

https://github.com/diegoherranz/steppenprobe

Change-Id: Ief2c3f4a8707fa628650697d93893b2355015898
Signed-off-by: Diego Herranz <diegoherranz@diegoherranz.com>
Reviewed-on: http://openocd.zylin.com/5653
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoserver/telnet: Handle Ctrl+K 68/5868/4
Brian Brooks [Sun, 18 Oct 2020 13:37:09 +0000 (08:37 -0500)]
server/telnet: Handle Ctrl+K

Handle Ctrl+K shortcut which clears the line from the cursor position
to the end of line.

Change-Id: I2ecff5284473cef7c11cf9cb7e1c0c97d55f6c1c
Signed-off-by: Brian Brooks <brooks.brian@gmail.com>
Reviewed-on: http://openocd.zylin.com/5868
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
3 years agotarget/arc: introduce watchpoints support 67/5867/3
Evgeniy Didin [Thu, 30 Jul 2020 21:02:38 +0000 (00:02 +0300)]
target/arc: introduce watchpoints support

With help of actionpoint mechanism now it is possible to introduce
watchpoints support for ARC.

Change-Id: I5887335d0ba38c15c377bc1d24a1ef36e138cf65
Signed-off-by: Evgeniy Didin <didin@synopsys.com>
Reviewed-on: http://openocd.zylin.com/5867
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoAdded comment to ti-icdi.cfg 28/2528/4
John Pham [Tue, 3 Feb 2015 02:22:38 +0000 (21:22 -0500)]
Added comment to ti-icdi.cfg

Added comment to ti-icdi.cfg specifying how to get serial and an example of
specifying hla_serial for ti-icdi devices. This has been implemented in revision
2121a8f92969804611412b705af8114697a647dc

Change-Id: I648458a4dea176beae6a3f1a4e5641d0206077eb
Signed-off-by: John Pham <jhnphm@gmail.com>
Reviewed-on: http://openocd.zylin.com/2528
Tested-by: jenkins
Reviewed-by: Matthew Trescott <matthewtrescott@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoEnable hla_serial for TI ICDI devices 27/2527/5
John Pham [Mon, 2 Feb 2015 10:23:32 +0000 (05:23 -0500)]
Enable  hla_serial for TI ICDI devices

Used jtag_libusb_open from libusb_helper.h instead of
libusb_open_device_with_vid_pid to get device handle,
as well as managing context, i.e. similar to stlink_usb.
Direct calls to libusb1 are left in for the moment.

(When this Gerrit revision was originally created,
the jtag_libusb_ wrappers did not return error conditions.)

Tested w/ a TM4C123GXL board

Change-Id: I71e9a366356c125444d4813e58ddd9b6c6498bf0
Signed-off-by: John Pham <jhnphm@gmail.com>
Signed-off-by: Matthew Trescott <matthewtrescott@gmail.com>
Reviewed-on: http://openocd.zylin.com/2527
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoflash/stm32l4: add support of STM32G4 category 4 devices (G491/G4A1) 93/5793/3
Tarek BOCHKATI [Thu, 15 Oct 2020 16:05:48 +0000 (17:05 +0100)]
flash/stm32l4: add support of STM32G4 category 4 devices (G491/G4A1)

STM32G4 cat.4 devices are up to 512 KB of flash memory (single bank)
organized into pages of 2KB each.

Reference: RM0440 rev.4

Change-Id: I0f510e2806c8f824fff8083e2d4f90d68f01046b
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/5793
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
3 years agotcl/target/nrf52: fix nrf52_recover 45/5845/2
Tomas Vanek [Thu, 1 Oct 2020 10:36:00 +0000 (12:36 +0200)]
tcl/target/nrf52: fix nrf52_recover

nrf52_recover was merged in pre "Handle Tcl return values consistently"
state - remove ocd_ prefixes.

Erase and unlock sequence was changed to comply Nordic semiconductor
recommendation:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fnwp_027%2FWP%2Fnwp_027%2FnWP_027_erasing.html

Change-Id: Ic54236c27cf25ad8091e9e572ba1ef846f0d47c2
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reported-by: Pieter De Gendt <pieter.degendt@gmail.com>
Reviewed-on: http://openocd.zylin.com/5845
Tested-by: jenkins
Reviewed-by: Pieter De Gendt <pieter.degendt@gmail.com>
3 years agocortex_m: support control.FPCA 53/5853/3
Sylvain Chouleur [Mon, 12 Oct 2020 15:24:05 +0000 (17:24 +0200)]
cortex_m: support control.FPCA

Bit 2 of control register is used if the processor includes the FP
extension

Change-Id: Ie21bc9de8cae5bad9d841e1908eff3aa0bb29d4b
Signed-off-by: Sylvain Chouleur <schouleur@graimatterlabs.ai>
Reviewed-on: http://openocd.zylin.com/5853
Reviewed-by: Sylvain Chouleur <sylvain.chouleur@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
3 years agoriscv: fix compile error 56/5856/2
Antonio Borneo [Wed, 14 Oct 2020 08:41:12 +0000 (10:41 +0200)]
riscv: fix compile error

The commit b68674a1da72 ("Upstream tons of RISC-V changes.") was
proposed well before commit 3ac010bb9f10 ("Fix debug prints when
loading to flash"), but the merge got in different order.
After latest merge, the master branch fails to compile.

Fix the compile error.

Change-Id: Ia3bd21d970d589343a3b9b2d58c89e0c49f30015
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5856
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Jan Matyas <matyas@codasip.com>
3 years agoUpstream tons of RISC-V changes. 21/5821/11
Tim Newsome [Wed, 19 Aug 2020 20:24:56 +0000 (13:24 -0700)]
Upstream tons of RISC-V changes.

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>
3 years agoflash/nor/at91sam4: ATSAMG55x19 Rev.B 25/5825/3
Benedikt-Alexander Mokroß [Mon, 24 Aug 2020 08:59:27 +0000 (10:59 +0200)]
flash/nor/at91sam4: ATSAMG55x19 Rev.B

Add support for ATSAMG55x19 Rev.B.
Both chips have nearly the same cidr, however, Rev.B has an incremented version.

Change-Id: I5939c41fa5d54c4d3bfb850964974b878f709d13
Signed-off-by: Benedikt-Alexander Mokroß <mokross@gessler.de>
Reviewed-on: http://openocd.zylin.com/5825
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
3 years agotarget/aarch64: fix use of 'target->private_config' 47/5847/2
Antonio Borneo [Wed, 16 Sep 2020 13:26:40 +0000 (15:26 +0200)]
target/aarch64: fix use of 'target->private_config'

The function adiv5_jim_configure() casts the void pointer
'target->private_config' to a struct adiv5_private_config pointer.
This is tricky in case of aarch64, where the private data are in a
struct aarch64_private_config that has as first element the struct
adiv5_private_config.

While the current solution is working fine, it's not clean and
requires special attention for any further code development.

Override 'target->private_config' to the correct pointer while
calling adiv5_jim_configure().

Change-Id: Ic2fc047dd1e57013943d96e6d5879a919d1eb7b3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5847
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
3 years agotarget/aarch64: Use apnum setting 31/5831/4
Kevin Yang [Thu, 3 Sep 2020 03:15:31 +0000 (20:15 -0700)]
target/aarch64: Use apnum setting

Change aarch64 to use ap-num setting if provided. Fall back to original
behavior of using first AP when ap-num is invalid.

Change-Id: I0d3624f75c86ba5fd5a322ac60856dbbb6e71eaf
Signed-off-by: Kevin Yang <kangyang@google.com>
Reviewed-on: http://openocd.zylin.com/5831
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agodrivers/jlink: fix (again) calculate_swo_prescaler formula 46/5846/2
Antonio Borneo [Thu, 1 Oct 2020 12:19:16 +0000 (14:19 +0200)]
drivers/jlink: fix (again) calculate_swo_prescaler formula

The prescaler computation should round at the nearest integer
value, not to the next integer value.

Change-Id: I957e0774421211f3c4ba4b312738b1c67b87c4a2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 051e80812b1b ("drivers/jlink: fix calculate_swo_prescaler formula")
Reviewed-on: http://openocd.zylin.com/5846
Tested-by: jenkins
Reviewed-by: Adrian M Negreanu <adrian.negreanu@nxp.com>
3 years agoUpdate user dir config file search path 90/3890/6
Andreas Fritiofson [Sat, 24 Dec 2016 10:38:04 +0000 (11:38 +0100)]
Update user dir config file search path

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>
3 years agoFreeRTOS: strip duplicate line returns 43/5843/3
Karl Palsson [Thu, 24 Sep 2020 14:29:36 +0000 (14:29 +0000)]
FreeRTOS: strip duplicate line returns

Log lines already print a new line, so these superfluous \r\n result in
blank lines being printed in the log.  Remove per review comment
request.

Change-Id: I8f5b20776634cf70ce4490fc4f732c916130928a
Signed-off-by: Karl Palsson <karlp@etactica.com>
Reviewed-on: http://openocd.zylin.com/5843
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
3 years agoFreeRTOS: properly read on big endian systems. 42/5842/3
Karl Palsson [Thu, 24 Sep 2020 09:09:11 +0000 (09:09 +0000)]
FreeRTOS: properly read on big endian systems.

Remember, don't cast your pointers between types of different sizes!

While the FreeRTOS handlers attempt to account for different pointer and
list widths, the types used are always fixed, so this will _remain_
broken if/when someone targets FreeRTOS on 8/16/64 bit targets. (Note
that this patch does not _change_ that, it was fixed to 32bit before as
well)

In the meantime, this properly handles 32bit reads on a mips BE system
(ath79) as well as remaining fully functional on x86_64.

Change-Id: I677bb7130e25dccb7c1bee8fabaee27371494d00
Signed-off-by: Karl Palsson <karlp@etactica.com>
Reviewed-on: http://openocd.zylin.com/5842
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
3 years agoARM|Driver: Add DPI Driver for emulation 73/5573/7
Kevin Burke [Sat, 4 Apr 2020 00:47:50 +0000 (20:47 -0400)]
ARM|Driver: Add DPI Driver for emulation

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>
3 years agotarget/cortex_m.c: vector_catch command checks if a target is examined 13/5813/2
Daniel Trnka [Mon, 17 Aug 2020 15:51:43 +0000 (17:51 +0200)]
target/cortex_m.c: vector_catch command checks if a target is examined

If a target is not examined, command vector_catch crashes while accessing
the debug_ap NULL pointer.

maskisr and reset_config commands don't require this check.

Change-Id: I949b6f6e8b983327dd98fbe403735141f8f0b5d6
Signed-off-by: Daniel Trnka <daniel.trnka@gmail.com>
Reviewed-on: http://openocd.zylin.com/5813
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agotarget/aarch64: a64 disassembler 04/5004/5
Mete Balci [Sat, 30 Mar 2019 11:27:57 +0000 (12:27 +0100)]
target/aarch64: a64 disassembler

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
3 years agotcl: board/dp_busblaster_v4 Busblaster v4.1a by Seed Studio added 49/5549/5
Ulrich-Lorenz Schlüter [Tue, 31 Mar 2020 08:05:47 +0000 (10:05 +0200)]
tcl: board/dp_busblaster_v4 Busblaster v4.1a by Seed Studio added

Change-Id: I53141d7f6f022f9dee641858f5fb0e0b70c049f8
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Ulrich-Lorenz Schlüter <audiomobster@gmail.com>
Reviewed-on: http://openocd.zylin.com/5549
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agotcl/board: Add QuickLogic QuickFeather configuration 03/5803/4
Jan Kowalewski [Thu, 9 Jul 2020 10:34:22 +0000 (12:34 +0200)]
tcl/board: Add QuickLogic QuickFeather configuration

Add configuration for QuickLogic QuickFeather development kit.

Change-Id: I39120714bf0bcafa86e0071c38da84a7d9f12a0d
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
Reviewed-on: http://openocd.zylin.com/5803
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
3 years agotcl/target: Add QuickLogic EOS S3 MCU configuration 02/5802/3
Jan Kowalewski [Fri, 3 Jul 2020 16:19:01 +0000 (18:19 +0200)]
tcl/target: Add QuickLogic EOS S3 MCU configuration

Add configuration for QuickLogic EOS S3 MCU target.

Change-Id: I375057ff387a826e632f194843dbd92148b0c5dd
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
Reviewed-on: http://openocd.zylin.com/5802
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agodrivers/jlink: fix calculate_swo_prescaler formula 07/5807/4
Adrian Negreanu [Mon, 7 Sep 2020 19:36:10 +0000 (22:36 +0300)]
drivers/jlink: fix calculate_swo_prescaler formula

a) TPIU_ACPR is defined as:
SWO_baudrate = TRACECLKIN/(TPIU_ACPR +1)

b) TPIU_ACPR is set by armv7m_trace_tpiu_config()
target_write_u32(target, TPIU_ACPR, Prescaler-1), so
TPIU_ACPR = Prescaler-1

Replacing TPIU_ACPR in a), we get:
SWO_baudrate = TRACECLKIN/Prescaler, so

c) Prescaler = TRACECLKIN/SWO_baudrate

The Prescaler calculated by calculate_swo_prescaler() is greater by 1:
Prescaler = TRACECLKIN/SWO_baudrate + 1

The second problem is that even in situations when
an exact baudrate match is possible,
the resulting TRACECLKIN/Prescaler already has a 3% deviation.

For example, TRACECLKIN=88000000, SWO_baudrate=500000,
calculate_swo_prescaler will return Prescaler=171.
The correct value should be Prescaler=176 (TPIU_ACPR=175).

Might be related to https://sourceforge.net/p/openocd/tickets/263/

Change-Id: Ib4d6df6e34685a9be4c2995cb500b2411c76e39b
Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com>
Reviewed-on: http://openocd.zylin.com/5807
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoAdd support of STM32H72x/73x 1M (0x483) 92/5792/3
Tarek BOCHKATI [Tue, 11 Aug 2020 11:34:50 +0000 (12:34 +0100)]
Add support of STM32H72x/73x 1M (0x483)

STM32H72x/73x flash is similar to STM32H74x/75x,
except STM32H72x/73x devices have only one single flash bank.

Change-Id: I3d3422dc60234f8273172924f426200210f388cc
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/5792
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoUse capstone for ARM disassembler 12/4812/7
Marc Schink [Wed, 12 Aug 2020 11:54:10 +0000 (13:54 +0200)]
Use capstone for ARM disassembler

Change-Id: I1c9bf3f8178d4a06babe23a918e4411833ebc418
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/4812
Tested-by: jenkins
Reviewed-by: Fredrik Hederstierna <fredrik@hederstierna.com>
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agocortex_m: add detection of Cortex M35P and M55 99/5799/2
Tarek BOCHKATI [Tue, 11 Aug 2020 14:23:19 +0000 (15:23 +0100)]
cortex_m: add detection of Cortex M35P and M55

Change-Id: I52599b2b09c2dc50c95d64059213c832d380ea31
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/5799
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agocortex_m: read and display core security state 98/5798/2
Tarek BOCHKATI [Tue, 11 Aug 2020 13:06:04 +0000 (14:06 +0100)]
cortex_m: read and display core security state

Change-Id: I0fce3c66af7e98df2dc2258daf0d6af661e29ae7
Signed-off-by: Laurent LEMELE <laurent.lemele@st.com>
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/5798
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoarmv8-m: add SecureFault exception 97/5797/2
Tarek BOCHKATI [Tue, 11 Aug 2020 11:56:36 +0000 (12:56 +0100)]
armv8-m: add SecureFault exception

Change-Id: I4e1963631e834b6334bc917e956c2db4464b7b08
Signed-off-by: Laurent LEMELE <laurent.lemele@st.com>
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/5797
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoGitHub: add workflow to provide an openocd snapshot binaries for win32 94/5594/10
Tarek BOCHKATI [Tue, 2 Jun 2020 21:03:18 +0000 (22:03 +0100)]
GitHub: add workflow to provide an openocd snapshot binaries for win32

This change could be used within OpenOCD GitHub forks.

Once workflow actions are enabled in the GitHub project, this workflow
will be run automatically on each push into OpenOCD.

This workflow will provide a neutral build of openocd for win32, then
the package will be available for download in Actions section.
Note: the artifact will be deleted after 90 day (actual GitHub rules)

If the push is a tag, the generated package will be uploaded to release
pane under the corresponding release, and it will resides forever.

The built openocd enables libusb1, hidapi and libftdi adapters,
and could be extended to cover more adapters and Oses

PS: ./contrib/cross-build.sh updated to build libftdi from source like
libusb1 and hidapi.

Change-Id: I290c8aa14a12548e2dcb6a0eee456430ea44ab9f
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/5594
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agotarget: avoid checking for non NULL pointer to free it 09/5809/3
Antonio Borneo [Mon, 17 Aug 2020 07:58:58 +0000 (09:58 +0200)]
target: avoid checking for non NULL pointer to free it

The function free() can be called with a NULL pointer as argument,
no need to check the argument before. If the pointer is NULL, no
operation is performed by free().

Remove the occurrences of pattern:
if (ptr)
free(ptr);

In target/openrisc/jsp_server.c, an error is logged if the ptr was
already NULL. This cannot happen since the pointer was already
referenced few lines before and openocd would have been already
SIGSEGV in that case, so remove the log.

Change-Id: I290a32e6d4deab167676af4ddc83523c830ae49e
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5809
Tested-by: jenkins
3 years agodrivers/buspirate: remove empty lines at end of file 04/5604/2
Antonio Borneo [Fri, 24 Apr 2020 20:59:13 +0000 (22:59 +0200)]
drivers/buspirate: remove empty lines at end of file

Change split from http://openocd.zylin.com/5172/ to avoid
conflicts with other pending changes in gerrit.

Change-Id: Id3e21c92b3da7ddce7b00664280da2143c06f172
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5604
Tested-by: jenkins
3 years agojtag: avoid checking for non NULL pointer to free it 10/5810/3
Antonio Borneo [Mon, 17 Aug 2020 08:05:11 +0000 (10:05 +0200)]
jtag: avoid checking for non NULL pointer to free it

The function free() can be called with a NULL pointer as argument,
no need to check the argument before. If the pointer is NULL, no
operation is performed by free().

Remove the occurrences of pattern:
if (ptr)
free(ptr);

Change-Id: I2938e333bd1eac5218bd67aefb9d8f373da017a8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5810
Tested-by: jenkins
3 years agoopenrisc: Fix segv jsp due to free of unallocated data 93/4093/2
Stafford Horne [Tue, 4 Apr 2017 21:11:30 +0000 (06:11 +0900)]
openrisc: Fix segv jsp due to free of unallocated data

The prompt pointer in the jtag serial port is never zero'd or allocated.
Completely remove it since there is not much use for it as the target
software will provide the actual prompt.

Change-Id: Id95d8ccb9f725e53b9d03386b11d91eba1cd6ef4
Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-on: http://openocd.zylin.com/4093
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoopenocd: fix command's usage string 24/5824/2
Antonio Borneo [Sat, 22 Aug 2020 23:43:21 +0000 (01:43 +0200)]
openocd: fix command's usage string

The usage string should contain only the command parameters.
OpenOCD will automatically prepend the command name to the usage
string while dumping the usage or help message.

Remove the repeated command name from the usage string.

Change-Id: If10a0f1c254aee302b9ca08958390b7f21cdb21b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5824
Tested-by: jenkins
3 years agojtag/aice: fix command's usage string 23/5823/2
Antonio Borneo [Sat, 22 Aug 2020 23:35:09 +0000 (01:35 +0200)]
jtag/aice: fix command's usage string

The usage string should contain only the command parameters.
OpenOCD will automatically prepend the command name to the usage
string while dumping the usage or help message.

Remove the repeated command name from the usage string.

Change-Id: Idbc301b34fab19e221131d232577c1629568e6ea
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5823
Tested-by: jenkins
3 years agotarget/arc: fix command's usage string 22/5822/2
Antonio Borneo [Sat, 22 Aug 2020 23:28:38 +0000 (01:28 +0200)]
target/arc: fix command's usage string

The usage string should contain only the command parameters.
OpenOCD will automatically prepend the command name to the usage
string while dumping the usage or help message.

Remove the repeated command name from the usage string.

Change-Id: I691094a6395acb0e4ea3bea2347ff38379002464
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5822
Tested-by: jenkins
3 years agoopenocd: use proper format with uint32_t 19/5819/2
Antonio Borneo [Tue, 18 Aug 2020 16:56:53 +0000 (18:56 +0200)]
openocd: use proper format with uint32_t

Modify the format strings to properly handle uint32_t data types.

Change-Id: I4de49bf02c9e37b72240224c23fc83abe8a4fa83
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5819
Tested-by: jenkins
3 years agotarget: use proper format with uint32_t 18/5818/2
Antonio Borneo [Tue, 18 Aug 2020 16:56:27 +0000 (18:56 +0200)]
target: use proper format with uint32_t

Modify the format strings to properly handle uint32_t data types.

While there, fix prototype mismatch between header and C file of
the function armv7a_l1_d_cache_inval_virt().

Change-Id: I434bd241fa5c38e0c15d22cda2295097050067f5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5818
Tested-by: jenkins
3 years agoflash: use proper format with uint32_t 16/5816/2
Antonio Borneo [Tue, 18 Aug 2020 16:56:03 +0000 (18:56 +0200)]
flash: use proper format with uint32_t

Modify the format strings to properly handle uint32_t data types.

Change the type of variable retval in 'nor/ambiqmicro.c' to match
both the value to carry and the returned type of the function.

Fix the prototype mismatch of function lpc2900_address2sector()
between the header and the C file.

Change-Id: I68ffba9bd83eec8132f83bff3af993861fd09d84
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5816
Tested-by: jenkins
3 years agojtag: use proper format with uint32_t 15/5815/2
Antonio Borneo [Tue, 18 Aug 2020 16:55:25 +0000 (18:55 +0200)]
jtag: use proper format with uint32_t

Modify the format strings to properly handle uint32_t data types.

Change the prototype of detect_swo_freq_and_prescaler() in
'jlink.c' to avoid an implicit cast in the caller function.

Change the type of the variable retlen in some functions in
'usb_blaster.c' to properly pass their pointer to the local read
and write functions.

Use the proper parser COMMAND_PARSE_NUMBER(u32, ...).

Change-Id: I5227dbce04ee59881f173724db90790b7b9cc7af
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5815
Tested-by: jenkins
3 years agojtag/aice: avoid abusing of int32_t type 14/5814/2
Antonio Borneo [Tue, 18 Aug 2020 16:31:53 +0000 (18:31 +0200)]
jtag/aice: avoid abusing of int32_t type

In several cases the 'int' status value returned by libusb and by
aice internal functions is taken in a variable of type 'int32_t',
requiring an implicit (but trivial) cast.
This makes compulsory using 'PRId32' in the format strings that
print such 'int32_t' result and requires an additional implicit
conversion to return the 'int32_t' as 'int'.

Replace to type 'int' all the occurrences of 'int32_t result' and
fix accordingly the format strings.

Plus, all the size of aice commands are stored as int32_t const
variables with uppercase name, violating the coding style, and are
then passed as 'int' parameter to the read/write functions.

Replace the variables with C macros carrying an 'int' value.

While there, replace also a 'uint32_t' loop index with 'unsigned'
and fix the format string in the loop.

Change-Id: Ic57d58770f1af95f003b5a02fbcb7c926ec06fd1
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5814
Tested-by: jenkins
3 years agoopenocd: avoid checking for non NULL pointer to free it 08/5808/5
Antonio Borneo [Sun, 16 Aug 2020 19:35:10 +0000 (21:35 +0200)]
openocd: avoid checking for non NULL pointer to free it

The function free() can be called with a NULL pointer as argument,
no need to check the argument before. If the pointer is NULL, no
operation is performed by free().

Remove the occurrences of pattern:
if (ptr)
free(ptr);

While there replace a sequence malloc(size)+memset(,0,size) with a
calloc(1,size).
Replace a pointer assignment to '0' with an assignment to NULL.
In server/*, an error is logged if the ptr was already NULL. This
cannot happen since the pointer was already referenced few lines
before and openocd would have been already SIGSEGV in that case,
so remove the log.

Change-Id: I10822029fe8390b59edff4070575bf7f754e44ac
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5808
Reviewed-by: Adrian M Negreanu <adrian.negreanu@nxp.com>
Tested-by: jenkins
3 years agoflash: avoid checking for non NULL pointer to free it 11/5811/4
Antonio Borneo [Mon, 17 Aug 2020 08:08:35 +0000 (10:08 +0200)]
flash: avoid checking for non NULL pointer to free it

The function free() can be called with a NULL pointer as argument,
no need to check the argument before. If the pointer is NULL, no
operation is performed by free().

Remove the occurrences of pattern:
if (ptr)
free(ptr);

There are cases where the pointer is set to NULL after free(), but
then re-assigned within few lines. Drop the setting to NULL when
this is evident. Anyway, the compiler will remove the useless
assignment so no reason to be too much aggressive in this change.

Change-Id: I55b2ce7cbe201410016398933e34d33a4b66e30b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5811
Tested-by: jenkins
3 years agoadi_v5: use macro DP_APSEL_MAX to allocate struct adiv5_ap 06/5806/2
Antonio Borneo [Fri, 14 Aug 2020 08:54:32 +0000 (10:54 +0200)]
adi_v5: use macro DP_APSEL_MAX to allocate struct adiv5_ap

Commit 11019a824d02 ("adi_v5: enforce check on AP number value")
introduces the macro DP_APSEL_MAX and use it in place of hardcoded
magic numbers for the upper limit of AP selection value.

Use the macro also while defining the array of struct adiv5_ap in
struct adiv5_dap.

Change-Id: I88f53ceb710f92a48a8026a365709fbf2d9e6912
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5806
Tested-by: jenkins
3 years agohelper: fix minor typos 01/5801/2
Antonio Borneo [Sat, 11 Jul 2020 22:57:34 +0000 (00:57 +0200)]
helper: fix minor typos

Change-Id: I785e388148c0329e51cb0b39ab30e8ee44f5a7cd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5801
Tested-by: jenkins
3 years agohla_transport: split command registration per transport 77/4877/3
Antonio Borneo [Sun, 27 Jan 2019 14:49:34 +0000 (15:49 +0100)]
hla_transport: split command registration per transport

All the HLA transports (hla_swd and hla_jtag) register the same
set of commands. Such commands are mainly aimed at handling JTAG
compatibility that is required for the transport hla_jtag only.

Split per transport the command registration and limit the
commands to only those required by the transport itself.
Replace the command "hla newtap" with the transport specific
"swd newdap" or "jtag newtap".
Deprecate the command "hla".

Change-Id: I79c78fa97b707482608516d3824151a4d07644c0
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4877
Tested-by: jenkins
3 years agotcl/target: use command 'jtag newtap' to add a boundary scan TAP 73/4873/5
Antonio Borneo [Sat, 26 Jan 2019 15:19:55 +0000 (16:19 +0100)]
tcl/target: use command 'jtag newtap' to add a boundary scan TAP

A JTAG TAP for boundary scan should be added in the scan chain
through the command "jtag newtap".
In some TCL target script the boundary scan TAP is added through
the command "swj_newdap", command that is inappropriate in this
context because specific for arm adi-v5 SWJ-DP.
This situation was probably created to bypass the error with HLA
framework, caused by missing command "jtag newtap".

Add the command "jtag newtap" in HLA, by reusing the existing
code for command "hla newtap".
Fix the TCL target scripts to use the command "jtag newtap" for
the boundary scan TAPs.

The TCL script target/psoc6.cfg has no evident reference to HLA,
so the reason for using "swj_newdap" is less clear. Nevertheless
it uses the wrong command and, once HLA is fixed, there is no
reason to avoid fixing it too.

Change-Id: Ia92f8221430cf6f3d2c34294e22e5e18963bb88c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4873
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
3 years agotcl/board/st_nucleo_l1.cfg use dualbank configuration 29/5829/2
Alexandre Bourdiol [Tue, 1 Sep 2020 14:50:08 +0000 (16:50 +0200)]
tcl/board/st_nucleo_l1.cfg use dualbank configuration

st_nucleo_l1.cfg is based on STM32L152RET6 which support
dualbank flash.

Change-Id: I7ecdb7b7557229465e23eed667f20cd84197dfc7
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
Reviewed-on: http://openocd.zylin.com/5829
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoFix debug prints when loading to flash 00/5800/4
Samuel Obuch [Tue, 11 Aug 2020 15:37:01 +0000 (17:37 +0200)]
Fix debug prints when loading to flash

While loading to flash with debug level at least 3,
OpenOCD tries to print the whole loaded bitstream.
This will be very-very-slow due to implementation of
conversion from buffer to string.

* fix condition on selected debug level in jtag/core.c
* replace slow buf_to_str function from helper/binarybuffer.c
  with faster but_to_hex_str function

Change-Id: I3dc01d5846941ca80736f2ed12e3a54114d2b6dd
Signed-off-by: Samuel Obuch <sobuch@codasip.com>
Reviewed-on: http://openocd.zylin.com/5800
Tested-by: jenkins
Reviewed-by: Jan Matyas <matyas@codasip.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agotcl/interface/ftdi: fix comment in minimodule-swd.cfg 04/5804/2
Jan Kowalewski [Fri, 14 Aug 2020 10:21:54 +0000 (12:21 +0200)]
tcl/interface/ftdi: fix comment in minimodule-swd.cfg

Change-Id: I160faca11f231e3e839046ae2045e37e350ca613
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
Reviewed-on: http://openocd.zylin.com/5804
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoRefer to cross-build script in README 11/5711/2
Andreas Fritiofson [Tue, 2 Jun 2020 17:37:49 +0000 (19:37 +0200)]
Refer to cross-build script in README

Change-Id: Ic983d2505e40891ba0d0eea3468a71a7741f5c3a
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/5711
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
3 years agolog: handle LOG_*() before calling to log_init() 02/5602/2
Antonio Borneo [Thu, 23 Apr 2020 22:28:49 +0000 (00:28 +0200)]
log: handle LOG_*() before calling to log_init()

There are cases where LOG_*() functions are called before the logs
are initialized with log_init().
E.g. in transport_register() that is executed in gcc constructors,
thus called even before main().
With debug_level set to LOG_LVL_USER=-1 all the LOG_ERROR() get
dropped.
Properly initializing debug_level cause segmentation fault due to
log_output still not initialized.

Initialize debug_level to LOG_LVL_INFO so errors get printed.
Handle separately the case of log_output still NULL, meaning that
log_init() is not called yet.

Change-Id: I2ea32c87a4955fb44e79b38131c456e25dfbc327
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5602
Tested-by: jenkins
3 years agoserver/gdb_server: fix incorrect condition check 94/5794/2
Christopher Head [Mon, 10 Aug 2020 18:09:02 +0000 (11:09 -0700)]
server/gdb_server: fix incorrect condition check

The warning message should be printed if the target is NOT halted, not
if it IS halted.

Change-Id: I0a38292a8a2e20e4a4a5ada92b475d551d4cbf38
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/5794
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agotcl: Add support for NDS V5 target and xc7/Corvette-F1 38/5338/5
Hellosun Wu [Tue, 29 Oct 2019 05:36:31 +0000 (13:36 +0800)]
tcl: Add support for NDS V5 target and xc7/Corvette-F1

The "Corvette-F1" is an Arduino-compatible evaluation platform,
which fully supports AndesCore. The board has FTDI FT2232 to
connected to FPGA's JTAG interface.

The "ADP-XC7KFF676" is a development and prototyping board that
provides capacity for evaluation of AndesCore processors.
It works with AICE in-circuit debugging tools.

This patch also include target/nds32v5.cfg to support AndesCore
N22/N25F and AndeShape Platform AE250.

Change-Id: I144d5063d5086d00ec44634a5028b5ea5d2eba33
Signed-off-by: Hellosun Wu <wujiheng.tw@gmail.com>
Reviewed-on: http://openocd.zylin.com/5338
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agosrc/flash/nor/virtual: handle null pointers 82/5782/5
Christopher Head [Fri, 17 Jul 2020 21:44:35 +0000 (14:44 -0700)]
src/flash/nor/virtual: handle null pointers

Either of protect and protect_check driver callbacks can be NULL. In
virtual_protect, reuse flash_driver_protect which checks for that case
and generates a nice error message and return code. In
virtual_protect_check, there is no corresponding flash_driver_*
function, so add the NULL check directly.

Change-Id: Ia63d85ede640a8382cf5cad0760f5d1ffe4d7cfe
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/5782
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
3 years agoflash/nor/stm32f2x: clean up data types 78/5778/3
Christopher Head [Fri, 17 Jul 2020 18:17:52 +0000 (11:17 -0700)]
flash/nor/stm32f2x: clean up data types

Change-Id: I677bc4487fc2eff2c32e14ca2db5470fddaa63b5
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/5778
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
3 years agosrc/flash/nor/stm32h7x: fix format strings 83/5783/2
Christopher Head [Fri, 17 Jul 2020 21:54:46 +0000 (14:54 -0700)]
src/flash/nor/stm32h7x: fix format strings

* use proper type codes
* add 0x in front of hex values
* remove some concatenated empty strings

Change-Id: I06a8344d0ed62de7a0f3e2dd8fba69b17eeb3626
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/5783
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
3 years agotarget: fix memory leaks on target_create() fail 76/5776/2
Antonio Borneo [Sat, 11 Jul 2020 14:37:28 +0000 (16:37 +0200)]
target: fix memory leaks on target_create() fail

There are failure cases of target_create() that are not checked.
Plus, in case of failure the memory allocated in not properly
released before returning error.

Check all the possible failure in target_create().
Change current_target only when target is successfully created.
Add the new target to all_targets list only when target is
successfully created.
Release all the allocated memory before quit on failure.
Use malloc() instead of calloc() for target->type, because the
struct will be fully populated with memcpy().

Change-Id: Ib6f91cbb50c28878e7c73dc070b17b8d7d4e902f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5776
Tested-by: jenkins
3 years agogdb_server: refuse gdb connection if target is not examined 01/5201/3
Antonio Borneo [Tue, 4 Jun 2019 10:06:44 +0000 (12:06 +0200)]
gdb_server: refuse gdb connection if target is not examined

If the target is not examined, many internal data required for the
gdb connections are not ready nor allocated. This causes OpenOCD
to hit a segmentation fault.

After the execution of the gdb-attach event handler, check if
target has been examined and eventually return error to refuse the
gdb connection.

Plus, since OpenOCD does not implements non-stop mode yet, gdb
expects the target to be halted by the inferior when the
connection is established.
Print a warning to inform the user in case the target is not
halted, but still accept the gdb connection to permit the
non-intrusive memory inspection with gdb, as explained in
http://openocd.org/doc/html/GDB-and-OpenOCD.html#gdbmeminspect

Change-Id: If727d68f683c3a94e4826e8c62977de41274ceff
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5201
Tested-by: jenkins
3 years agotarget: fix registers reading from non examined target 27/5727/4
Mikhail Rasputin [Sat, 27 Jun 2020 20:30:42 +0000 (23:30 +0300)]
target: fix registers reading from non examined target

If a target is not examined when the debugger tries to connect to it
then it can lead to undesired/undefined behavior.

In particular it leads to a zero pointer dereference on the aarch64.

Change-Id: I67f2b714ab8b2727fd36f3de16d7f9017b4c55fe
Signed-off-by: Mikhail Rasputin <mikhail.godlike.rasputin@yandex.ru>
Reviewed-on: http://openocd.zylin.com/5727
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agoFix 2 warnings about obsolete Autoconf macros. 38/5638/2
R. Diez [Thu, 30 Apr 2020 14:28:28 +0000 (16:28 +0200)]
Fix 2 warnings about obsolete Autoconf macros.

Those changes were automatically suggested by tool "autoupdate".

Change-Id: Id70bdeacc3c80816f3f5c65d1abceabb5cdf3873
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: http://openocd.zylin.com/5638
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agotcl/interface: snps_sdp: fix minor typo s/similiar/similar/ 88/5788/2
Antonio Borneo [Sun, 26 Jul 2020 22:29:50 +0000 (00:29 +0200)]
tcl/interface: snps_sdp: fix minor typo s/similiar/similar/

Change-Id: I4fd6af560278b3e114cc5d8ee1b49b5c4521d8be
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: b2821b607460 ("Introduce tcl config files for Synopsys HSDK board")
Reviewed-on: http://openocd.zylin.com/5788
Tested-by: jenkins
Reviewed-by: Evgeniy Didin <didin@synopsys.com>
3 years agotcl/target/armada370: remove useless 'init' command 86/5786/2
Antonio Borneo [Wed, 22 Jul 2020 10:10:26 +0000 (12:10 +0200)]
tcl/target/armada370: remove useless 'init' command

As the comment states, the 'init' command is issued before the
command 'dap apsel', otherwise it fails.
This dependency has been already fixed in commit e48690cb26e4
("target/arm_adi_v5: allow commands apsel and apcsw during init
phase"), so the command 'dap apsel' can now be issued directly.

Remove both the unneeded 'init' command and the comment that
documents and justify its presence.

Change-Id: I50f0a820fa7ead6f5a3bd9cc5180d521070822c9
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5786
Tested-by: jenkins
3 years agotarget/arm11: fix memory leaks, including register cache 94/5694/4
Antonio Borneo [Mon, 25 May 2020 10:04:17 +0000 (12:04 +0200)]
target/arm11: fix memory leaks, including register cache

There is no deinit_target method, so few memory allocations leak
at openocd exit.
Issue identified by tracking all calls to arm_dpm_setup().

Implement the method arm11_dpm_deinit() to free all the memory
allocated in arm11_dpm_init() and call it in the new
arm11_deinit_target().

NOT TESTED on real HW.

Change-Id: Icab86e290fc2db14f70eb84c8286357aadb02a35
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5694
Tested-by: jenkins
3 years agotarget: use one second timeout while halting target at gdb attach 87/5687/2
Antonio Borneo [Tue, 19 May 2020 14:41:17 +0000 (16:41 +0200)]
target: use one second timeout while halting target at gdb attach

By default GDB timeouts after 2 seconds, even if this value can be
modified with GDB command "set remotetimeout".
On OpenOCD side, the default event for GDB attach is to halt the
target and wait it to halt. But here the default timeout of the
halt command is 5 seconds!
If the target cannot be halted (e.g. it's kept in reset by another
core or the debugger doesn't have enough privileges) then GDB will
timeout while OpenOCD is still waiting and is unable to
communicate with GDB.

Decrease the halt timeout to 1 second in the default GDB attach
event handler.

Change-Id: I231c740816bb6a0d74b0bc679a368a6cbfb34824
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5687
Tested-by: jenkins
3 years agonulink: add minimal support for Nu-Link2 20/5720/4
Antonio Borneo [Thu, 11 Jun 2020 21:55:18 +0000 (23:55 +0200)]
nulink: add minimal support for Nu-Link2

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>
3 years agonor/spi.c: add N25Q032A flash chip 87/5787/2
Michael Betz [Sun, 26 Jul 2020 20:51:06 +0000 (13:51 -0700)]
nor/spi.c: add N25Q032A flash chip

this flash is used on the Digilent CMODA7 FPGA board

Change-Id: I6749ca3fbebf2e384051a26a3fd253da5d6e25fb
Signed-off-by: Michael Betz <michibetz@gmail.com>
Reviewed-on: http://openocd.zylin.com/5787
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
3 years agojtag/drivers: add support for Nu-Link (Nuvoton ICE) over usb 35/5635/10
Zale Yu [Wed, 29 Apr 2020 14:53:52 +0000 (16:53 +0200)]
jtag/drivers: add support for Nu-Link (Nuvoton ICE) over usb

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>
3 years agoMake autotools warnings visible. 39/5639/3
R. Diez [Thu, 30 Apr 2020 14:31:26 +0000 (16:31 +0200)]
Make autotools warnings visible.

Change-Id: Ibcdac7100faca7a66d9b3440431e74a8a8c5f042
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: http://openocd.zylin.com/5639
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
3 years agocmsis_dap_usb: Support for Microchip's nEDBG CMSIS-DAP interface 56/5756/2
Michal Potrzebicz [Fri, 10 Jul 2020 21:13:15 +0000 (22:13 +0100)]
cmsis_dap_usb: Support for Microchip's nEDBG CMSIS-DAP interface

This commit fixes support for the nEDBG CMSIS-DAP interface
which is used ie. on the Curiosity Nano SAMD21 board.
nEDBG, similarily to mEDBG, does not support 512 byte HID packets.
This patch adds its USB PID to the exclusion list to make sure that
we stick with the default 64 bytes.

Change-Id: I9010b0cf77c0b1347269a759b5d16ee5155abb16
Signed-off-by: Michal Potrzebicz <michal@elevendroids.com>
Reviewed-on: http://openocd.zylin.com/5756
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
3 years agotarget: fix minor typos and duplicated words 66/5766/3
Antonio Borneo [Sun, 12 Jul 2020 18:25:00 +0000 (20:25 +0200)]
target: fix minor typos and duplicated words

Change-Id: I8deb0017dc66a243e3dd51e285aa086db500decd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5766
Tested-by: jenkins
3 years agodrivers/bitbang: blink LED on SWD 71/5771/2
Antonio Borneo [Sat, 4 Apr 2020 17:47:09 +0000 (19:47 +0200)]
drivers/bitbang: blink LED on SWD

The blinking was implemented for JTAG only.

Extend it to SWD.
There is no error check on SWD exchange. Add a FIXME for further
fix.

Change-Id: I42a6708c54b1eefaf691e0fe09ca58c42b2764fd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5771
Tested-by: jenkins
3 years agodrivers/linuxgpiod: add led 70/5770/2
Antonio Borneo [Sat, 4 Apr 2020 17:46:38 +0000 (19:46 +0200)]
drivers/linuxgpiod: add led

Bitbang interface allows having a LED on one of the GPIO.

Let also linuxgpiod driver to specify and use the LED connection.

Change-Id: Id3d8772ee1808b92354fd073ba3947bacd8253ef
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5770
Tested-by: jenkins
3 years agosvf: fix minor typos 61/5761/2
Antonio Borneo [Sat, 11 Jul 2020 22:38:12 +0000 (00:38 +0200)]
svf: fix minor typos

Change-Id: I40ac2d01c1feb2771ce96a26c4a4d05a1e816a61
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5761
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
3 years agoflash: fix minor typo s/fifo's/fifos/ 69/5769/3
Antonio Borneo [Sun, 12 Jul 2020 22:37:17 +0000 (00:37 +0200)]
flash: fix minor typo s/fifo's/fifos/

Change-Id: I21feee50377b13cd0d48749c19abb12d499fe199
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5769
Tested-by: jenkins
3 years agocontrib: fix minor typos 68/5768/3
Antonio Borneo [Sun, 12 Jul 2020 22:32:49 +0000 (00:32 +0200)]
contrib: fix minor typos

While there, replace s/return(0)/return 0/ that causes checkpatch
to fail.

Change-Id: I5ad54cffca629475563c471114a9f77301a9e4f8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5768
Tested-by: jenkins
3 years agojtag: fix minor typos 67/5767/2
Antonio Borneo [Sun, 12 Jul 2020 21:40:41 +0000 (23:40 +0200)]
jtag: fix minor typos

Change-Id: I3a3370db438f8fd045fb22e7c9fff4e83794a3b7
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5767
Tested-by: jenkins
3 years agoxsvf: fix minor typos 65/5765/2
Antonio Borneo [Sat, 11 Jul 2020 22:45:23 +0000 (00:45 +0200)]
xsvf: fix minor typos

Change-Id: Ib36b2178eacf79dd26ebd2e15ba385853825c198
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5765
Tested-by: jenkins
3 years agotransport: fix minor typos 64/5764/2
Antonio Borneo [Sat, 11 Jul 2020 22:42:08 +0000 (00:42 +0200)]
transport: fix minor typos

Change-Id: I481d69f9953e04c881124b2da4d092213591e4ae
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5764
Tested-by: jenkins
3 years agoserver: fix minor typos 60/5760/3
Antonio Borneo [Sat, 11 Jul 2020 22:33:29 +0000 (00:33 +0200)]
server: fix minor typos

Change-Id: Ibf835dc174a1a160ec0d57000a113c35f2713045
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5760
Tested-by: jenkins
3 years agortos: fix minor typos 59/5759/3
Antonio Borneo [Sat, 11 Jul 2020 22:25:53 +0000 (00:25 +0200)]
rtos: fix minor typos

Change-Id: I9ed4e2150a0a057397538b608d4a72bc48d0d64f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5759
Tested-by: jenkins
3 years agoflash: fix typos and duplicated words 58/5758/2
Antonio Borneo [Sat, 11 Jul 2020 22:00:47 +0000 (00:00 +0200)]
flash: fix typos and duplicated words

Fix typos and duplicated words in comments and strings.

Change-Id: I64282c7018462deefeeb8e5f4d0d81942425b3fc
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5758
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Christopher Head <chead@zaber.com>
3 years agotarget/arm720t: fix memory leak of register cache 97/5697/4
Antonio Borneo [Mon, 25 May 2020 09:19:07 +0000 (11:19 +0200)]
target/arm720t: fix memory leak of register cache

There is no method to free the register cache, allocated in
arm720t_init_target().
Issue identified by tracking all calls to arm7tdmi_init_target().

Implement the method arm720t_deinit_target() by calling directly
arm7tdmi_deinit_target().

NOT TESTED on a real arm720t target.
Tested on a arm926ejs (SPEAr320) by hacking the target type and
pretending it is a xscale:
sed -i s/arm926ejs/arm720t/ tcl/target/spear3xx.cfg

Change-Id: I53c1f46c1a355a710e8df01468b19220671569dc
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5697
Tested-by: jenkins
3 years agotarget/arm7tdmi: fix memory leak of register cache 96/5696/4
Antonio Borneo [Mon, 25 May 2020 08:58:40 +0000 (10:58 +0200)]
target/arm7tdmi: fix memory leak of register cache

There is no method to free the register cache, allocated in
arm7tdmi_init_target(), so we get a memory leak.
Issue identified by tracking all calls to arm_build_reg_cache().

Implement the method arm7tdmi_deinit_target() that in turn calls
arm7tdmi_free_reg_cache().

NOT TESTED on a real arm7tdmi target.
Tested on a arm926ejs (SPEAr320) by hacking the target type and
pretending it is a arm7tdmi:
sed -i s/arm926ejs/arm7tdmi/ tcl/target/spear3xx.cfg

Change-Id: Iad465b708eb4ebb298725d7155fea76357e9045c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5696
Tested-by: jenkins
3 years agotarget/xscale: fix memory leak of register cache 95/5695/4
Antonio Borneo [Mon, 25 May 2020 08:43:53 +0000 (10:43 +0200)]
target/xscale: fix memory leak of register cache

There is no method to free the register cache, allocated in
xscale_build_reg_cache(), so we get a memory leak.
Issue identified by tracking all calls to arm_build_reg_cache().

Implement the method xscale_deinit_target() that in turn calls the
new xscale_free_reg_cache().
Fix leak of struct xscale.

NOT TESTED on a real xscale target.
Tested on a arm926ejs (SPEAr320) by hacking the target type and
pretending it is a xscale:
sed -i s/arm926ejs/xscale/ tcl/target/spear3xx.cfg

Change-Id: Ibb2104c42411b76f4bb77c2fa387d1b85a3d2d5d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5695
Tested-by: jenkins
3 years agotarget: fix memory leaks on targets based on arm9tdmi 99/5699/5
Antonio Borneo [Mon, 25 May 2020 09:28:22 +0000 (11:28 +0200)]
target: fix memory leaks on targets based on arm9tdmi

Similarly to the fix for arm926ejs (also base on arm9tdmi), fix
the other targets based on arm9tdmi.
The fix for arm926ejs is tested on SPEAr320 target.

This fix is proposed separately because is not tested on a correct
target device, but tested on SPEAr320 by hacking the target type
and pretending it is the correct one, e.g.:
sed -i s/arm926ejs/arm920t/ tcl/target/spear3xx.cfg

The memory leaks detected and fixed are:
- arm register cache;
- EmbeddedICE register cache;
- arm_jtag_reset_callback internal data;
- struct <target_type>_common.

Change-Id: I565f9a5bf144a9df78474434d86a64127ef0fbe5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5699
Tested-by: jenkins
3 years agortos: add support for RIOT 56/4256/10
Daniel Krebs [Mon, 5 Oct 2015 13:37:57 +0000 (15:37 +0200)]
rtos: add support for RIOT

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>
3 years agotcl/target: Add initial GigaDevice GD32VF103 support 55/5755/3
Marc Schink [Wed, 8 Jul 2020 13:36:29 +0000 (15:36 +0200)]
tcl/target: Add initial GigaDevice GD32VF103 support

There is no flash bank support at the moment.

Change-Id: I52a2bde39425d94d9333cda002e5df0a1ef63c08
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/5755
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agolibjaylink: Update to 0.2.0 release 57/5757/2
Marc Schink [Sat, 11 Jul 2020 14:50:19 +0000 (16:50 +0200)]
libjaylink: Update to 0.2.0 release

Change-Id: Ib53a98d0c715f91bdced1df6f157d2a50326fa8c
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/5757
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 years agotcl/target: add Rockchip RK3308 target 74/5774/6
Jiri Kastner [Wed, 15 Jul 2020 09:31:51 +0000 (11:31 +0200)]
tcl/target: add Rockchip RK3308 target

Change-Id: Ia8c2cec0761c37623fa8a416bcfc405f2af6a6b3
Signed-off-by: Jiri Kastner <cz172638@gmail.com>
Reviewed-on: http://openocd.zylin.com/5774
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
3 years agosrc/target/arm_adi_v5.c: add Cortex-A35 related entries 73/5773/6
Jiri Kastner [Wed, 15 Jul 2020 09:30:34 +0000 (11:30 +0200)]
src/target/arm_adi_v5.c: add Cortex-A35 related entries

ROM Table registers:
https://developer.arm.com/documentation/100236/0100/debug/rom-table/rom-table-peripheral-identification-registers
Debug reisters:
https://developer.arm.com/documentation/100236/0100/debug/memory-mapped-debug-registers/external-debug-peripheral-identification-registers
PMU registers:
https://developer.arm.com/documentation/100236/0100/debug/pmu-registers/performance-monitors-peripheral-identification-registers
CTI registers:
https://developer.arm.com/documentation/100236/0100/debug/cti-registers/cti-peripheral-identification-registers

Change-Id: Ibd57d91fb9b66bc46929f4e93d0bf23c2a32f11a
Signed-off-by: Jiri Kastner <cz172638@gmail.com>
Reviewed-on: http://openocd.zylin.com/5773
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)