Call function 'is_breakpoint_in_range()' in handler_load_image_command and
handle_fast_load_command for detecting breakpoint memory overwriting.
Change-Id: I8fb6c9811dc7322d78ec9cbba0e4641d619b7e03
Signed-off-by: Kulyatskaya Alexandra <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9240
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
Move the configuration files into a dedicated vendor folder as required
by the developer guidelines.
Change-Id: I638510a45c02e932df9e52ae3ec6b211baa597c8
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10069
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
Move the configuration files into a dedicated vendor folder as required
by the developer guidelines.
Change-Id: I7fa6e6bc4ca70e5272b3fbe3beca4106fd975d17
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10068
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
Move the configuration files into a dedicated vendor folder as required
by the developer guidelines.
Change-Id: Ibf6c7221310b7d9e676b13816d00655c091e3d16
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10067
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
The config does not load:
Error: target requires -dap parameter instead of -tap
A cortex_a target takes its DAP from '-dap' and refuses '-tap' (before
that '-chain-position'). That was already the case when the file was
added: 0.12.0 fails the same way, naming '-chain-position'.
Create the DAP on the existing TAP and pass it with '-dap', as
ls1046a.cfg does. The TAP, the DAP and the target keep their names
(v3s.dap, v3s.cpu).
Checked with the dummy adapter only: the config loads and creates the
cortex_a target v3s.cpu on the DAP v3s.dap.
Fixes: f8367dbb49 ("tcl/target: add Allwinner V3s SoC support")
Change-Id: Ie8396b7ffbb2b494a74bcfe7fe0f4241cbcf1f7b
Signed-off-by: Nguyen Minh Tien <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10080
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
Setting an HW breakpoint when one target is declared in the SMP
list but is not examined causes error on OpenOCD
Info : no hardware breakpoint available
Error: [..] can't add breakpoint: resource not available
because OpenOCD doesn't know how many HW breakpoint are allowed
on the not yet examined target.
Simply drop the SMP association when only one target is debugged.
Change-Id: Ib7a5e3e6bb4329107bbc00f8334fca988a420e6c
Signed-off-by: Antonio Borneo <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10066
Tested-by: jenkins
The Rockchip RK3576 SoC is used in a number of SBCs such as the ArmSoM
Sige5, FriendlyElec NanoPi M5 and others.
Add the target config to debug those over the SWD connection exposed via
SDMMC card pins D2 (SWCLK) and D3 (SWDIO).
Tested using a custom mini-PCB in the shape of a microSD card with an
extra cutout to avoid triggering the card detect switch (which forces
the SoC to switch the pins from SWD mode to SD).
Change-Id: I2d97058784f5a774fc2cb62baff0cb2a51102fcc
Signed-off-by: Alexey Charkov <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9567
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
Rework the command and make the configured memory access method(s)
readable. As part of this, rename the command to 'mem_access' but
keep the legacy 'set_mem_access' command for backwards compatibility.
While at it, fix various coding style issues such as data types, return
values and error messages.
Change-Id: I2eace597c292a3a82f208c34b2ab0ff494f3c2fb
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9974
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
The original code addressed Cortex-A8, but it's for generic
AArch64.
Change the text in the comments.
Change-Id: I319514d1c30263fa549e40cd7434ae42a89c5a40
Signed-off-by: Alamy Liu <[email protected]>
Signed-off-by: Antonio Borneo <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/3274
Tested-by: jenkins
Adding commands to list created hubs and active connections
on hubs. This is useful to debug configuration problems.
Change-Id: Ifb8bea7e64e172f15cd861e86edf3412ae232352
Signed-off-by: Daniel Anselmi <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9356
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
There are a few places in gdb_server.c where strings are taken directly
from target memory and placed in an XML message to GDB. If the string
contained XML reserved characters or control characters, GDB would drop
the entire message with
"warning: while parsing threads: not well-formed (invalid token)"
resulting in loss of debugging.
This patch escapes valid XML reserve characters and replaces non-ascii
characters with '?' so a thread name like "<foo>" can't corrupt the
entire message. XML escaping was removed from ecos.c to avoid double
escaping.
Change-Id: Iba1d29a57b1aab8723a4c66339399e948e2e14af
Signed-off-by: daniellizewski <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10008
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
Reviewed-by: Antonio Borneo <[email protected]>
- make clean removed hpm_xpi_flash.inc, a tracked file the hpm_xpi flash
driver includes, so a failed rebuild after clean left the driver broken
in the working tree. also clean the generated map file, which the rule
missed.
Change-Id: I3a5e8cf41c9ce31112a418ab3e83971827e6637c
Signed-off-by: Ryan QIAN <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10073
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
- rom routines on some devices, early hpm6200 for example, use floating
point in their calculations. the loader is entered with mstatus.FS
clear, so the first fp instruction in rom code traps and the flash
operation fails on the target.
Change-Id: Idf108f6ee4a6ab42412fcb756cbdb1700bbc6d4f
Signed-off-by: Ryan QIAN <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10072
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
- not only the romapi version, but it still needs to check if the
corresponding api is available.
Change-Id: I45fdd86a979bf99122758a627234cd8f57fc5621
Signed-off-by: Ryan QIAN <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9599
Reviewed-by: Tomas Vanek <[email protected]>
Tested-by: jenkins
Do not return ERROR_OK if erase_check of not memory mapped SPI
flash is not implemented. Log error and return ERROR_NOT_IMPLEMENTED.
msp432: do not pretend that protect check is implemented.
Drop the stub.
Change-Id: I81c490770b615b496b7046d4e895eeccf7e92a0d
Signed-off-by: Tomas Vanek <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10003
Reviewed-by: zapb <[email protected]>
Tested-by: jenkins
Correct the variable name from '_CYCLON_4_DATA' to '_CYCLONE_4_DATA' to
resolve the following error:
tcl/fpga/altera/cyclone-iv.cfg:40: Error: can't read "_CYCLONE_4_DATA": no such variable
Change-Id: I9289f20b1b58844ad87e5e9183e37ebf29ba1fa2
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10046
Tested-by: jenkins
Reviewed-by: Daniel Anselmi <[email protected]>
Reviewed-by: Antonio Borneo <[email protected]>
Move the configuration files into a dedicated vendor folder as required
by the developer guidelines. Additionally, move files from 'cpld' to 'fpga'
subfolder since the devices are FPGAs, not CPLDs.
Change-Id: I21481ec9c66efc9a7bdb1367687c29b29901e2fc
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10045
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
Move the utility files into a dedicated vendor folder as required by the
developer guidelines.
Change-Id: Ic6ebb24e06558733b08a0f2337bfa0ceafb053ca
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10032
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
Since commit 9a5de74423 ("transport: deprecate auto-selection of
transport"), auto-selection triggers a deprecation warning. Explicitly
select JTAG as transport for Xilinx FPGAs to resolve this warning and
remove the (now) unnecessary transport selection from the affected board
files.
Change-Id: I201b37f54aab5951b3b44e3e40ac217a1ac68849
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10031
Reviewed-by: Tomas Vanek <[email protected]>
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
Move the configuration files into a dedicated vendor folder as required
by the developer guidelines. Additionally, move files from 'cpld' to 'fpga'
subfolder since the devices are FPGAs, not CPLDs.
Change-Id: I8bb3686b4d59b285e7e53f9f238569f751ef2787
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10030
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
Move the configuration file into a dedicated vendor folder as required
by the developer guidelines.
Change-Id: Ia0eb415a1f69428c635093c6d542c09acd811e08
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10011
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
Move the configuration file into a dedicated vendor folder as required
by the developer guidelines.
Change-Id: I7a9c72e9bfca9578f1bc7fe394913437b796d6fa
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10010
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
Move the configuration file into a dedicated vendor folder as required
by the developer guidelines.
Some configuration file names are adjusted to match the vendor's
official names.
Change-Id: Ic64a94d4e4da92dd80200e9d0f30dda98bc0558b
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10009
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
Using an index number in the 'pld load' command has been deprecated in
commit 5ae0264055 ("pld: give devices a name for referencing in
scripts"). Adapt the example commands accordingly.
Change-Id: Iad1ea44341a6fc407b1284c8fdaf22b7da683486
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10018
Reviewed-by: Daniel Anselmi <[email protected]>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
riscv_enumerate_triggers() used trigger_tinfo[]
size to set r->trigger_count. Later code uses that
count to index trigger_unique_id[] as well, which
is bounded by RISCV_MAX_HWBPS rather than
RISCV_MAX_TRIGGERS, leading to crashes on OOB
accesses.
The out-of-bounds access could happen in loops such
as find_next_free_trigger(), which reads
trigger_unique_id[i], and
riscv_trigger_detect_hit_bits().
If the target reports more triggers than OpenOCD
supports, a warning is also logged.
Change-Id: Icbcd6cec0e1e9a8a44420f87288e52fd0f3542c3
Signed-off-by: Matthew Waltz <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9802
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
Reviewed-by: Evgeniy Naydanov <[email protected]>
An SWD transaction must be followed by another transaction or at least
8 idle clocks to clock data through the AP. Ensure a queue-ending transfer
gets those clocks, reusing its AP delay when possible.
Reserve space in the output FIFO for a possible trailing DITMS command.
Reported-by: Tomas Vanek <[email protected]>
Change-Id: I11e69ca7087bfc1d4e932476429f1925379abc88
Signed-off-by: Konrad Dybcio <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10033
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
According to Tomas Vanek:
enable_debug() is just a simplified version of halt command.
No idea why the Tcl re-implementation is necessary...
Change-Id: If1533ffac1d5e8537c5858e28d487aef84a5d572
Signed-off-by: Mark O'Donovan <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9632
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
The adapter driver leaked allocated memory and didn't close
fd if some init call failed.
Call spidev_quit() in such case, it is safe to call
in any state including partial initialization.
Change-Id: I4dbd8377ac8a7587db0b3ceac32776b417cfba9b
Signed-off-by: Tomas Vanek <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9988
Reviewed-by: Tomas Vanek <[email protected]>
Tested-by: jenkins
Reviewed-by: Richard Pasek <[email protected]>
If reset is configured with option connect_assert_srst, SRST signal
should be asserted early, best before init of other JTAG/SWD signals
to avoid conflict when both adapter and target device drive
the same wire.
Change the order of GPIO initialization in 3 bitbang drivers.
Change-Id: I35a0d566c68ecc52ad89822efeb534e3e91ce628
Signed-off-by: Tomas Vanek <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9927
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
If reset is configured with option connect_assert_srst, SRST signal
should be asserted early, best before init of other JTAG/SWD signals
to avoid conflict when both adapter and target device drive
the same wire.
Add setting of adapter_config.gpio init_state to
sync_adapter_reset_with_gpios().
Change-Id: I614800c2d6661113ce4d2497f31eaddea151e606
Signed-off-by: Tomas Vanek <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9926
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
Almost all of the JTAG drivers have a driver-local function
*_end_state().
Introduce a single function, tap_set_end_state_stable(), which will
be called by the individual drivers as soon as they have correct
error passing implemented.
Use it in cmsis_dap.c and jlink.c, and remove the driver-local functions.
Checkpatch-ignore: BAD_SIGN_OFF
Assisted-by: Github Copilot
Change-Id: I5b9aa64db555b301c6b61e05896a4a5b7da5f842
Signed-off-by: Tomas Vanek <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10000
Reviewed-by: Antonio Borneo <[email protected]>
Reviewed-by: Evgeniy Naydanov <[email protected]>
Tested-by: jenkins
Fix build warning
openocd.texi:10377: warning: `.' or `,' must follow @xref, not f
by adding a ','.
Fixes: b04ccfeff7 ("target: Add calculate_checksum command")
Change-Id: If7ca9a018beba4abdf1026cf776a32401eff0d85
Signed-off-by: Antonio Borneo <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10021
Tested-by: jenkins
The commit 4afd8852bb ("Remove remaining references to FTD2XX driver")
removed the 'usb_blaster device_desc' command but not all its
references.
Since the command has been already removed in 0.12, simply drop all
references.
Change-Id: I0977c4058ac5682be05f55063c9c636e4f32b08d
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10006
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
Reviewed-by: Antonio Borneo <[email protected]>
Move the configuration file into a dedicated vendor folder as required
by the developer guidelines.
Change-Id: Iacc728d5570df31d2a20df5e08051103909ca37c
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10005
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
Move the configuration file into a dedicated vendor folder as required
by the developer guidelines.
Change-Id: I7e3d7f48001deadcbf72bfcc8b05b2f963a7e34c
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/10004
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
JTAG transport related part of the driver used exit() calls
in case of errors. exit() was called even on libusb error
returned during data exchange with the adapter.
Pass error codes to the caller instead.
Change-Id: I7038613380ea775fc14fe6116c040a1e956e28d9
Signed-off-by: Tomas Vanek <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9967
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
This command allows to calculate the checksum of a memory region to
verify its contents against a known value. Unlike 'verify_image_checksum',
this command requires no file and accepts arbitrary memory addresses and
sizes.
Change-Id: I0f7309999bc7268e58af533695bcfaa3c1a5fc24
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9971
Reviewed-by: Antonio Borneo <[email protected]>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
Commit 181547327f ("target/breakpoints.c: add breakpoint intersection
detection") introduced is_memory_regions_overlap(). This function uses the
type 'target_addr_t' but does not include the required types.h header file.
Change-Id: Ib050eb2fd8618d2f4e43f1813a7075a99bb17158
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9970
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
The pair of commands 'fast_load' and 'fast_load_image' where
introduced in 2008 with [1] inside the 'ecosboard.c' file, part of
the obsoleted Zylin zy1000 project, then moved to target with [2].
The 'ecosboard' code was then dropped in 2012 with [3].
While the need to split the phases of file reading by OpenOCD from
target writing was probably relevant in the embedded context of
using 'ecosboard', this is now less relevant because OpenOCD runs
in an OS where file I/O is by far faster than the interactions
with the external probe (apart from slow remote filesystems, not
suitable for benchmarking).
To measure write performance, it's also much easier creating a Tcl
array of data and measure the speed of 'write_memory' command.
To reduce the maintenance effort, deprecate the two commands.
Drop the commands from the documentation.
[1] commit fb7189761d ("wip")
[2] commit 459d03e3bb ("fast_load profiling tool moved to target.c")
[3] commit 39650e2273 ("ecosboard: delete bit-rotted eCos code")
Change-Id: I1a53116093402c76afd7b3fc073a41e4a757c1a3
Signed-off-by: Antonio Borneo <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/9953
Reviewed-by: zapb <[email protected]>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>