Antonio Borneo [Sun, 6 Apr 2025 12:59:50 +0000 (14:59 +0200)]
flash: stellaris: fix deprecated command
The driver directly runs a TCL command that has been renamed with
commit 4d99e77419e3 ("jtag/hla: Restructure commands"), while the
original name has been deprecated.
Junhui Liu [Wed, 26 Mar 2025 15:05:39 +0000 (23:05 +0800)]
tcl/target: Add RCPU support for Spacemit K1
Add support for the Real-Time CPU (RCPU) of K1, which is a 32-bit RISC-V
N308 High-Efficiency Processor Core designed by Nuclei System Technology
Co. Ltd.
The JTAG interface can be configured to connect to either X60s or RCPU
processors. To enable JTAG for RCPU, set TARGET to "rcpu".
Antonio Borneo [Sun, 3 Dec 2023 14:41:27 +0000 (15:41 +0100)]
target: rewrite function target_configure() as COMMAND_HELPER
The function target_configure() is used by the commands
'target create', 'configure' and 'cget', already rewritten as
COMMAND_HANDLER.
Rewrite the common function as COMMAND_HELPER.
While there:
- fix the check on arguments, even if it should be coded better;
- keep jimtcl code for target_type::target_jim_configure() and for
rtos_create(); these would be rewritten later on.
Change-Id: I7e5699ca6d124e34d3b2199714e3ce584bfcce80 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8829 Tested-by: jenkins
Antonio Borneo [Sat, 2 Dec 2023 17:40:47 +0000 (18:40 +0100)]
target: rewrite command 'invoke-event' as COMMAND_HANDLER
The command shares with command 'target create' the
struct jim_nvp nvp_target_event[]
- Convert the 'struct jim_nvp' in 'struct nvp'.
- Create an alias 'struct jim_nvp' to decouple the commands
'invoke-event' and 'target create', abusing the fact that the
actual layout of the two struct's type is the same. This alias
will be dropped in a following change.
- Rewrite the command 'invoke-event' and the helper function
target_event_name().
Change-Id: I537732fe4c08042cc02bcd0f72142254d7968fa6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8826 Tested-by: jenkins
Antonio Borneo [Sat, 5 Apr 2025 23:20:44 +0000 (01:20 +0200)]
target: don't free working areas during 'configure -chain-position'
Since commit ef1cfb23947b ("Duane Ellis: "target as an [tcl]
object" feature.") merged in 2008, the commands:
$target_name configure -chain-position ...
target create ... -chain-position ...
cause the allocated working area to be freed.
There is no reason for this, it is probably caused by an incorrect
copy/paste from the author.
Drop the call to target_free_all_working_areas().
Change-Id: I61a9303afe7fee6953669218330635c0b965b20d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8825 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
Antonio Borneo [Sat, 5 Apr 2025 15:04:43 +0000 (17:04 +0200)]
list: silent scan-build false positive
With commit c023534e7b6f ("target: use list for target events")
scan build incorrectly states that list_add() would be called with
the field 'next' of the parameter 'head' (thus 'head->next') set
to NULL. Then, list_add() would call linux_list_add() with the
parameter 'next' set to NULL that will cause a NULL dereference.
While this can really happen with broken code, it's not the case
with the code from the change above.
Add assert() in linux_list_add() to silent scan build on this
false positive and to detect future incorrect use of the list.
Change-Id: Iec7f3d70237312b646ac58f76ecaab2fa25eab41 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8824 Tested-by: jenkins
Antonio Borneo [Sat, 2 Dec 2023 16:34:57 +0000 (17:34 +0100)]
command: rewrite command 'capture' as COMMAND_HANDLER
While there, use Jim_EvalObj() to execute the subcommand, so any
error will correctly report the TCL file and the line number that
have originated the error, instead of the silly:
> capture {bogus command}
command.c:703: Error: invalid command name "bogus"
at file "command.c", line 703
Change-Id: Ic75a6146d6cedf49e808d98501fa1a7d4235b58a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8587 Tested-by: jenkins
Sofiane HAMAM [Fri, 28 Mar 2025 11:31:17 +0000 (12:31 +0100)]
Makefile.am: Use SOURCE_DATE_EPOCH environment variable
This package defines PKGBLDDATE as build timestamp which makes
it non reproducible. Use SOURCE_DATE_EPOCH if it is found, otherwise
use build timestamp. Following best practices, see :
https://reproducible-builds.org/docs/source-date-epoch/
Antonio Borneo [Sun, 23 Mar 2025 14:27:37 +0000 (15:27 +0100)]
target: remove events that are set to empty string
Current code allows replacing the body of an existing event, but
it doesn't provides a way to remove it.
Replacing the event with an empty string makes the event still
present and visible through
$target_name eventlist
The presence of empty events makes more complex checking for the
event not set or set to empty.
Remove the event when set to empty string.
While there, add 'Jim_Length' to the list of allowed CamelCase
symbols, avoiding the associated checkpatch error.
Change-Id: I1ec2e1a71d298a0eba0b6863902645bcc6c4cb09 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8814 Tested-by: jenkins
Antonio Borneo [Sun, 16 Mar 2025 10:50:04 +0000 (11:50 +0100)]
target: drop last instances of 'target->cmd_name'
The helper function 'target_name()' or, better, the log functions
'LOG_TARGET_xxx(target, ...)' should be used in place of taking
the target name directly from 'target->cmd_name'.
Replace the remaining instances in the code.
While there:
- address some indentation,
- drop trailing punctuation in log message,
- replace one LOG WARNING with LOG_TARGET_WARNING.
Antonio Borneo [Sat, 2 Dec 2023 15:50:14 +0000 (16:50 +0100)]
command: factorize jim_command_mode()
During 'help' dump, to determine the mode (e.g. COMMAND_CONFIG) of
a command, the current code executes the OpenOCD TCL command
"command mode", while it could directly call the implementation of
the TCL command above.
Factorize jim_command_mode() and call the inner implementation
instead of executing "command mode".
Antonio Borneo [Sat, 30 Nov 2024 23:01:00 +0000 (00:01 +0100)]
adapter: simplify command 'adapter list'
The code of command 'adapter list' is called by command 'adapter
driver' to list the available drivers in case of error.
This dual possible entry points require a conditional check on the
number of command line arguments, reducing the code readability.
Split the command in a simpler code for the command 'adapter list'
that only checks the command line, and move in a common helper the
code that list the drivers.
While there, fix the output and the comments to report 'adapter
driver' instead of 'debug adapters'; we are not parsing the HW to
know which adapter is present.
Change-Id: I17538e86dc4a31a9589d404e49dcc65a29393390 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8672 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Antonio Borneo [Sun, 22 Dec 2024 16:13:59 +0000 (17:13 +0100)]
adapter: drop command 'adapter transports'
The commit 93f2afa45f4c ("initial "transport" framework") that
added the transport framework in 2010 was overly optimistic on the
possibility to dynamically add, at runtime, a new adapter and to
specify with the command 'adapter transports' the list of the
transports supported by the new adapter.
Such feature has never become part of OpenOCD, and the command
above has never become useful nor ever been used.
Drop the command 'adapter transports' and its documentation.
Drop the helper 'transport_list_parse', now unused.
Change-Id: Ie3d71c74d068fba802839b116bb9bc9af77cc83d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8671 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
Antonio Borneo [Mon, 23 Dec 2024 19:59:28 +0000 (20:59 +0100)]
doc: drop mention of not implemented SPI transport
The commit 93f2afa45f4c ("initial "transport" framework") adds a
dedicated chapter in the documentation about a possible SPI
transport for flashing.
This transport has never been part of OpenOCD and should not be
listed in the documentation.
Drop the chapter.
Change-Id: I9b406754399abda4dc7c2f8cf09dd47730a7e1d9 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8670 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
Evgeniy Naydanov [Fri, 14 Feb 2025 16:20:58 +0000 (19:20 +0300)]
helper/log: mark `fmt` argument of `alloc_vprintf()` as format string
Building on Ubuntu 22.04 with `-fsanitize=undefined` (GCC 12.3.0)
results in an error:
Checkpatch-ignore: COMMIT_LOG_LONG_LINE
```
In file included from /usr/include/stdio.h:894,
from <openocd>/src/helper/system.h:23,
from <openocd>/src/helper/replacements.h:18,
from <openocd>/src/helper/log.c:20:
In function ‘vsnprintf’,
inlined from ‘alloc_vprintf’ at <openocd>/src/helper/log.c:347:8:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:85:10: error: null format string [-Werror=format-truncation=]
85 | return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86 | __glibc_objsize (__s), __fmt, __ap);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
The error mentiones the call site `src/helper/log.c:347`. There
`vsnprintf()` is called passing `fmt` as format string.
To mitigate this, mark the format string with the corresponding
attribute in `alloc_vprintf()`
Shivasharan Nagalikar [Wed, 19 Feb 2025 08:28:43 +0000 (13:58 +0530)]
tcl/target/ti_k3: Add support for AM261
AM261[1] is a optimized cutdown of AM263P SoC. The key difference is
the reduced number of R5F cores which is now dropped down to 2, and
the DIE ID is different from AM263p, but all other definitions are
compatible, so reuse the definition.
Shivasharan Nagalikar [Wed, 19 Feb 2025 08:27:35 +0000 (13:57 +0530)]
tcl/target/ti_k3: Add support for AM263P
AM263P[1] adds additional features to AM263 SoC. [2] provides a
detailed list of differences, however, the key difference from
processor usage perspective is the increased SRAM and Remote L2(RL2)
Cache for improved performance of R5F. To differentiate the DIE ID
is different, however rest of the processor description remain
compatible to AM263, hence reuse the definition.
Shivasharan Nagalikar [Wed, 19 Feb 2025 08:23:03 +0000 (13:53 +0530)]
tcl/target/ti_k3: Add support for system reset using powerAP
TI K3 Debug systems have a Power Access Port (Power-AP) which allows
for functionality such as reset via debugger that using the SPREC
register. SoCs/Boards that do not have support for SRST or TRST can
make use of this to force a system reset via debug access.
Add basic connection details for TI's MSPM0 Launchpad series of
evaluation kits:
https://www.ti.com/tool/LP-MSPM0L1306
https://www.ti.com/tool/LP-MSPM0C1104
https://www.ti.com/tool/LP-MSPM0G3507
Change-Id: I33499f2d5fef846185ff6c330f9bfd0251117eb6 Co-developed-by: Henry Nguyen <h-nguyen8@ti.com> Signed-off-by: Henry Nguyen <h-nguyen8@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8386 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
flash/nor: Add basic support for TI's MSPM0L/G family
Add basic flashing support for Texas Instruments MSPM0L, C and G
family of Cortex-M0 based micro-controllers.
This initial basic flashing support allows for controlling protection,
erase, write and read of non-main flash region.
This has been tested with:
* Valgrind (3.22.0):
valgrind --leak-check=full --show-leak-kinds=all \
--track-origins=yes --verbose
* Ubuntu clang version 20.0.0
(++20241014053649+ed77df56f272-1~exp1~20241014053827.1987)
Valgrind-clean, no new Clang analyzer or sparse warnings have been
introduced.
Change-Id: I29b8055ea6da9c38c5b7b91bea1ec7581c5bc8ff Co-developed-by: Henry Nguyen <h-nguyen8@ti.com> Signed-off-by: Henry Nguyen <h-nguyen8@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8384 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: zapb <dev@zapb.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tomas Vanek [Mon, 17 Feb 2025 11:15:09 +0000 (12:15 +0100)]
drivers/cmsis_dap: fix misleading error selecting not compiled backend
If one of CMSIS-DAP backends was not compiled (due to
missing library or configure --disable-cmsis-dap) and
Tcl config explicitly selected it, a misleading message
"invalid backend argument to cmsis-dap backend <backend>"
was printed.
Create dummy backends in struct cmsis_dap_backend
to replace a not built backend.
Check for NULL open backend method to distinguish
the backend is dummy.
Rework 'cmsis-dap backend' command to honour dummy
backend. While on it print more helpful error messages.
Change-Id: I8f12aeaaecf19302032870bc232e5135c1d935e7 Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8760 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Jim Paris [Fri, 21 Feb 2025 17:33:45 +0000 (12:33 -0500)]
gdb_server: fix invalid free
`gdb_service_free` calls `free(gdb_port_next)`, so this needs to be an
allocated string. Otherwise we trip up detectors like Android's tagged
pointers.
Change-Id: Ib08ea55a38af4e15c4fbae95f10db0e3684ae1af Signed-off-by: Jim Paris <jimparis@meta.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8768 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Marek Kraus [Sat, 23 Nov 2024 14:54:26 +0000 (15:54 +0100)]
tcl/target: add Bouffalo Lab BL602 and BL702L chip series support
BL602, BL702 and BL702L series of chips are sharing same architecture,
so they all need same software reset mechanism as well.
Only difference (in terms of configuration needed for JTAG) are TAP ID,
workarea address and size. This is addressed by creating bl602_common.cfg
tcl file, which contains all those common stuff between the chips.
The script is prefixed by bl602, as this was
first *publicly* available chip from Bouffalo with this architecture.
This patch also improves reset mechanism. Previous reset mechanism did not
worked properly when slower JTAG adapter was used (it attached too late).
New reset mechanism uses various methods to keep CPU in BootROM, until
the JTAG adapter does not attach again after reset. Additionally,
we trigger SW Reset by directly using DMI commands to write to register
with system bus method, to avoid getting error about unsuccessful write.
The new method works on both FT232H (8MHz JTAG clock) and
unnamed CMSIS-DAP dongle (1.5MHz JTAG clock).
Change-Id: I5be3694927793fd3f64c9ed4ee6ded2db0d25cae Signed-off-by: Marek Kraus <gamelaster@outlook.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8593 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tomas Vanek [Sat, 15 Feb 2025 07:11:02 +0000 (08:11 +0100)]
drivers/linuxspidev: fix compilation on Linux older than 3.15
Although the commit [1] which introduced SPI_IOC_WR_MODE32 is 10 years
old, some hardware may enforce old Linux because the vendor
didn't bother with system updates.
Change-Id: I76d0b38c8646b1be329418860916b9f01b90990d
Link: [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/include/uapi/linux/spi/spidev.h?h=linux-3.15.y&id=dc64d39b54c1e9db97a6fb1ca52598c981728157 Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8759 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Evgeniy Naydanov [Wed, 12 Feb 2025 18:12:30 +0000 (21:12 +0300)]
flash/nor/rsl10: drop unused `rsl10_info` in `rsl10_protect_check()`
`struct rsl10_info *chip` is only used in `rsl10_protect_check()` in an
assertion triggerring `-Wunused-variable` when compiled with `DNDEBUG`.
Drop it.
Antonio Borneo [Thu, 6 Feb 2025 10:48:30 +0000 (11:48 +0100)]
build: drop space after 'angie' folder name
The makefile consider the two white spaces between the end of the
folder name and the '#' character for the beginning of the comment
as part of the folder name.
This cause 'make install' to create a folder named 'angie ' that
is not welcome on all the OS.
Drop the comment and the space after the folder name.
Tomas Vanek [Mon, 3 Feb 2025 20:45:07 +0000 (21:45 +0100)]
jtag/core: fix segfault when adapter driver has no reset method
xlnx-pcie-xvc and linuxspidev adapter drivers does not implement
the reset method.
Although it is likely both adapters will implement the method in
the near future, avoid segfault and return an error instead.
Change-Id: If8ddf165dbc563cf6d64b2094968151075778ba7 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Fixes: commit 8850eb8f2c51 ("swd: get rid of jtag queue to assert/deassert srst")
Reviewed-on: https://review.openocd.org/c/openocd/+/8735 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
The Automake manual states: "The user can still extend or override
the flags provided there by defining the DISTCHECK_CONFIGURE_FLAGS
variable". Overriding variable DISTCHECK_CONFIGURE_FLAGS in Makefile.am
makes it impossible for the user to do that. I discovered this
when trying to pass --enable-internal-jimtcl to distcheck.
Change-Id: Ibe5b1f23ccf3fbaa21c48b574a1b3f3e9f6fb916 Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8724 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Daniel DeGrasse [Fri, 17 Jan 2025 03:33:48 +0000 (22:33 -0500)]
target/arc: allow reading memory while target runs
There is no reason that ARC can't support reading from memory over JTAG
while the target is executing, and this is in fact required for RTT
support. Remove this check from arc_mem_read and arc_mem_write
Change-Id: I2accfb4b99bf77c5473d133623e0eb0632cb45f6 Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8721 Tested-by: jenkins Reviewed-by: Evgeniy Didin <didin@synopsys.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Fri, 10 Jan 2025 16:11:24 +0000 (17:11 +0100)]
checkpatch: enable check for new typedefs
We should strictly check for every new typedef.
Let checkpatch detect them and let developer use
Checkpatch-ignore: NEW_TYPEDEFS
if it's really needed to add a new typedef.
With this change chackpatch will not complain for typedef on
function's type but only on enum, struct, variable's type.
Antonio Borneo [Fri, 10 Jan 2025 14:01:20 +0000 (15:01 +0100)]
target: esp_algorithm: drop useless typedefs
There is no need to use extra typedef for the functions in struct
esp_algorithm_run_data.
Declare the type of the functions in the struct.
Split the comment lines to stay in the line limits.
Richard Pasek [Thu, 30 Jan 2025 10:38:08 +0000 (05:38 -0500)]
driver/linuxspidev: Clear queue on allocation
SWD idle clocks are added to the queue by advancing the queue index
assuming the queue is zeroed. If the queue isn't zeroed, these idle
clocks end up being filled with junk data. Lets clear the queue and
associated buffers on queue allocation.
TEST: Connects successfully and ran the following TCL command:
dump_image /dev/null 0x20000000 0x42000
Host: Unnamed Qualcomm SoC with QUPv3 based SPI port
Target: RT500
Signed-off-by: Richard Pasek <rpasek@google.com>
Change-Id: Ie660c10c27c4d0937ab0629138935ddbf5aeb0ae Fixes: 83e0293f7ba3 ("Add Linux SPI device SWD adapter support")
Reviewed-on: https://review.openocd.org/c/openocd/+/8730 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Jonathon Reinhart <jrreinhart@google.com> Tested-by: jenkins
Tomas Vanek [Mon, 3 Feb 2025 19:28:49 +0000 (20:28 +0100)]
drivers/linuxspidev: fix use of uninitialized speed variable
Valgrind reported
== Syscall param ioctl(generic) points to uninitialised byte(s)
== at 0x4ABF990: ioctl (ioctl.S:26)
== by 0x19D00B: spidev_speed (linuxspidev.c:181)
== by 0x19D00B: spidev_init (linuxspidev.c:307)
Indeed, spidev_init() uses adapter_get_speed(), it calls
adapter_khz_to_speed() and it returns early without setting
the output parameter if adapter is not initialized.
Of course the adapter initialized flag is not set until
spidev_init() returns.
Simply drop this code as the adapter infrastructure initializes
adapter speed just after spidev_init() return.
Change-Id: I26f011ae59fc942a34d9bb517f467c22f735091d Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Fixes: 83e0293f7ba3 ("Add Linux SPI device SWD adapter support")
Reviewed-on: https://review.openocd.org/c/openocd/+/8733 Tested-by: jenkins Reviewed-by: Richard Pasek <rpasek@google.com>
Driver for DesignWare SPI controller, found on many SoCs (see compatible
list in Linux device tree bindings
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml). This
implementation only supports MIPS as it was the only one available for the
tests, however, adding support for other architectures should require only
few adjustments. Driver relies on flash/nor/spi.h to find Flash chip info.
Driver internal functions support 24bit addressing mode, but due to
limitations of flash/nor/spi.h, it is not used. The reported writing speed
is about 60kb/s.
Lint, sanitizer and valgrind reported warnings were not related to the
driver.
Marc Schink [Wed, 26 Jun 2024 13:50:45 +0000 (15:50 +0200)]
bootstrap: Do not set up Git submodules by default
Building OpenOCD with jimtcl and libjaylink Git submodules is deprecated
and will be removed in the upcoming releases. The remaining 'git2cl'
submodule is only required during the OpenOCD release process.
Only set up Git submodules when the 'with-submodules' argument is used,
for example during the OpenOCD release process or for the transition
period until all submodules are replaced by external dependencies.
We keep the existing 'nosubmodule' argument in order to not break
automatic testing with Jenkins.
Change-Id: Ia4fd765e3a2d6b2c40b084a1ffdf919d5f4f35bb Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8381 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Marc Schink [Tue, 2 Jul 2024 15:12:46 +0000 (17:12 +0200)]
Deprecate jimtcl Git submodule
jimtcl was integrated as Git submodule for convenience and probably also
because packages were not widely available at the time. Today, jimtcl is
available in many popular package repositories [1] and the integration
as Git submodule adds unnecessary complexity to the OpenOCD build
process. For details, see the discussion on the mailing list in [2].
Disable the jimtcl Git submodule by default and announce it as
deprecated feature that will be removed in the next release. This gives
package maintainers time to adapt to the change and, if necessary,
build a package for jimtcl.
Antonio Borneo [Tue, 20 Feb 2024 02:11:07 +0000 (20:11 -0600)]
helper/log: Fix build using _DEBUG_FREE_SPACE_
The glibc API 'mallinfo' is deprecated and the new 'mallinfo2'
should be used from glibc 2.33 (2021-02-01).
Throw an error when '--enable-malloc-logging' is used on systems
that compile without glibc.
Detect the glibc version and, for backward compatibility, define
'mallinfo2' as the old 'mallinfo'. Define a macro for the format
of 'fordblks'.
Change-Id: I68bff7b1b58f0ec2669db0b911f19c1c5a26ed30 Reported-by: Steven J. Hill <steven.hill@konsulko.com> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8589 Tested-by: jenkins
Antonio Borneo [Sun, 17 Nov 2024 20:35:45 +0000 (21:35 +0100)]
configure: make more robust the check for elf 64
The check if 'elf.h' defines the type 'Elf64_Ehdr' is currently
done through 'grep' on the file. While there is no false positive,
so far, such test could incorrectly find the text inside a comment
or in a block guarded by #if/#endif.
Use the autoconf macro AC_CHECK_TYPE() to detect if the type is
properly declared.
Change-Id: Ibb74db3d90ac6d1589b9dc1e5a7ae59e47945e78 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8591 Tested-by: jenkins