Use command_print() in order to provide an error message to the caller.
Change-Id: I9f1a2ef07a102e1d6e755f3680bed0f7183b5c9c
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8968
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Use LOG_TARGET_xxx() for log messages as it is used for other targets.
While at it, rework the log messages. For example by removing spaces or
punctuation marks at the end of the message.
Change-Id: I295001876d40527ec8f35c2aec8d562a29e57b26
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8967
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Use LOG_TARGET_xxx() to indicate which target the message belongs to.
Change-Id: Ic40c61a779c1a1ebdc96ebc56b27541fff5e6205
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8966
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Print a debug message about missing multiprocessing support rather than
an error message.
Change-Id: Ia1581f7284747d8a92096d6f5515f891c8069f71
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8965
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Use LOG_TARGET_xxx() to indicate which target the message belongs to.
While at it, rework the log messages. For example, using correct format
specifiers.
Change-Id: I05031e0ae25fe9e7bc38dfb781b6623a967fd533
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8964
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
If it is not possible to create a GDB service for a certain target
(for example the given TCP port is already occupied), the "init"
command should fail, but it currently does not.
Fix this by checking the return code of gdb_target_add_all().
Steps to reproduce:
1) Make the port 3333/tcp occupied. For example by:
nc -l 3333
2) In another terminal, launch OpenOCD. Use the gdb_port
3333 (which is the default). For example:
path/to/your/openocd \
-c "adapter driver ..." \
-c "jtag newtap ..."
-c "target create ..."
3) Observe the outcome:
Before this patch:
Error "couldn't bind gdb to socket on port 3333: Address already in use"
is displayed but OpenOCD keeps running.
After this patch:
The error message is displayed and OpenOCD exits - as expected.
Change-Id: I63c283a9a1095167b78e69e9ee879c378a6b9f2a
Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8957
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Add comments to require the list of rtos to be kept sorted.
Change-Id: Iecf9250a14f6593d0a24a9f9b8930c0ec8d74bd2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8953
Tested-by: jenkins
Instead of using NULL terminated arrays to determine the last
element of the array, use the size of the array.
Change-Id: I3cdc0f6aef8a5110073aeef333c439e61fc54032
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8952
Tested-by: jenkins
Reviewed-by: Brandon Martin
Add comments to require the list of targets to be kept sorted.
Change-Id: Ie3d7e3f5d55a9f9214dc179c5c986b6682f59412
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8951
Tested-by: jenkins
Add comments to require the list of drivers to be kept sorted.
While there:
- align the check on BUILD_PRESTO and BUILD_USB_BLASTER;
- fix indentation of the closing parenthesis.
Change-Id: Ic78281b1cdfb5bf72ea41427233e76516001b429
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8950
Tested-by: jenkins
Instead of using NULL terminated arrays to determine the last
element of the array, use the size of the array.
Change-Id: I532a51a223061348e57bae3bd66ee6b346c1b070
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8949
Tested-by: jenkins
Reviewed-by: Brandon Martin
Add comments to require the list of drivers to be kept sorted.
Change-Id: I21b52cc1f5e679b0ebf7797e204248507f53557b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8948
Tested-by: jenkins
Instead of using NULL terminated arrays to determine the last
element of the array, use the size of the array.
Change-Id: Ia3d739b0a9f201ba2e7b1d1244d60c8e5546c9c1
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8947
Reviewed-by: Brandon Martin
Tested-by: jenkins
Add comments to require the list of drivers to be kept sorted.
Change-Id: I57382605edc6a38d6c1ac18393421b18ae72215b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8946
Tested-by: jenkins
The 'mem2array' function is deprecated and replaced by 'read_memory'.
Change-Id: Iea54a390d67978d20dbb99ab6f7f4178dda481c2
Reported-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8962
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Using nicknames provides a human-readable alternative to serial
numbers for convenience purposes. Allow matching adapter serial
with device nickname.
Change-Id: I03b8d28a6c89412a825d42f4f66b3b528f217d9c
Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8886
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: zapb <dev@zapb.de>
Remove the quotation marks as they are used for strings and not
parameter names.
Change-Id: I7bb25eb251427e89256b73cf697d8ec5c1b401dc
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8963
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Remove the quotation marks as they are used for strings and not
parameter names.
Change-Id: Ib0629e1465f821f91cd1e837f4ef8c752013b6b7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8955
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The 'directory' parameter is not optional.
Change-Id: Ifbc7b311692157dae0621dfa6d35a24b8fe8cbb2
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8954
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
[1] removed target_halt() from cortex_m_assert_reset()
It broke debug_reason tracking and the previous reason
was shown after reset halt.
Set debug_reason to DBG_REASON_DBGRQ during reset halt
preparation.
Fixes: [1] commit 226085065b ("target/cortex_m: drop useless target_halt() call")
Reported-by: Marc Schink <dev@zapb.de>
Change-Id: I685618ed158abde11f6e00eeeee1dfa8ed90952d
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8945
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Adapters: bcm2835gpio, imx_gpio, am335xgpio, ep93xx and at91rm9200
Allow the user to enable them regardless of the target architecture.
Change-Id: I9fbc7cbefe770ea2e2239b95a3305fd29127fa85
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8892
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Update MPIDR decode to support the multithreading (MT) bit.
If detected, socket, cluster, core and multithread affinity levels are
decoded and displayed.
Change-Id: I43569141fa0eef8ee8fc16c187a4af3c23e97db8
Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7190
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Update to latest available document.
Change-Id: Ic1c892b42d3efbb35ad4a6c85deb17ab31ad9997
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8944
Tested-by: jenkins
Macro AM_PROG_CC_C_O has been obsolete since Automake 1.14,
released in June 2013 (12 years ago).
It used to check whether the C compiler supports the -c and -o options,
but that is now included in AC_PROG_CC.
Increase the minimum required Automake version to 1.14 accordingly.
Also remove the "not a GNU package" comment,
which does not really make sense.
Change-Id: I987ba8686721c7f36fba81e100f1c3ddf77f636d
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8942
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Freeing pending transfers on shutdown is done in openOCD
and on libusb side. This created concurrency in freeing
memory and segmentation faults:
https://github.com/libusb/libusb/issues/1627
Bug is reproduced better if many targets are laucnhed.
Bug was reproduced with CMSIS-DAP on targets:
cyw20829, psoc4, stm32l5 if launching multiple times.
Proposed working fix: if some transfers pending/in-flight
on 'shutdown' then apply libusb_handle_events_timeout_completed()
to make transfer complete. In all cases transfer completed
due to tests.
Change-Id: I44621ac6096791714910220d04614d0a19ce47bd
Signed-off-by: kryvosheiaivan <Ivan.Kryvosheia@infineon.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8876
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The adapter is not available for years now. There is also no information
about this device from Gateworks. The poor hardware availability and the
lack of users prevents testing, maintenance and adaptations to future
changes.
Mark the adapter as deprecated as a first step to give potential users
the opportunity to upgrade the hardware until the next OpenOCD release.
Change-Id: I037325a6b018b26608733a36bef30db2785858f8
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8651
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The adapter is not available for years now and Amontec is not even a
company anymore. The poor hardware availability and the lack of users
prevents testing, maintenance and adaptations to future changes.
Mark the adapter as deprecated as a first step to give potential users
the opportunity to upgrade the hardware until the next OpenOCD release.
Change-Id: Idd9fb75588246bc39e12ea17a71435ed77f0f50b
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8349
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
We often get on Gerrit a new version of an old patch with a new
'Change-Id' value. This breaks the history of the review, adding
more work to the review process.
Describe in HACKING why the hook 'commit-msg' is required and how
to handle the 'Change-Id' on new patch versions.
Change-Id: I5c060b19f966add7422704912b38e1ab2f788e5f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8940
Tested-by: jenkins
The Orange Pi Zero 3 is an SBC that uses an Allwinner H618
SoC. As such, JTAG support is fully available, however the
SoC multiplexes JTAG function with UART1 and microSD.
Unfortunately Xunlong has used UART1 for the Wifi-BT
chip, leaving JTAG accessible only via the microSD using
a microSD breakout board (for example).
Change-Id: I0dc078cd2f3176815271917eb5e948cc8ef94525
Signed-off-by: Electric Worry <me@electricworry.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/8938
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The Allwinner H618 is an updated H616 but appears functionally
equivalent. It is used in small boards such as Orange Pi Zero 3.
Change-Id: I299a42be746189f3e8e31070aa26b83ab7d806a4
Signed-off-by: Electric Worry <me@electricworry.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/8936
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
fallback programming without loader when resources are not available
while at there refactor reused code
(wait for interrupt and command execution)
Change-Id: I2cba0f53d3470bc324f4a72614c236cebf196f64
Signed-off-by: BOCHKATI Tarek <tarek.bochkati@st.com>
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8883
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
flash ADDRESS register is encoded in 17 bits (was 16),
so fix the cast to uint32_t
Change-Id: I13384ee8967e65890577b12a42a0eb4f1e2a7467
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8882
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The BlueNRG-LPF has a flash size up to 512 Kb
Change-Id: I4c71b716330351004f4f2ab8bf8eac7d5bb694eb
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8881
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
With commit d8a2f6dbcf ("configure.ac: show the Amontec
JTAG-Accelerator driver in the config summary") the driver
amt_jtagaccel is now build by default on Linux.
This highlights the dependency of some include files, dependency
that is not properly managed and that can cause build failure.
The driver is queued to be dropped soon, so there is no real
interest to fix the dependencies.
Change the default so the driver is not built if the user does not
require it at configure time.
Change-Id: Ifb74e2c802abda290efbf59ca4ce02048c94e6f8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8939
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Tested-by: jenkins
By merging [1] and [2], the drivers 'xlnx-pcie-xvc' and 'linuxspidev'
are now build by default on Linux.
This highlights the dependency of some include files under subfolder
'linux' that are not installed by default in all Linux boxes.
Add the check in 'configure' for the presence of the include file
and conditionally enable the build of the driver.
Change-Id: Ie88645c3455ab07622f069a0cc7bf09d1a5a2c75
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Link: [1] 7214c8be46 ("configure: show adapter Xilinx XVC/PCIe in the configuration summary")
Link: [2] 83e0293f7b ("Add Linux SPI device SWD adapter support")
Reviewed-on: https://review.openocd.org/c/openocd/+/8935
Tested-by: jenkins
For aarch32 secure EL3
- Change target_el to 3 for SVC/ABT/IRQ/FIQ/UND/SYS for aarch32 secure
EL3
- Do not update SPSR for SYS, behavior is UNPREDICTABLE (ARMv8-A F5.1.121)
- Do not execute DRPS for SYS, behavior is UNPREDICTABLE (ARMv8-A
F5.1.51)
Change-Id: Ic1484665cd53afcccb5c20b152993a3f0407f8a2
Signed-off-by: Kevin Yang <kangyang@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/5854
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-by: Plamena Marinova <pmarinova@hilscher.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
raspberrypi.com is the home for technical information, raspberrypi.org
is the Foundation's site (though there are intelligent redirects).
Several pages have moved around, fix these.
Also tweak a few comments for style and correctness.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
Change-Id: I7f52bcc362fb213b50987e3a42866fe4a6fec883
Reviewed-on: https://review.openocd.org/c/openocd/+/8885
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The peripheral address details have been removed from the documentation
part of the website (instead presented in the SoC datasheets).
Pi 5 GPIOs are provided by the RP1 southbridge, which requires the use
of libgpiod. The associated Linux driver for the GPIO interface must be
used when bitbashing on Pi 5, as the timing of pin state changes is not
guaranteed across the PCIe link without special treatment.
Using libgpiod, the typical maximum swclk speed is 1MHz.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
Change-Id: I8b2c44ec5edd71abaa0a763ba4d4f4603a211348
Reviewed-on: https://review.openocd.org/c/openocd/+/8884
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This command allows to read non-memory mapped flash content directly
via Tcl script. The API is the same as for the 'read_memory' command
for targets.
Change-Id: I4a8d0d7ea2f778ac8f1501227b60b964c881cb84
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8634
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
This change adds a polling mechanism to the driver. When not busy
the driver issues a wait, allowing the target to advance time.
The wait period gets adjusted to match the polling setting.
Change-Id: I67f481d05d7c5ce5352b5cb97de78dbaa97d82ae
Signed-off-by: Jacek Wuwer <jacekmw8@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8221
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Enable the trace port (GPIOE) clock, otherwise the following pin
configurations have no effect.
Change-Id: I3942d2527c64340463c3b6c607addb4214f83081
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8823
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
P25Q16 can be found in the Efinix T13/20Q100F3, so that one is necessary
for jtagspi on those chips. The other ones were added for completeness.
Change-Id: Ifb6f3c6fbd23938d6fd26bce7742c3484ece130c
Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8223
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The function find_file() is supposed to be called when the search
dirs in 'script_search_dirs' has already been populated.
This is not the case when the command 'ocd_find' is used in one of
the embedded scripts 'startup.tcl'. It then triggers SIGSEGV.
Check for 'script_search_dirs' and eventually skip searching in
the dirs.
Change-Id: I9e75a8739c94de72041fb64487910d60dffcb2bd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8931
Tested-by: jenkins
Tested with nRF5340 development kit.
Change-Id: I44f1ba176dd4ac491b5dccea4c4d6d6d9bfaf479
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8867
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested with nRF9160 development kit.
Change-Id: I367b869b9707bef0547b5d3575b24e19db74cd21
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8866
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Board configuration files for specific external debug adapters are not /
no longer supported.
Checkpatch-ignore: LONG_LINE_STRING
Change-Id: I0f391dfb1a2d7ceb92c2ad3e34eaeb8a85b2cdc5
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8865
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Add the old configuration files to the 'file_renaming' list in order to
ensure backwards compatibility.
Change-Id: Ia61df8e5cd8c19cee19a494635c8025e36f3f4a7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8907
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Move board configuration files into a dedicated vendor directory as
required by the new guideline for configuration files.
Change-Id: Icbf368d7a453c82813e685d2935b186eb738c3ea
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8864
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Use the moved nordic target configuration files.
Change-Id: Ie0e2eb7f9514eedb1ae6678eeee59291856c2674
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8906
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>