It looks like a false positive.
Scan-build considers as possible to:
- have list_empty() return false;
- list_for_each_safe() to not execute any loop, thus not assigning
a non-NULL value to 'block';
- the NULL pointer 'block' is passed to list_del().
This is not possible because with list_empty(), the loop runs at
least once.
Rewrite the function to simplify the code and making it easier for
scan-build to check it.
This also drops an incorrect use of list_for_each_safe(), where
the 'safe' version was not required.
Change-Id: Ia8b1d221cf9df73db1196e3f51986023dcaf78eb
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 8d1dcf293a ("target/espressif: add application tracing functionality over JTAG")
Reviewed-on: https://review.openocd.org/c/openocd/+/7608
Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Tested-by: jenkins
When the function xtensa_queue_dbg_reg_read() returns error, the
array 'tmp' remains not initialized and scan-build complains while
computing buf_get_u32() that:
Result of operation is garbage or undefined
Check the returned value of xtensa_queue_dbg_reg_read() and
propagate it.
Change-Id: If0aaad068b97ef0a76560e262d16429afd469585
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 8d1dcf293a ("target/espressif: add application tracing functionality over JTAG")
Reviewed-on: https://review.openocd.org/c/openocd/+/7607
Tested-by: jenkins
Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Below warnings are fixed.
1- A function declaration without a prototype is deprecated in all
versions of C [-Werror,-Wstrict-prototypes]
2- error: variable set but not used [-Werror,-Wunused-but-set-variable]
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I1cf14b8e5e3e732ebc9cacc4b1cb9009276a8ea9
Reviewed-on: https://review.openocd.org/c/openocd/+/7569
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
ARMv8-R platforms are similar to ARMv8-A regarding
JTAG and most cpu registers. ARMv8-R doesn't has MMU
but has MPU instead.
ARMv8-R platforms can be AArch32 only such as Cortex-R52,
or AArch64 capable like Cortex-R82.
Signed-off-by: Julien Massot <julien.massot@iot.bzh>
Change-Id: Ib086f71685d1e3704b396d478ae9399dd8a391e1
Reviewed-on: https://review.openocd.org/c/openocd/+/6843
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Linux kernel and user space border is 0xc0000000 not 0xc000000
Signed-off-by: panciyan <panciyan@eswincomputing.com>
Change-Id: I6b487cce62ac31737deca97d5f5f7bbc081280f4
Reviewed-on: https://review.openocd.org/c/openocd/+/7570
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This feature allows to transfer arbitrary data between host and
ESP32 via JTAG.
The main use cases:
1- Collecting application specific data
2- Lightweight logging to the host
3- System behaviour analysis with SEGGER SystemView
4- Source code coverage
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I95dee00ac22891fa326915a3fcac3c088cbb2afc
Reviewed-on: https://review.openocd.org/c/openocd/+/7163
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Checkpatch-ignore: GIT_COMMIT_ID
Waiting for running state was removed from handle_resume_command()
in commit a92d27afb0 ("very long and bad structured commit msg
without anything relevant to resume") around year 2008.
Update the doc accordingly.
Silent checkpatch or we have to copy 10 or more lines
of the old commit msg.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I3296cb2c29cf80aeed63eddd8fbf352edec778c1
Reviewed-on: https://review.openocd.org/c/openocd/+/7579
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
They have an ir length of 22, 24 or 38 bit and different command codes.
Change-Id: I488e8613f1c4d017e1590111f60b2725ec62964b
Signed-off-by: Daniel Anselmi <danselmi@gmx.ch>
Reviewed-on: https://review.openocd.org/c/openocd/+/7387
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Add missing ID codes and ignore the version in the ID.
Change-Id: Idd2d3a5eddb6995f3af1c45afd2adf76ce3442bf
Signed-off-by: Daniel Anselmi <danselmi@gmx.ch>
Reviewed-on: https://review.openocd.org/c/openocd/+/7386
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
On MacOS libc includes files from MacOSX.sdk that define the macro
#define __nonnull
without arguments, causing compile error.
Extend the existing check for clang on MacOS and undefine the
macro for gcc too.
Change-Id: Ic99de78348c6aa86561212a3aded9342e5d32e02
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reported-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7571
Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Tested-by: jenkins
Minor changes due to kernel switch to 100 char/line.
Added four new functions.
Silent checkpatch; we don't want to diverge from Linux reference
code.
Checkpatch-ignore: MACRO_ARG_REUSE, UNNECESSARY_PARENTHESES
Checkpatch-ignore: MACRO_ARG_PRECEDENCE
Change-Id: I1d2ff25bf3bab8cd0f5c9be55c7501795490ea75
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7568
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The file list.h is taken from Linux and includes two similar
implementation of double linked lists:
- with single linked list's head (hlist_*), and
- with double linked list's head (list_*).
While the former offers a minor memory footprint improvement,
keeping two implementations makes harder for newbie developers
to approach them.
So far only the latter implementation has been used and no new
patches in gerrit is going to change that.
Drop the support for lists with single linked head.
It can be easily taken back from git history, if needed.
Change-Id: I420e5de38ab755fdfbeb2115538c61818308ec2b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7567
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Add the fast read method to speed up flash verification
after programming. Works the same as fast write already
implemented.
Signed-off-by: François LEGAL <devel@thom.fr.eu.org>
Change-Id: I74611a3542a88212f0483ec8ee368aba3d1f03c7
Reviewed-on: https://review.openocd.org/c/openocd/+/7564
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The condition to check if the workspace area (used by actual MIPS code
executed on target) and data area (sandbox to put data to be read/written
to/from flash) is wrong, thus preventing the use of FAST_* commands to
program/verify FLASH.
Signed-off-by: François LEGAL <devel@thom.fr.eu.org>
Change-Id: Ic68424b7f42d44e550433a120093db5e7980fd56
Reviewed-on: https://review.openocd.org/c/openocd/+/7563
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
1.
update the rtos->thread_count in time, to make sure the allocated
thread_name_str and extra_info_str could be freed by
rtos_free_threadlist(). Otherwise the abnormal return may cause a
memory leak.
2.
remove a redundant assignment to threadid.
Signed-off-by: Chao Du <duchao@eswincomputing.com>
Change-Id: Ifabc59d501c925b3d6aec8b04b2856d2c31cc4e2
Reviewed-on: https://review.openocd.org/c/openocd/+/7549
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Libjaylink submodule disabled by default at
https://review.openocd.org/c/openocd/+/7129
--enable-internal-libjaylink config option will be deprecated soon.
So, building the source is a permanent solution.
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: Id06654d806a3a49f35e3ba41e9e4cc58c1a0d388
Reviewed-on: https://review.openocd.org/c/openocd/+/7552
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
During setup job in the GH actions, GH tries to resolve
all actions before starting to run the scripts.
It can not find 0.2.0 version inside
'dev-drprasad/delete-tag-and-release 'repo and action fails.
This patch fixes that error.
Also, switched to the latest ubuntu image
Hidapi version updated to 0.13.1
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I02af41f6189d5a28f874c9b008073d74de46b4ca
Reviewed-on: https://review.openocd.org/c/openocd/+/7551
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
If the file read abnormally, need to close it which was opened before.
Signed-off-by: panciyan <panciyan@eswincomputing.com>
Change-Id: I6142f154741dcd38088b7add2793219ee4dd2ae9
Reviewed-on: https://review.openocd.org/c/openocd/+/7546
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
The old configuration files did not work because of a missing
'at91sam9260minimal.cfg' file. Also, the config files were placed
wrongly. Update them, put them to the proper location, merge the two
supported boards into one, remove now superfluous include, remove
defunct web page, etc.. Tested with a Calao USB-A9G20 and a hacked
'device_desc' to match. Native support for it will come next.
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Change-Id: Iec578c8777c5a6134e132dbac17c2988c7634742
Reviewed-on: https://review.openocd.org/c/openocd/+/7522
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This also fixes an incorrect return ERROR_xx from a jim command,
propagated from return value of rtos_smp_init().
Change-Id: Icf4893c00aabd8fadd60077c5e8a2e926f687518
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7511
Tested-by: jenkins
Print one entry per line.
While there add the mandatory 'usage' field.
Change-Id: Ia832684817f3bdbfa4cb943cd97e3f9fb2605902
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7510
Tested-by: jenkins
Print one entry per line.
While there add the mandatory 'usage' field.
Change-Id: I135556e12154e33fdbd0f71d89f6fe37c69813b7
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7509
Tested-by: jenkins
While there add the mandatory 'usage' field.
Change-Id: I3e5b826ca58f7ade30a443ada0cb4a9cd9ea35c2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7508
Tested-by: jenkins
While there add the mandatory 'usage' field.
Change-Id: I5389881dac25877dc32930ec36ee546e48ecc14d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7507
Tested-by: jenkins
While there, fix typo on 'exceeds'.
In a following patch, the output could be formatted and split in N
values per line to make it easier to read by humans.
Change-Id: I295111a80934393011e46311f6cf6c13f2bdc0a3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7503
Tested-by: jenkins
While there, format in a human readable way the output list by
using one line per tpiu name.
Change-Id: I937c92b6c1e92509cf8aa96be1517a51bc363600
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7501
Tested-by: jenkins
While there, format in a human readable way the output list by
using one line per dap name.
Change-Id: I24a47350105b90db15808c61790f05d807120739
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7498
Tested-by: jenkins
While there:
- check the number of command parameters;
- add the mandatory 'usage' field.
Change-Id: I7cd16f049753caedf19f313f7dc84be98efdba42
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7497
Tested-by: jenkins
While there add the mandatory 'usage' field.
Change-Id: I316fb31e24e94985dcc724e428b0384be7ef5bdd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7496
Tested-by: jenkins
While there add the mandatory 'usage' field.
Change-Id: I3491ed79d11c5a3e81cc9afd2423da14b8df72ff
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7495
Tested-by: jenkins
While there:
- format in a human readable way the output list by using one line
per tap name;
- add the mandatory 'usage' field.
Change-Id: I295449220c78fac8973478b265413342ea832f61
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7494
Tested-by: jenkins
While there, format in a human readable way the output list by
using one line per cti name.
Change-Id: I6d4870ee512fe7e6935d73355c2377ad805ccc3b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7492
Tested-by: jenkins
While there, add a check for target halted and check the number of
parameters accordingly to the command name.
Change-Id: I9e8bb109c35039561997d14782fac682267aee65
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7491
Tested-by: jenkins
This also fixes an incorrect return ERROR_TARGET_NOT_HALTED from a
jim command.
Change-Id: I99a02a21bedb64e60944e295c7cf24356e07be60
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7490
Tested-by: jenkins
This also fixes a mistake of the jim command returning ERROR_xx
when function rtt_read_channel_info() returns error.
While there:
- format in a human readable way the output dictionary list, while
preserving the structure of its TCL data;
- add check for the number of parameters.
Change-Id: Ica2b623699d3a606d3992975c836dae96f74b26d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7489
Tested-by: jenkins