Similar as virtual flash but has write/erase suppressed.
'virtual' flash driver name check in flash_free_all_banks()
was replaced by a customized free_driver_priv()
Change-Id: I528760aad0ba55ebc57fc1fabfdfdf07c92cac94
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/5107
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
The only reason to define a read-only region is that gdb needs
a complete memory map to choose hard or soft breakpoints properly.
Change-Id: I9d05cb6b91f054ad5cc9333af6b14eb433dbdc99
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/5106
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
The functions in struct target_type::blank_check_memory() return
either an OpenOCD error or a positive value that indicates the
number of blocks checked.
To prevent the mix of error codes and returned values, return the
value through an additional parameter 'checked' and then return
ERROR_OK.
While there:
- change to unsigned int the parameter 'num_blocks';
- in armv7m_blank_check_memory() verify that the working area can
contain at least two 'algo_block'.
Change-Id: Ie22f5816819bc77ec611c3f251373d026ed9f784
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9386
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The MSPM0 devices support only SWD.
Drop swj support, add swd support.
This also gets rid of the following warnings:
Warn : DEPRECATED: auto-selecting transport "swd". Use 'transport ...
Warn : Transport "swd" was already selected
Tested by programming/verifying firmware on LP-MSPM0G3519 dev board.
Change-Id: Ieafd9c4691343124b2dfb2daa1c0d3a96b13e485
Signed-off-by: Mikhail Iakhiaev <iakhiaev@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9413
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
1. Added comments like /* MSPM0G310x-Q1 */ to the parts table
based on the datasheet the parts came from.
2. Sorted the MSPM0G310x-Q1 device lines alphabetically: this is
how all other MSPM0G parts are organized.
Change-Id: I90d0f44289a538667c4ad0f23d44581f3c65d0c8
Signed-off-by: Mikhail Iakhiaev <iakhiaev@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9419
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Nishanth Menon <nm@ti.com>
.editorconfig is supported out-of-the box by many editors (vim, vscode,
etc...). This file prevent new comers to do mistake with their editor
configuration.
Change-Id: I60c3dedc20161883f388af6f1cb9b95b90beff2a
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9454
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
The 'dap info' command was not checking that the target was
an ARM before dereferencing the `arm` pointer. This would
cause a crash if the current target was (say) a mem_ap.
Add 'target_to_dap' function to safely get the dap
Change-Id: I0c765f915f2ef7b9a7d20c934e144559ca4e5f1c
Signed-off-by: Grant Ramsay <grant.ramsay@hotmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8415
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The incremental counter of logged lines is a signed int.
Change it to unsigned, since negative values has no sense in this
context.
Change-Id: Ia75f9ca038bba385c5f88fb9fa368faaf055f9a3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9401
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Tested-by: jenkins
Like for Cortex-M7, also Cortex-M85 prevents detecting the cache
properties when the CPU is kept under reset.
Extend to Cortex-M85 the same deferred mechanism already in place
for Cortex-M7.
Change-Id: Id274bb6c0b46c568554eed9671ef690c34cf7cfa
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9397
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Marc Schink <dev@zapb.de>
Previously, configure.ac only checked whether glibc was available,
but other C runtime libraries like Newlib have mallinfo too.
This is a first step to remove configuration option --enable-malloc-logging
and replace it with a debug level configurable at runtime.
Change-Id: If30fc98a84158459e222fddf08043f46d6fa4112
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9394
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Document the OpenOCD installation with specific examples for package
managers and move the installation section to the beginning of the
document to make it more prominent.
Change-Id: I86e175fdd4060b49070a5c8d2b92ec1c6cfe6acf
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9395
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The function free_service() does not close the TCL socket when the
service is shutdown.
Add the necessarily code.
Change-Id: I58c5c4fee3111949fcc143c6226522c29d976493
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9376
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
During JSP service start, check that memory is properly allocated
and if add_service() fails release the allocated memory.
Change-Id: I7eb2ea8a10dbeccd27fd39485080552c5d0736d3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9375
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
During GDB service start, check that memory is properly allocated
and if add_service() fails release the allocated memory.
While there, modify the code following the coding style.
Change-Id: Iebd1481a82f7391c110c5f6ad9878ba4abf052b3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9374
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The function add_service() can return on error when cannot create
the new service. In this case the caller cannot assume that the
parameter 'priv' has been taken in consideration and it should
take care of free() it.
To avoid a double free(), add_service() should not free() the
parameter 'priv' if it exits with error.
Replace the call to free_service() with a dedicated exit path on
error.
Change-Id: I340ec3ee46f471f31170c6717ed74fb632f0da20
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reported-by: Karl Palsson <karlp@tweak.au>
Fixes: 171454fffa ("server: fix a new double free()")
Fixes: 5ff384be08 ("semihosting: fix memory leak and double free")
Reviewed-on: https://review.openocd.org/c/openocd/+/9372
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Wrap the name field in braces when formatting the flash list Tcl structure
so that Tcl does not interpret backslash escape sequences.
This ensures Windows paths are preserved verbatim in the output and
can be reliably matched in Tcl scripts.
Fixes: 80fc9fabc6 ("flash: nor: rewrite command 'flash list' as COMMAND_HANDLER")
Change-Id: Ibd0a4b292828f084122e4a02732dc69ac0885f3c
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9360
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Move the configuration files into a dedicated vendor folder as required
by the developer guidelines.
Change-Id: I9ed39e32b6281a9cb8510914690f3f7751b795c8
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9271
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Corrected the include path for max32xxx_common.cfg in some files.
Cleaned up and standarised some comments in the max32... files.
Change-Id: I94dcc7ba6868bdd9730f03d3aa76fcdbbae33c3e
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9323
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The assignment of adapter speed 500 was getting overwritten when
max32xxx_common.cfg is sourced at the end.
Also removed incorrect comment.
Change-Id: I49d69073d93dedf28ed69d63ece35758f4707137
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9322
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Use the new adapter I/O log level to more easily distinguish
adapter I/O messages from other debug messages.
Change-Id: Ib3aa2bf84871c038aef937452cfeb28de232d821
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9387
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Prepare to add stm32wba6x support.
The OTP address is different between the stm32wb5xxx and stm32wb6xxx
microcontrollers, so the configuration file can't be the same for both.
Change-Id: Ib7485e0211779d98cca56e73397197b712460c69
Signed-off-by: Guillaume Faussard <guillaume.faussard@withings.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9326
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
There are two allocated fields that are never freed,
contiguous_regs_desc and contiguous_regs_list.
Additionally, prevent memory leaks and invalid accesses
when xtregs command is called repeatedly.
Change-Id: Id6ab4a2565ddb19e1e9d3f1c3b822182b3a6fb9d
Signed-off-by: Samuel Obuch <samuel.obuch@espressif.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9113
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Ian Thompson <ianst+cdns@cadence.com>
PIC32CZ CA70 family from Microchip is both binary and pin to pin
compatible with Atmel's SAM series, therefore the same driver
can be used.
Tested on PIC32CZ CA70 Curiosity evaluation kit with ST-Link interface.
Change-Id: I89a760c776a7c043c133bad058a9f5850a878676
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9109
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
This commit prevents NULL dereference during malloc
failure on stm32x bank command.
Change-Id: Ib348a1863aee5f8ed9d1699d203cdc4c83557628
Signed-off-by: Igor Cudnik <igor@its.rel.pl>
Reviewed-on: https://review.openocd.org/c/openocd/+/9379
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins