Commit Graph

226 Commits

Author SHA1 Message Date
Alexandre Bailon 1aa759dbb9 flash/nor: Update cc26xx flash driver to support cc13x2x7
This updates the flash driver to support more than one bank.
This is required to support the cc1352p7 which has two banks.

This only have been tested on a cc1352p7.
The loader has been built using a gcc-arm-none-eabi-4_8-2014q3
toolchain.

Change-Id: Ia813421ececd96d6e2fd4dae910ad60fcc3d3c88
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8192
Tested-by: jenkins
Reviewed-by: Vaishnav M A <vaishnav@beagleboard.org>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-09-15 09:08:58 +00:00
Jonathan Forrest 2992ec9095 jtag/drivers/mpsse: Added FT4232HA
Added FT4232HA varianet of FTDI's FT4232H which has a different bcd.
Also added default PID/VID for the FT4243HA to contrib/60-openocd.rules.
And added default PID/VIDs for FTDI's HP ICs to contrib/60-openocd.rules
as this wasn't done previously.

BugLink: https://sourceforge.net/p/openocd/tickets/410/

Change-Id: Ia84b566aa004332d3f7815a3d22ac37eee4f522a
Signed-off-by: Jonathan Forrest <jonyscathe@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8225
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-07-13 22:23:46 +00:00
Marc Schink c7c4d4d48c contrib: Drop 'coresight-trace.txt'
This document is outdated and has broken text formatting. It also
provides no useful information to users nor developers, at worst it
causes confusion. For that reason, drop this file.

Change-Id: Id5ee1f6e74d1a641c60d897f114bb97f5fd48e5b
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8292
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-06-08 08:42:04 +00:00
Antonio Borneo d7ee0e422e contrib/rtos-helpers/uCOS-III-openocd: change license to Apache-2.0
This file is intended to be included in any user's project that
plans to use OpenOCD awareness for uCOS-III.
It is supposed to be distributed under a license compatible with
the uCOS-III code, that is Apache-2.0 license.

Distribute it under Apache License 2.0.

Change-Id: I51ecd469c8ccdd23a069d21e89b7d90886691395
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7996
Tested-by: jenkins
2024-01-21 21:27:11 +00:00
Ahmed BOUDJELIDA b9f5262d42 contrib/firmware: Change USB interruption handling for JTAG/I2C communications
Before this change, when we send an I2C Bulk data at the same
time while Jtag bitbanging functions execute, the microcontroller
puts JTAG bitbanging on wait and executes all I2C bitbanging
function, which causes problems like loss of Ack in DAP responses
and other errors.

With this commit, When I2C interruption occurs, it sets a variable
to true and continues JTAG bitbanging, when it finish it executes
the I2C bitbang.

Change-Id: Ia80bac21f8a259f4a1176b5346bf74ed0aa6e38b
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8074
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-01-13 14:48:56 +00:00
Ahmed BOUDJELIDA b50a8dbe41 jtag/drivers: Add GPIO extender configuration function to ANGIE driver
Add GPIO extender initial configuration that is needed to configure
some important GPIOs and ensure that the dev board is ready to work.

Add i2c_write function that make a write transfer to any slave device.

Give a new Product ID to ANGIE to make it different than the non
programmed ANGIE.

Change-Id: I0a8dacb7fe218145b7d3ed1cb75f106ed6256714
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8072
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-01-13 14:48:29 +00:00
Ahmed BOUDJELIDA 868700e720 jtag/drivers: give ANGIE a new PID after renumeration
Give ANGIE a new PID after renumeration to be able to distinguish
the two cases (programmed and not programmed)

Change-Id: I30a91d8ed2e8e261221488b98d40a027ca41da52
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7991
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-01-13 14:48:08 +00:00
Ahmed BOUDJELIDA c7073853eb contrib/firmware: Add direction control for 'SCL' i2c signal
We want to keep the tri-state buffers located between the FPGA
and the board, in 'Z' state until we launch an i2c connection.

We launch an i2c start condition, make the SCL
direction 'OUT' to start the i2c protocol and at the end
of the i2c connection at the stop condition, we re-make
the tri-state buffers at 'Z' state.

Change-Id: Ic597a70d0427832547f6b539864c24ce20a18c64
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7989
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-01-13 14:47:31 +00:00
Ahmed BOUDJELIDA fce7aa754f contrib/firmware: update gpif FSM configuration file
Change the GPIF state machine, configuring only one of the 4 waveforms
to generate the clock signal (CCLK) used to program the FPGA, and send
one byte every cycle using an 8-bit bus.

Change-Id: I43cf5480b9d5c40cc2f6a62a52ecfe078b76458e
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7976
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2024-01-13 14:46:42 +00:00
Erhan Kurubas 4003762177 target/espressif: add algorithm support to xtensa chips
Also includes esp_xtensa flasher stub jumper binary.

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I054ce31033ca6a87afe9b5325b545338a7d8fe8f
Reviewed-on: https://review.openocd.org/c/openocd/+/7772
Tested-by: jenkins
Reviewed-by: Ian Thompson <ianst@cadence.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-12-10 13:31:57 +00:00
Manuel Wick 0f70c6c325 remote_bitbang: Add SWD support
This adds new command characters to make SWD work with the new split
jtag and swd operations of bitbang.

The command characters are as follows:
    O - SWDIO drive 1
    o - SWDIO drive 0
    c - SWDIO read request
    d - SWD write 0 0
    e - SWD write 0 1
    f - SWD write 1 0
    g - SWD write 1 1

Documentation has been updated accordingly. The new commands will be
used by an adapted version of the jtag-openocd applet of the "Glasgow
Debug Tool" (https://github.com/glasgowEmbedded/Glasgow). It has been
tested against an stm32f103 and an at91samd21 target.

contrib/remote/bitbang/remote_bitbang_sysfsgpio.c has also been adapted
to support SWD via the new command set. Some limited testing has been
done using a Raspberry Pi 2 with an stm32f103 and an at91samd21 target
attached.

Change-Id: I8e998a2cb36905142cb16e534483094cd99e8fa7
Signed-off-by: Manuel Wick <manuel@matronix.de>
Signed-off-by: David Ryskalczyk <david.rysk@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6044
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-12-03 06:22:54 +00:00
Ahmed BOUDJELIDA bb27677219 contrib/firmware: add 'send not acknowledged' function to the i2c bit-banging implementation
Change-Id: I60597ebc126da4acb00654513b96f52261253e12
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7811
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-11-18 11:24:40 +00:00
Ahmed BOUDJELIDA a69a4e23f4 contrib/firmware: extend the number of bytes to be sent in the i2c bit-banging read operation
Change-Id: Iaeb3d5ba37da1bd77d36ad0ebbc6b45c46860dec
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7810
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-11-18 11:24:02 +00:00
Ahmed BOUDJELIDA 8bf7f603ae contrib/firmware: remove unnecessary delay commands in the i2c bit-banging implementation
Change-Id: I741244be7a1bf186cfcb66a5b93e2a1a2ab0fde5
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7809
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-11-18 11:23:36 +00:00
Antonio Borneo 9fcf33da8e contrib/rtos-helpers/FreeRTOS-openocd: change license to CC0-1.0
This file is intended to be included in any user's project that
plans to use OpenOCD awareness for FreeRTOS.
It is supposed to be distributed under a permissive license to not
impact the original license of the user's project.

Distribute it under Creative Commons Zero v1.0 Universal license.

Change-Id: I7ac90e8b742517bcafc08c00662625671c8159c4
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7995
Reviewed-by: Karl Palsson <karlp@tweak.au>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: jenkins
2023-11-11 18:48:41 +00:00
Luca Hung 62f76b2169 flash/nor: add support for Nuvoton NPCX4/K3 series flash
Added NPCX flash driver to support the Nuvoton NPCX4/K3 series
microcontrollers. Add config file for these series.

Change-Id: I0b6e128fa51146b561f422e23a98260594b1f138
Signed-off-by: Luca Hung <YCHUNG0@nuvoton.com>
Signed-off-by: Mulin CHao <mlchao@nuvoton.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7794
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-09-08 22:01:12 +00:00
Ahmed BOUDJELIDA aee495e785 contrib/firmware: add new i2c bit-banging feature to angie's firmware
add new i2c bit-banging feature, we can now connect in JTAG with the SoC
target and in i2c with the main board components at the same time.

Change-Id: I8e4516fe1ad5238e0373444f1c3c9bc0814d0f52
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7796
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-08-26 11:45:43 +00:00
Ahmed BOUDJELIDA aa0056d273 jtag/drivers: add new VIDs for angie driver - add a check for a returned value
add a line that checks the returned value of set signals function

add two VIDs of other original boards (have onboard angie architecture)
so angie driver can connect to them and change their VID after
renumeration.

Change-Id: Ide4f1f6f38168a410191bf3ff75bcd59dcf7ef50
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7795
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-08-26 11:45:31 +00:00
Ahmed BOUDJELIDA 94686eea6e jtag/drivers: Add new driver for ANGIE USB-JTAG Adapter
This is the driver code for NanoXplore's ANGIE USB-JTAG Adapter.
The driver is based on the openULINK project.

This driver communicate with ANGIE's firmware in order to establish
JTAG protocol to debug the target chip.

Since the ANGIE Adapter has a Spartan-6 FPGA in addition to the
FX2 microcontroller, the driver adds two functions, one to download
the firmware (embedded C) to the FX2, and the second to program
the FPGA with its bitstream.

Add ANGIE's configuration file to tcl/interface/
Add the device VID/PID to 60-openocd.rules file.
Add ANGIE to OpenOCD's documentation

Change-Id: Id17111c74073da01450d43d466e11b0cc086691f
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7702
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2023-08-12 16:44:17 +00:00
Ahmed BOUDJELIDA 9c91ce8d24 contrib/firmware: add new adapter ANGIE's firmware/bitstream code
This is ANGIE's firmware and bitstream code.
The 'Embeded C' code is based on the openULINK project.
The hdl bitstream source code is for the spartan-6 FPGA included in
ANGIE.

Since ANGIE has a different microcontroller (EZ-USB FX2) than openULINK
(EZ-USB AN2131), the registers file (reg_ezusb.h) has been changed
completely, so are the descriptors, interruptions and the endpoints
configuration.

Change-Id: I70590c7c58bac6f1939c5ffba57e87d86850664d
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7701
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-08-12 16:42:19 +00:00
Laurent LEMELE 4a96776178 jtag/stlink: add STLINK-V3PWR support
STLINK-V3PWR is both a standalone debugger probe compatible with
STLINK-V3 and a source measurement unit (SMU).
Link: http://www.st.com/stlink-v3pwr

This code adds support for the debugger probe functionality.

Change-Id: Ib056e55722528f922c5574bb6fbf77e2f2b2b0c1
Signed-off-by: Laurent LEMELE <laurent.lemele@st.com>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7755
Tested-by: jenkins
2023-07-08 18:06:33 +00:00
Mark Zhuang 95c27731d4 flash/rsl10: fix typo
Change-Id: I11af37309fe4684fcb340a00fcc7b2096b8dad76
Signed-off-by: Mark Zhuang <mark.zhuang@spacemit.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7584
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-14 15:17:08 +00:00
Erhan Kurubas 99ec576096 github/workflow: build libjaylink from source
Libjaylink submodule disabled by default at
https://review.openocd.org/c/openocd/+/7129

--enable-internal-libjaylink config option will be deprecated soon.

So, building the source is a permanent solution.

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: Id06654d806a3a49f35e3ba41e9e4cc58c1a0d388
Reviewed-on: https://review.openocd.org/c/openocd/+/7552
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-01 16:11:31 +00:00
Jian-Hong Pan 9ffda10298 flash/nor, contrib/loaders: move numicro M0 write assembly to contrib/loaders
Simply move numicro M0 flash write assembly to contrib/loaders. Also,
modify corresponding Makefile and generated numicro_m0.inc.

To make the path more general, this patch rename the path
"contrib/loaders/flash/numicro_m4" to "contrib/loaders/flash/numicro" as
well.

Signed-off-by: Jian-Hong Pan <chienhung.pan@gmail.com>
Change-Id: I9adea24c2b3c97319a9b015cf50257f3d131dc26
Reviewed-on: https://review.openocd.org/c/openocd/+/7346
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-01-15 15:04:25 +00:00
Jian-Hong Pan 63336f4aaf flash/nor, contrib/loaders: move numicro M4 write assembly to contrib/loaders
Simply move numicro M4 flash write assembly to contrib/loaders. Also,
add corresponding Makefile and generated numicro_m4.inc.

Signed-off-by: Jian-Hong Pan <chienhung.pan@gmail.com>
Change-Id: I22b8be0a245857335b11bd0b538db415fc34748d
Reviewed-on: https://review.openocd.org/c/openocd/+/7343
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-01-15 15:04:06 +00:00
Antonio Borneo da34e36cdb nds32: drop it, together with aice adapter driver
The target nds32 and its companion adapter aice have not received
any real improvement since 2013.
It has been hard to keep them aligned during the evolution of
OpenOCD code, with no way for maintainers to really check if they
are still working.
No real documentation is present for them in OpenOCD.
The nds32 code triggers ~50 errors/warnings with scan-build.

The arch nds32 has been dropped from Linux kernel v5.18-rc1.

For all the reasons above, this code has been deprecated with
commit 2e5df83de7 ("nds32: deprecate it, together with aice
adapter driver") and tagged to be dropped before v0.13.0.

Let it r.i.p. in OpenOCD git history.

While there, drop from checkpatch list the camelcase symbols that
where only used in this code.

Change-Id: Ide52a217f2228e9da2f1cc5036c48f3536f26952
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7382
Tested-by: jenkins
2023-01-15 14:46:36 +00:00
Antonio Borneo 382148e4dd openocd: fix SPDX tag format for files .c
With the old checkpatch we cannot use the correct format for the
SPDX tags in the file .c, in fact the C99 comments are not allowed
and we had to use the block comment.

With the new checkpatch, let's switch to the correct SPDX format.

Change created automatically through the command:
	sed -i \
	's,^/\* *\(SPDX-License-Identifier: .*[^ ]\) *\*/$,// \1,' \
	$(find src/ contrib/ -name \*.c)

Change-Id: I6da16506baa7af718947562505dd49606d124171
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7153
Tested-by: jenkins
2022-09-18 08:22:01 +00:00
Toms Stūrmanis ca52cfb2b3 src/flash/nor: flash driver for RSL10
Add new flash driver for internal flash of onsemi RSL10 device.

Valgrind-clean. Clang AddressSanitizer shows no errors.

Signed-off-by: Toms Stūrmanis <toms.sturmanis@gmail.com>
Change-Id: I8030542cb9805e94f56d7a69404cef5d88d6dd5a
Reviewed-on: https://review.openocd.org/c/openocd/+/7115
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-09-13 22:07:43 +00:00
Antonio Borneo 36597636f2 contrib: add GPL license tag on files that miss it
Some file miss completely the license tag.

Add the SPDX tag, using the same GPL-2.0-or-later license of the
OpenOCD project.

The SPDX tag on files *.c is incorrect, as it should use the C99
single line comment using '//'. But current checkpatch doesn't
allow C99 comments, so keep using standard C comments, by now.

Change-Id: I24bd362eeb6b74f09aceb9b757d45cbfa4afe334
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7160
Tested-by: jenkins
2022-09-13 22:06:50 +00:00
Antonio Borneo a126229dff contrib: replace the GPLv2-or-later license tag
Replace the GPLv2-or-later boilerplate with the SPDX tag.

The SPDX tag on files *.c is incorrect, as it should use the C99
single line comment using '//'. But current checkpatch doesn't
allow C99 comments, so keep using standard C comments, by now.

Change-Id: I380d552940f1c405309a3346454251c0e80b5a45
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7159
Tested-by: jenkins
2022-09-13 22:06:14 +00:00
Antonio Borneo d8042fbb46 contrib: replace the BSD-3-Clause license tag
Replace the BSD-3-Clause boilerplate with the SPDX tag.
Add the SPDX tag and the copyright to two makefiles that were
added by TI with the other files in their respective folder.

The SPDX tag on files *.c is incorrect, as it should use the C99
single line comment using '//'. But current checkpatch doesn't
allow C99 comments, so keep using standard C comments, by now.

Change-Id: I3ad1b2dbdb6054b74dcc26e394c9223ba0427caf
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7158
Tested-by: jenkins
2022-09-13 22:06:05 +00:00
Antonio Borneo 2d48b8e012 contrib: replace the GPLv3-or-later license tag
These files are not built in OpenOCD and are not in conflict with
OpenOCD license.

Replace the GPL boilerplate with the SPDX tag.
Add the SPDX tag.

The SPDX tag on files *.c is incorrect, as it should use the C99
single line comment using '//'. But current checkpatch doesn't
allow C99 comments, so keep using standard C comments, by now.

Change-Id: I934e4add24098f0e8574120b3bc32e9bcf166abd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7157
Tested-by: jenkins
2022-09-13 22:05:50 +00:00
Antonio Borneo 25a374a187 openocd: fix syntax of SPDX tags
Put the SPDX tag alone in a comment in the first line of the file.
Replace the obsolete GPL-2.0+ tag

The SPDX tag on files *.c is incorrect, as it should use the C99
single line comment using '//'. But current checkpatch doesn't
allow C99 comments, so keep using standard C comments, by now.

Change-Id: Ia91b0f7da42c439b6340bbe81983b86b68f6d65c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7156
Tested-by: jenkins
2022-09-13 22:03:24 +00:00
Antonio Borneo 424f9f6796 doc: how to use QEMU to test big-endian build
Document the process of using buildroot to build a big-endian
binary of OpenOCD and using QEMU User Mode Emulation for running
the big-endian binary on a little-endian host PC.

Change-Id: Ic5fe26e353a4cf69e57af3c23ae7fa4b25347b2b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6968
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-08-27 16:18:17 +00:00
Erhan Kurubas 7e8ea96345 loaders/reset/espressif: replace the GPL-2.0-or-later license tag
Replace the FSF boilerplate with the SPDX tag.

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: Iddccae2bd8906a3587a2aa2684124356a340fc74
Reviewed-on: https://review.openocd.org/c/openocd/+/7105
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-15 13:23:28 +00:00
Erhan Kurubas 3d61a9593e jtag: add esp_usb_jtag driver
This driver is used with the ESP32 chips which has builtin USB-JTAG
interface. e.g. with ESP32-C3, ESP32-S3

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: If966268cb8d26f76540dd5440245a17ed0b72c61
Reviewed-on: https://review.openocd.org/c/openocd/+/6943
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2022-07-02 08:24:01 +00:00
Erhan Kurubas 2053120ba1 target: add Espressif ESP32-S3 basic support
ESP32-S3 is a dual core Xtensa SoC
Not full featured yet. Some of the missing functionality:
-Semihosting
-Flash breakpoints
-Flash loader
-Apptrace
-FreeRTOS

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I44e17088030c96a9be9809f6579a4f16dbfc5794
Reviewed-on: https://review.openocd.org/c/openocd/+/6990
Tested-by: jenkins
Reviewed-by: Ian Thompson <ianst@cadence.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-24 21:46:42 +00:00
Erhan Kurubas 77287b8d47 target: add Espressif ESP32 basic support
ESP32 is a dual core Xtensa SoC
Not full featured yet. Some of the missing functionality:
-Semihosting
-Flash breakpoints
-Flash loader
-Apptrace
-FreeRTOS

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I76fb184aa38ab9f4e30290c038b5ff8850060750
Reviewed-on: https://review.openocd.org/c/openocd/+/6989
Tested-by: jenkins
Reviewed-by: Ian Thompson <ianst@cadence.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-24 21:46:07 +00:00
Tarek BOCHKATI 975fb2a4fa github/workflow: enable libftdi based adapters
Change-Id: I74b07b21573294dd7d9d3caf41c5755622c77149
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7008
Tested-by: jenkins
Reviewed-by: Xiaofan Chen <xiaofanc@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-03 23:46:02 +00:00
Tarek BOCHKATI d1e14abdba cross-build.sh: fix build with capstone
since commit 12d1ad0c75 : update capstone include path ...
the generated capstone.pc is not working

so fix the includedir in capstone.pc to get github action working

Change-Id: I7767e181a74c73a7514eeb6293cd556a794dbfe9
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6969
Tested-by: jenkins
Reviewed-by: Tim Newsome <tim@sifive.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-07 17:35:37 +00:00
Tomas Vanek f2b4897773 flash/stm32f1x: add support for RISC-V GigaDevice GD32VF103
The device has compatible flash macro with STM32F1 family, reuse
stm32f1x driver code.

Detect non-ARM target - for simplicy test target type name 'riscv'
and the address has 32 bits.

In case of RISC-V CPU use simple chunked write algo - async algo
cannot be used as the core implemented in this device doesn't
allow memory access while running.

Change-Id: Ie3886fbd8573652691f91a02335812a7300689f7
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6704
Tested-by: jenkins
Reviewed-by: Tim Newsome <tim@sifive.com>
2022-04-24 08:26:08 +00:00
Marc Schink be0d68eb66 Remove all occurrences of 'mem2array' and 'array2mem'
Replace deprecated commands 'mem2array' and 'array2mem' with
new Tcl commands 'read_memory' and 'write_memory'.

Change-Id: I116d995995396133ca782b14cce02bd1ab917a4e
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/6859
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12 09:48:19 +00:00
Marc Schink 0cbb0c3ccc contrib/udev: Add missing J-Link USB PID
See libjaylink/contrib/99-libjaylink.rules

Change-Id: I36733e18eb4bc11828c5fa563c687d28be9e34bd
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/6778
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-12-24 15:12:39 +00:00
Tim Newsome 35f284fe7c flash/nor/fespi: algorithm, large address, errors
* Move more smarts into the target algorithm code, and rewrite that in C
  so it's easier to understand/maintain.
* Support >24-bit addresses.
* Check for errors.

Change-Id: I3b1a143589fe6defafb8f95820aa682acc9646e7
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6679
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-12-03 21:58:55 +00:00
Jimmy 7901cf2124 flash/nor/stm32lx: fixed writes at high adapter speeds
The busy flag must be polled after each half-page write.
At low clock speeds, no issue is observed when the poll
is omitted, because the writes complete before the next
write begins. But at high clock speeds the subsequent
writes would overlap and cause the operation to fail.

The status polls are done on the target for efficiency,
since the half-pages are very small.

Change-Id: Ia1e9b4a6a71930549b3d84a902744ce6e596301b
Signed-off-by: Jimmy <nhminus@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/5598
Tested-by: jenkins
Reviewed-by: Jelle De Vleeschouwer
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Andrzej Sierżęga <asier70@gmail.com>
2021-11-03 20:32:54 +00:00
Antonio Borneo 745b40d99a udev: add ASIX Presto programmer
The driver is in OpenOCD since 2007, but the USB VID/PID have
never been listed in udev rules.

Change-Id: I77df469929dd7f6b6483678c0e76f22c30a7614c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6563
Tested-by: jenkins
2021-10-02 13:16:30 +00:00
Andreas Sandberg 564e7576ab stlink: Add PID for V3 device without MSD
Add the 0x3754 PID used by some STLINK-V3 devices when MSD has been
disabled. This PID has been observed on a Nucleo-G431RB board.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
Change-Id: Idb85874fa5a9dff5940bae7e95426a956693b976
Reviewed-on: https://review.openocd.org/c/openocd/+/6555
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-09-18 15:27:16 +00:00
Tarek BOCHKATI b61a280860 flash/stm32l4x: fix flash programming in 64-bit hosts
stm32l4_work_area struct is shared between the loader and stm32l4x flash driver

'*wp' and '*rp' pointers' size is 4 bytes each since stm32l4x devices have
32-bit processors.

however when used in openocd code, their size depends on the host
  if the host is 32-bit, then the size is 4 bytes each.
  if the host is 64-bit, then the size is 8 bytes each.

to avoid this size difference, change their types depending on the
usage (pointers for the loader, and 32-bit integers in openocd code).

Change-Id: I0a3df4bb4bf872b01cdb9357eb28307868d7d469
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6556
Tested-by: jenkins
Reviewed-by: Yestin Sun <sunyi0804@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-09-12 14:26:31 +00:00
Tarek BOCHKATI 4b1492bb8e flash/stm32l4x: switch to to c loader instead of assembly loader
switching to C loader instead of the assembly version will enhance readability
will reduce the maintenance effort.

besides the switch to C loader, we added a new parameters to the loader
like flash_word_size and flash_sr_bsy_mask in order to support properly
STM32U5x and STM32G0Bx/G0Cx in dual-bank mode.

Change-Id: I24cafc2ba637a065593a0506eae787b21080a0ba
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6109
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2021-09-02 17:21:13 +00:00
Wealian Liao 385eedfc6f flash/nor: add support for Nuvoton NPCX series flash
Added NPCX flash driver to support the Nuvoton NPCX series
microcontrollers. Add config file for NPCX series.

Change-Id: Ia10b019a3521f59ad1e10ccdc56827ba30c3eac8
Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/5950
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2021-09-02 06:42:54 +00:00