Correct the issue of usb descriptor does not appear
near the PID and VID, Cypress USB controller cannot
handle direct pointers to memory CODE area, so we
copy the data in the external RAM area and point
to it.
Change-Id: I3221627dc8576f6341b444acd9c554fd5cc47918
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8736
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Add a check if i2c SDA pin state is HIGH.
if its HIGH, the dev-board is ON, we receive
number of Ack.
in its LOW, the board is OFF, we send this
information back to driver.
Change-Id: Ia40d3910675cc10e0208d8bc0060a19c12b1409d
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8716
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This new code implement two FIFOs for handling TX and RX
JTAG data transfers, its simply receives data and send it
OUT to target chip in respect of JTAG protocol timing
constraints.
The IN FIFO receives data from target chip and send it
back to openocd.
Change-Id: I17c1231e7f4b0a6b510359fe147b609922e0809e
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8715
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
We make the proper GPIF configurations for OUT/IN transfers
which are : the GPIF state machines for each direction OUT/IN
We change the Vendor-commands to handle GPIF config before
triggering it.
Change-Id: I2f3bd7bed1a378536bf017336b5031683d93e3c1
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8713
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The new firmware of ANGIE will not use Bitbang method to
transfer jtag data to the target chip. instead, it will use the
the GPIF module to bypass JTAG data directly to the FPGA and
then to target chip.
So we delete the protocol and jtag files which handle bitbang.
We are going to use endpoint 2/4 for OUT/IN GPIF transactions,
and we deactivate the endpoints 1IN and 1OUT.
we will keep the endpoint 6/8 for i2c unchanged.
Change-Id: I0fcb23690526f6a7da044b702217b32522be727a
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8712
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Display only the quirk state without additional text. This makes
processing via Tcl easier. Also, do not echo the selected quirk state.
Change-Id: I2e8de2742ffc10c7995a30a2a2d8a383b0cfaa69
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9068
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Simplify syntax error handling and make the documentation and code
consistent.
Change-Id: Ib8ee5adff2071964fc6d8e153f3eb82dd20054f3
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9067
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The code in an event handler can use the command '$target_name
configure' to add a new event or to remove or modify an existing
event.
Such operation impacts the list of event of the target and also
modify the event itself, causing OpenOCD to access memory already
deallocated or not anymore valid.
Use the safe version of list_for_each_entry() to iterate on the
list of events.
Make a local copy of the current event, to avoid issues if it gets
deallocated.
Use Jim_IncrRefCount() to guarantee that the body of the event
handler don't gets deallocated when the event is removed.
Change-Id: I936e35adddc030ba7cec6e2fc0c7d3b1b5c4a863
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9063
Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Tested-by: jenkins
The max32xxx tcl files have been updated to work with the new flashing
algorithm. A new max32xxx.cfg file contains common configuration and
functionality.
Change-Id: Ifaed58836d221ece6192faafa382b30fb72c77a6
Signed-off-by: Henrik Mau <henrik.mau@analog.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8976
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
When attempting to write to internal flash the flashing step fails with
'Error: timeout waiting for algorithm, a target reset is recommended'.
Updated flashing algorithm for MAX32xxx to fix this.
Change-Id: I51350c1320c9699ddcf6cb28d9299538bece4c4f
Signed-off-by: Henrik Mau <henrik.mau@analog.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8794
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: zapb <dev@zapb.de>
Format strings are often split to allow using the conversion
specifiers macros from <inttypes.h>.
When the format string ends with one of such macros, there is no
need to add an empty string "" after the macro.
In current code we have 203 cases of empty string present, against
1159 cases of string ending with the macro.
Uniform the style across OpenOCD by removing the empty string.
Don't modify the files 'angie.c' and 'max32xxx.c' as they are
already changed by other independent commits.
Change-Id: I23f1120101ce1da67c6578635fc6507a58c803e9
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9065
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The function keep_alive() is optimized and return immediately if
has nothing to do.
There is no need to overly-complicate the code with extra counters
or time computation plus the relative checks to reduce the number
of calls to keep_alive().
Drop such extra code.
Change-Id: I4574a3f154b5779f44105936c74af8fca1d2c49c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9064
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Lucien Buchmann <lucien.buchmann@dufour.aero>
Initial driver for Artery devices without flash loader and dual-bank
support. Tested with AT32F415CBT7 and AT32F421C8T7.
Change-Id: I3213f8403d0f3db5d205e200f626e73043f55834
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8667
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
When we read unaligned memory there is an offset in the albuff buffer,
that we account for when copying back to original buffer. But in case
the first access failed, the retry call already removed the offset,
so doing it a second time shifts the returned memory.
Change-Id: Ie255c367ca6a001bfe7038a76cf8a6443e398c51
Signed-off-by: Samuel Obuch <samuel.obuch@espressif.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8987
Tested-by: jenkins
Reviewed-by: Ian Thompson <ianst@cadence.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
_DEBUG_USB_IO_ was not actually used anywhere.
Its last user was the old ft2232 driver removed in Nov 2016
with commit cc2d4f015f
("Remove since long deprecated ft2232 driver").
Change-Id: I1a98db7c7b03a89cc9347c0a66ec2106d2168c3f
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9002
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The patch changes the following:
- Use correct return value ERROR_COMMAND_ARGUMENT_INVALID is case an
invalid debug level is provided.
- Do not echo the selected debug level.
- Remove the 'debug_level: ' prefix when the debug level is shown.
This makes processing via Tcl easier.
- Use command_print() in order to provide the error message to the
caller.
Change-Id: Ida84a58c61060497fc36a1926eec7dd30c66cd72
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8996
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Add a board configuration file for the MikroElektronika Clicker 4 for
STM32F745VG (MIKROE-6331), which contains their CMSIS-DAP-compatible
on-board CODEGRIP programmer.
Place this into its own subdirectory, since MikroElektronika has quite a
few boards in their portfolio.
Change-Id: If24ca286d65e024f3c3a8522b67727e268ab0bc9
Signed-off-by: Ondřej Hošek <ondra.hosek@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8997
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Print a debug message rather than an info message because this
information is not of importance for normal users.
While at it, fix the 'EMBEDDED_FUNCTION_NAME' checkpatch issue.
Change-Id: I9d458a6dd6818fdedc488e39d2daa6d72a21b743
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8994
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The number of up-channels is erroneously checked instead of the number
of down-channels.
Change-Id: Iff5348387b3466ed66f34df81e1039918608ac77
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8995
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Consider target endianness when reading control block and channel
information. Current implementation fails on big-endian devices.
Tested on TMS570 (big-endian) and on nRF52 (little-endian).
Note that in its current implementation RTT does not work properly on
TMS570 due to its missing support for background memory access.
Change-Id: Iab58804c42c85a932a750201a69ded35cebedd5d
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8993
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The variable is already used in some parts of the code as boolean value
but have the wrong data type.
Change-Id: I50ccbf84c6f33a3034de989789c6b17312458ea8
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8989
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
The variables are already used in some parts of the code as boolean
value but have the wrong data type.
Change-Id: I2c4955a6ed463fabf63a1dbd79145cb63bc7a99c
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8988
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Add the helper function str_enabled_disabled() to select between the two
strings 'enabled' and 'disabled' depending on a boolean value.
Additional functions for frequently used strings can be added in the future
if required.
Change-Id: I2d8ae96b141f87966836e6e4c3a2ed6d12b71fa5
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9006
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Print a debug message rather than an info message because this
information is not of importance for normal users.
Change-Id: Ie91565df455ffc0bfe976d1782dd4318bfd2d30b
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8986
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Add support for the targets stm32mp21x, stm32mp23x and stm32mp25x.
Add support for the boards stm32mp235f-dk and stm32mp257f-dk.
The board stm32mp215f-dk has no configuration file as it only
provides a generic JTAG/SWD connector for the stm32mp21x SoC.
Change-Id: I0256bebd8a5d5600066d8ae191d83344a35d3d37
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8985
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Align the target script to the handshake implemented in the latest
version of stm32wrapper4dbg to get access to the debug port.
Use hwthread with the SMP node.
Allow ignoring/masking some CPU from the configuration with the
variables EN_<cpu>.
Change-Id: I7117dd7df20b4f6b6e28f911e3e91ee763bdd200
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8984
Tested-by: jenkins
Align the target script to the handshake implemented in the latest
version of stm32wrapper4dbg to get access to the debug port.
Change-Id: Ia1c7773330fda776abb4385331fddbf431d11c39
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8983
Tested-by: jenkins
Move the existing files for STM32MP13x and STM32MP15x in the
folder "st".
Rename the board files using the correct names.
While there, add the missing URL to one of the boards.
Change-Id: If8b92f55e3390ebc75df6a2ea09fcf798ea0b8cf
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8982
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Microchip's PIC64GX Curiosity Board has a RISC-V core complex with 4
application processors and one monitor processor. The Curiosity kit also
has an on-board debug interface based around an FTDI 4232H device.
This patch adds basic target, interface and board support for PIC64GX
Curiosity Kit.
Change-Id: I2234d8725744fbae00b3909773b370e5c18debd8
Signed-off-by: Liam Fletcher <liam.fletcher@microchip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8878
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins