aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Doxyfile.in4
-rw-r--r--Makefile.am5
-rw-r--r--NEWS2
-rw-r--r--README48
-rw-r--r--README.macOS (renamed from README.OSX)13
-rw-r--r--configure.ac52
-rw-r--r--contrib/60-openocd.rules9
-rw-r--r--contrib/rpc_examples/ocdrpc.hs11
-rw-r--r--doc/manual/helper.txt2
-rw-r--r--doc/manual/main.txt2
-rw-r--r--doc/manual/primer/autotools.txt3
-rw-r--r--doc/manual/primer/jtag.txt2
-rw-r--r--doc/manual/style.txt4
-rw-r--r--doc/openocd.texi102
-rw-r--r--src/flash/nand/at91sam9.c4
-rw-r--r--src/flash/nor/at91sam4.c3
-rw-r--r--src/flash/nor/core.h3
-rw-r--r--src/flash/nor/dsp5680xx_flash.c4
-rw-r--r--src/flash/nor/lpc2900.c4
-rw-r--r--src/flash/nor/max32xxx.c2
-rw-r--r--src/flash/nor/psoc6.c1
-rw-r--r--src/flash/nor/stmqspi.c2
-rw-r--r--src/helper/bits.h16
-rw-r--r--src/helper/list.h212
-rw-r--r--src/helper/system.h14
-rw-r--r--src/helper/time_support.h13
-rw-r--r--src/jtag/drivers/OpenULINK/src/jtag.c4
-rw-r--r--src/jtag/drivers/ftdi.c25
-rw-r--r--src/jtag/drivers/jlink.c106
-rw-r--r--src/jtag/drivers/jtag_dpi.c8
-rw-r--r--src/jtag/drivers/jtag_vpi.c29
-rw-r--r--src/jtag/drivers/ulink.c2
-rw-r--r--src/jtag/drivers/usb_blaster/usb_blaster.c66
-rw-r--r--src/rtt/rtt.h2
-rw-r--r--src/target/arc.c1
-rw-r--r--src/target/arc_jtag.c12
-rw-r--r--src/target/arm_adi_v5.c2
-rw-r--r--src/target/cortex_m.c4
-rw-r--r--src/target/dsp5680xx.c71
-rw-r--r--src/target/riscv/riscv-013.c4
-rw-r--r--src/target/riscv/riscv.c2
-rw-r--r--src/target/semihosting_common.c2
-rw-r--r--src/target/target.c21
-rw-r--r--[-rwxr-xr-x]tcl/interface/ftdi/steppenprobe.cfg0
44 files changed, 473 insertions, 425 deletions
diff --git a/Doxyfile.in b/Doxyfile.in
index 6e68b4e..9be53d0 100644
--- a/Doxyfile.in
+++ b/Doxyfile.in
@@ -600,7 +600,7 @@ RECURSIVE = YES
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
-EXCLUDE =
+EXCLUDE = @srcdir@/src/jtag/drivers/libjaylink
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
@@ -1234,7 +1234,7 @@ SEARCH_INCLUDES = YES
# contain include files that are not input files but should be processed by
# the preprocessor.
-INCLUDE_PATH =
+INCLUDE_PATH = @builddir@/src
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
diff --git a/Makefile.am b/Makefile.am
index 2d276eb..9c068db 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,8 +6,7 @@ AUTOMAKE_OPTIONS = gnu 1.6
DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
# do not run Jim Tcl tests (esp. during distcheck)
-check-recursive:
- @true
+check-recursive: SUBDIRS :=
nobase_dist_pkgdata_DATA = \
contrib/libdcc/dcc_stdio.c \
@@ -49,7 +48,7 @@ EXTRA_DIST += \
HACKING \
NEWTAPS \
README.Windows \
- README.OSX \
+ README.macOS \
$(EXTRA_DIST_NEWS) \
Doxyfile.in \
tools/logger.pl \
diff --git a/NEWS b/NEWS
index 5c04e34..36ee8fd 100644
--- a/NEWS
+++ b/NEWS
@@ -227,7 +227,7 @@ This release also contains a number of other important functional and
cosmetic bugfixes. For more details about what has changed since the
last release, see the git repository history:
-http://sourceforge.net/p/openocd/code/ci/v0.11.0-rc1/log/?path=
+http://sourceforge.net/p/openocd/code/ci/v0.11.0-rc2/log/?path=
For older NEWS, see the NEWS files associated with each release
diff --git a/README b/README
index 6e6f950..fb3051f 100644
--- a/README
+++ b/README
@@ -101,34 +101,40 @@ Supported hardware
JTAG adapters
-------------
-AICE, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432,
-BCM2835, Bus Blaster, Buspirate, Chameleon, CMSIS-DAP, Cortino, DENX,
-Digilent JTAG-SMT2, DLC 5, DLP-USB1232H, embedded projects, eStick,
-FlashLINK, FlossJTAG, Flyswatter, Flyswatter2, Gateworks, Hoegl, ICDI,
-ICEBear, J-Link, JTAG VPI, JTAGkey, JTAGkey2, JTAG-lock-pick, KT-Link,
-Lisa/L, LPC1768-Stick, MiniModule, NGX, NXHX, OOCDLink, Opendous,
-OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee, RLink, SheevaPlug
-devkit, Stellaris evkits, ST-LINK (SWO tracing supported),
-STM32-PerformanceStick, STR9-comStick, sysfsgpio, TUMPA, Turtelizer,
-ULINK, USB-A9260, USB-Blaster, USB-JTAG, USBprog, VPACLink, VSLLink,
-Wiggler, XDS100v2, Xverve.
+AICE, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432, BCM2835,
+Bus Blaster, Buspirate, Cadence DPI, Chameleon, CMSIS-DAP, Cortino,
+Cypress KitProg, DENX, Digilent JTAG-SMT2, DLC 5, DLP-USB1232H,
+embedded projects, eStick, FlashLINK, FlossJTAG, Flyswatter, Flyswatter2,
+FTDI FT232R, Gateworks, Hoegl, ICDI, ICEBear, J-Link, JTAG VPI, JTAGkey,
+JTAGkey2, JTAG-lock-pick, KT-Link, Linux GPIOD, Lisa/L, LPC1768-Stick,
+Mellanox rshim, MiniModule, NGX, Nuvoton Nu-Link, Nu-Link2, NXHX, NXP IMX GPIO,
+OOCDLink, Opendous, OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee,
+Remote Bitbang, RLink, SheevaPlug devkit, Stellaris evkits,
+ST-LINK (SWO tracing supported), STM32-PerformanceStick, STR9-comStick,
+sysfsgpio, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
+USB-JTAG, USBprog, VPACLink, VSLLink, Wiggler, XDS100v2, Xilinx XVC/PCIe,
+Xverve.
Debug targets
-------------
-ARM11, ARM7, ARM9, AVR32, Cortex-A, Cortex-R, Cortex-M, LS102x-SAP,
-Feroceon/Dragonite, DSP563xx, DSP5680xx, EnSilica eSi-RISC, FA526, MIPS
-EJTAG, NDS32, RISC-V, XScale, Intel Quark.
+ARM: AArch64, ARM11, ARM7, ARM9, Cortex-A/R (v7-A/R), Cortex-M (ARMv{6/7/8}-M),
+FA526, Feroceon/Dragonite, XScale.
+ARCv2, AVR32, DSP563xx, DSP5680xx, EnSilica eSi-RISC, EJTAG (MIPS32, MIPS64),
+Intel Quark, LS102x-SAP, NDS32, RISC-V, ST STM8.
Flash drivers
-------------
-ADUC702x, AT91SAM, ATH79, AVR, CFI, DSP5680xx, EFM32, EM357, eSi-TSMC, FM3,
-FM4, Freedom E SPI, GD32VF103, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx,
-LPC2900, LPCSPIFI, Marvell QSPI, Milandr, NIIET, NuMicro, PIC32mx, PSoC4,
-PSoC5LP, SiM3x, Stellaris, STM32, STMSMI, STR7x, STR9x, nRF51; NAND controllers
-of AT91SAM9, LPC3180, LPC32xx, i.MX31, MXC, NUC910, Orion/Kirkwood, S3C24xx,
-S3C6400, XMC1xxx, XMC4xxx.
+ADUC702x, AT91SAM, AT91SAM9 (NAND), ATH79, ATmega128RFA1, Atmel SAM, AVR, CFI,
+DSP5680xx, EFM32, EM357, eSi-RISC, eSi-TSMC, EZR32HG, FM3, FM4, Freedom E SPI,
+i.MX31, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPC3180, LPC32xx,
+LPCSPIFI, Marvell QSPI, MAX32, Milandr, MXC, NIIET, nRF51, nRF52 , NuMicro,
+NUC910, Orion/Kirkwood, PIC32mx, PSoC4/5LP/6, Renesas RPC HF and SH QSPI,
+S3C24xx, S3C6400, SiM3x, SiFive Freedom E, Stellaris, ST BlueNRG, STM32,
+STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, STMSMI, STR7x, STR9x, SWM050,
+TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF,
+XMC1xxx, XMC4xxx.
==================
@@ -216,7 +222,7 @@ Additionally, for building from git:
- autoconf >= 2.64
- automake >= 1.14
-- texinfo
+- texinfo >= 5.0
USB-based adapters depend on libusb-1.0 and some older drivers require
libusb-0.1 or libusb-compat-0.1. A compatible implementation, such as
diff --git a/README.OSX b/README.macOS
index 979c64b..c532e67 100644
--- a/README.OSX
+++ b/README.macOS
@@ -1,10 +1,10 @@
-Building OpenOCD for OSX
-------------------------
+Building OpenOCD for macOS
+--------------------------
There are a few prerequisites you will need first:
-- Xcode 5 (install from the AppStore)
-- Command Line Tools (install from Xcode 5 -> Preferences -> Downloads)
+- Xcode (install from the AppStore)
+- Command Line Tools (install from Xcode -> Preferences -> Downloads)
- Gentoo Prefix (http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap.xml)
or
- Homebrew (http://mxcl.github.io/homebrew/)
@@ -12,6 +12,11 @@ There are a few prerequisites you will need first:
- MacPorts (http://www.macports.org/install.php)
+If you're building manually you need Texinfo version 5.0 or later. The
+simplest way to get it is to use Homebrew (brew install texinfo) and
+then ``export PATH=/usr/local/opt/texinfo/bin:$PATH``.
+
+
With Gentoo Prefix you can build the release version or the latest
devel version (-9999) the usual way described in the Gentoo
documentation. Alternatively, install the prerequisites and build
diff --git a/configure.ac b/configure.ac
index 48cd279..19bece0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ(2.64)
-AC_INIT([openocd], [0.11.0-rc1+dev],
+AC_INIT([openocd], [0.11.0-rc2+dev],
[OpenOCD Mailing List <openocd-devel@lists.sourceforge.net>])
AC_CONFIG_SRCDIR([src/openocd.c])
AC_CONFIG_AUX_DIR([.])
@@ -25,7 +25,8 @@ AH_BOTTOM([
AC_LANG([C])
AC_PROG_CC
-AC_PROG_CC_C99
+# autoconf 2.70 obsoletes AC_PROG_CC_C99 and includes it in AC_PROG_CC
+m4_version_prereq([2.70],[],[AC_PROG_CC_C99])
AM_PROG_CC_C_O
AC_PROG_RANLIB
PKG_PROG_PKG_CONFIG([0.23])
@@ -80,7 +81,6 @@ AC_CHECK_HEADERS([arpa/inet.h ifaddrs.h netinet/in.h netinet/tcp.h net/if.h], []
AC_HEADER_ASSERT
AC_HEADER_STDBOOL
-AC_HEADER_TIME
AC_C_BIGENDIAN
@@ -139,8 +139,10 @@ m4_define([HIDAPI_USB1_ADAPTERS],
m4_define([LIBFTDI_ADAPTERS],
[[[usb_blaster], [Altera USB-Blaster Compatible], [USB_BLASTER]],
- [[presto], [ASIX Presto Adapter], [PRESTO]],
- [[openjtag], [OpenJTAG Adapter], [OPENJTAG]]])
+ [[presto], [ASIX Presto Adapter], [PRESTO]]])
+
+m4_define([LIBFTDI_USB1_ADAPTERS],
+ [[[openjtag], [OpenJTAG Adapter], [OPENJTAG]]])
m4_define([LIBGPIOD_ADAPTERS],
[[[linuxgpiod], [Linux GPIO bitbang through libgpiod], [LINUXGPIOD]]])
@@ -151,6 +153,8 @@ m4_define([LIBJAYLINK_ADAPTERS],
m4_define([PCIE_ADAPTERS],
[[[xlnx_pcie_xvc], [Xilinx XVC/PCIe], [XLNX_PCIE_XVC]]])
+m4_define([OPTIONAL_LIBRARIES],
+ [[[capstone], [Use Capstone disassembly framework], []]])
AC_ARG_ENABLE([doxygen-html],
AS_HELP_STRING([--disable-doxygen-html],
@@ -249,6 +253,7 @@ AC_ARG_ADAPTERS([
HIDAPI_ADAPTERS,
HIDAPI_USB1_ADAPTERS,
LIBFTDI_ADAPTERS,
+ LIBFTDI_USB1_ADAPTERS
LIBGPIOD_ADAPTERS,
LIBJAYLINK_ADAPTERS
],[auto])
@@ -654,13 +659,24 @@ PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0], [
PKG_CHECK_MODULES([LIBUSB0], [libusb], [use_libusb0=yes], [use_libusb0=no])
-PKG_CHECK_MODULES([CAPSTONE], [capstone], [have_capstone=yes],
- [have_capstone=no])
+AC_ARG_WITH([capstone],
+ AS_HELP_STRING([--with-capstone], [Use Capstone disassembly library (default=auto)])
+ , [
+ enable_capstone=$withval
+ ], [
+ enable_capstone=auto
+])
-AS_IF([test "x$have_capstone" = "xyes"], [
- AC_DEFINE([HAVE_CAPSTONE], [1], [1 if you have captone disassembly framework.])
-], [
- AC_DEFINE([HAVE_CAPSTONE], [0], [0 if you don't have captone disassembly framework.])
+AS_IF([test "x$enable_capstone" != xno], [
+ PKG_CHECK_MODULES([CAPSTONE], [capstone], [
+ AC_DEFINE([HAVE_CAPSTONE], [1], [1 if you have Capstone disassembly framework.])
+ ], [
+ AC_DEFINE([HAVE_CAPSTONE], [0], [0 if you don't have Capstone disassembly framework.])
+ if test "x$enable_capstone" != xauto; then
+ AC_MSG_ERROR([--with-capstone was given, but test for Capstone failed])
+ fi
+ enable_capstone=no
+ ])
])
for hidapi_lib in hidapi hidapi-hidraw hidapi-libusb; do
@@ -711,16 +727,10 @@ PROCESS_ADAPTERS([USB0_ADAPTERS], ["x$use_libusb0" = "xyes"], [libusb-0.1])
PROCESS_ADAPTERS([HIDAPI_ADAPTERS], ["x$use_hidapi" = "xyes"], [hidapi])
PROCESS_ADAPTERS([HIDAPI_USB1_ADAPTERS], ["x$use_hidapi" = "xyes" -a "x$use_libusb1" = "xyes"], [hidapi and libusb-1.x])
PROCESS_ADAPTERS([LIBFTDI_ADAPTERS], ["x$use_libftdi" = "xyes"], [libftdi])
+PROCESS_ADAPTERS([LIBFTDI_USB1_ADAPTERS], ["x$use_libftdi" = "xyes" -a "x$use_libusb1" = "xyes"], [libftdi and libusb-1.x])
PROCESS_ADAPTERS([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [libgpiod])
PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2])
-AS_IF([test "x$build_openjtag" = "xyes"], [
- AS_IF([test "x$use_libusb1" != "xyes" -a "x$use_libusb0" != "xyes"], [
- AC_MSG_ERROR([libusb-1.x or libusb-0.1 is required for the OpenJTAG Programmer])
- build_openjtag=no
- ])
-])
-
AS_IF([test "x$enable_linuxgpiod" != "xno"], [
build_bitbang=yes
])
@@ -786,7 +796,7 @@ AM_CONDITIONAL([USE_LIBGPIOD], [test "x$use_libgpiod" = "xyes"])
AM_CONDITIONAL([USE_HIDAPI], [test "x$use_hidapi" = "xyes"])
AM_CONDITIONAL([USE_LIBJAYLINK], [test "x$use_libjaylink" = "xyes"])
AM_CONDITIONAL([RSHIM], [test "x$build_rshim" = "xyes"])
-AM_CONDITIONAL([HAVE_CAPSTONE], [test "x$have_capstone" = "xyes"])
+AM_CONDITIONAL([HAVE_CAPSTONE], [test "x$enable_capstone" != "xno"])
AM_CONDITIONAL([MINIDRIVER], [test "x$build_minidriver" = "xyes"])
AM_CONDITIONAL([MINIDRIVER_DUMMY], [test "x$build_minidriver_dummy" = "xyes"])
@@ -856,8 +866,10 @@ echo OpenOCD configuration summary
echo --------------------------------------------------
m4_foreach([adapter], [USB1_ADAPTERS, USB0_ADAPTERS,
HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS,
+ LIBFTDI_USB1_ADAPTERS,
LIBGPIOD_ADAPTERS,
- LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS],
+ LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS,
+ OPTIONAL_LIBRARIES],
[s=m4_format(["%-40s"], ADAPTER_DESC([adapter]))
AS_CASE([$ADAPTER_VAR([adapter])],
[auto], [
diff --git a/contrib/60-openocd.rules b/contrib/60-openocd.rules
index fe57364..e0864b8 100644
--- a/contrib/60-openocd.rules
+++ b/contrib/60-openocd.rules
@@ -81,6 +81,9 @@ ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374e", MODE="660", GROUP="plugdev",
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="660", GROUP="plugdev", TAG+="uaccess"
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3753", MODE="660", GROUP="plugdev", TAG+="uaccess"
+# Cypress SuperSpeed Explorer Kit
+ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="0007", MODE="660", GROUP="plugdev", TAG+="uaccess"
+
# Cypress KitProg in KitProg mode
ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="f139", MODE="660", GROUP="plugdev", TAG+="uaccess"
@@ -158,9 +161,9 @@ ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="02a5", MODE="660", GROUP="plugdev",
ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00ff", MODE="660", GROUP="plugdev", TAG+="uaccess"
# Ambiq Micro EVK and Debug boards.
-ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="6010", MODE="664", GROUP="plugdev", TAG+="uaccess"
-ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="6011", MODE="664", GROUP="plugdev", TAG+="uaccess"
-ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="1106", MODE="664", GROUP="plugdev", TAG+="uaccess"
+ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="6010", MODE="660", GROUP="plugdev", TAG+="uaccess"
+ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="6011", MODE="660", GROUP="plugdev", TAG+="uaccess"
+ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="1106", MODE="660", GROUP="plugdev", TAG+="uaccess"
# Marvell Sheevaplug
ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", MODE="660", GROUP="plugdev", TAG+="uaccess"
diff --git a/contrib/rpc_examples/ocdrpc.hs b/contrib/rpc_examples/ocdrpc.hs
index 9a80cdd..8598641 100644
--- a/contrib/rpc_examples/ocdrpc.hs
+++ b/contrib/rpc_examples/ocdrpc.hs
@@ -16,13 +16,11 @@
module Main where
import Prelude
-import Control.Applicative
import Network.Socket
import System.IO.Streams.Core hiding (connect)
import System.IO.Streams.Network
import System.IO.Streams.Attoparsec
import Data.Attoparsec.ByteString.Char8
-import Data.Attoparsec.Combinator
import Data.ByteString.Char8 hiding (putStrLn, concat, map)
import Text.Printf
@@ -38,15 +36,14 @@ mdwParser = (manyTill anyChar (string ": ") *>
`sepBy` string " \n"
ocdMdw :: (InputStream ByteString, OutputStream ByteString) -> Integer -> Integer -> IO [Integer]
-ocdMdw s start count = do
- s <- ocdExec s $ "mdw " ++ show start ++ " " ++ show count
- case parseOnly mdwParser (pack s) of
+ocdMdw s start qnt = do
+ res <- ocdExec s $ "mdw " ++ show start ++ " " ++ show qnt
+ case parseOnly mdwParser (pack res) of
Right r -> return $ concat r
main = do
osock <- socket AF_INET Stream defaultProtocol
- haddr <- inet_addr "127.0.0.1"
- connect osock (SockAddrInet 6666 haddr)
+ connect osock (SockAddrInet 6666 $ tupleToHostAddress (127,0,0,1))
ostreams <- socketToStreams osock
putStrLn "Halting the target, full log output captured:"
ocdExec ostreams "capture \"halt\"" >>= putStrLn
diff --git a/doc/manual/helper.txt b/doc/manual/helper.txt
index 1b01b2e..d5710dd 100644
--- a/doc/manual/helper.txt
+++ b/doc/manual/helper.txt
@@ -89,7 +89,7 @@ mode(s) of execution, and strings that provide usage and help text.
A single handler may be registered using multiple names, but any name
may have only one handler associated with it.
-The @c register_commands() and @c register_commands() functions provide
+The @c register_command() and @c register_commands() functions provide
registration, while the @c unregister_command() and
@c unregister_all_commands() functions will remove existing commands.
These may be called at any time, allowing the command set to change in
diff --git a/doc/manual/main.txt b/doc/manual/main.txt
index c14096b..14c64c2 100644
--- a/doc/manual/main.txt
+++ b/doc/manual/main.txt
@@ -9,7 +9,7 @@ and processes that have been developed by and for the OpenOCD community.
Developers that want to contribute to OpenOCD should read the following
sections before starting work:
-- The List of @subpage thelist enumerates opportunities for improving or
+- @subpage thelist enumerates opportunities for improving or
extending the OpenOCD platform. If your ideas are on The List, you might
check the mailing list archives to find the status of your feature (or bug).
- The @subpage styleguide provides rules that developers should
diff --git a/doc/manual/primer/autotools.txt b/doc/manual/primer/autotools.txt
index 3471eac..f038f0b 100644
--- a/doc/manual/primer/autotools.txt
+++ b/doc/manual/primer/autotools.txt
@@ -15,9 +15,6 @@ autotools in the correct sequence.
When run after a fresh checkout, this script generates the build files
required to compile the project, producing the project configure script.
-After running @c configure, the @ref primermaintainermode settings will
-handle most situations that require running these tools again. In some
-cases, a fresh bootstrap may be still required.
@subsection primerbootstrapcures Problems Solved By Bootstrap
diff --git a/doc/manual/primer/jtag.txt b/doc/manual/primer/jtag.txt
index 41eef72..097e20d 100644
--- a/doc/manual/primer/jtag.txt
+++ b/doc/manual/primer/jtag.txt
@@ -104,7 +104,7 @@ target chips and work out what the various instruction registers/data
registers do, so you can actually do something useful. That's where it
gets interesting. But in and of itself, JTAG is actually very simple.
-@section primerjtag More Reading
+@section primerjtagmore More Reading
A separate primer contains information about @subpage primerjtagbs for
developers that want to extend OpenOCD for such purposes.
diff --git a/doc/manual/style.txt b/doc/manual/style.txt
index 7191a4b..dad3bb4 100644
--- a/doc/manual/style.txt
+++ b/doc/manual/style.txt
@@ -186,9 +186,9 @@ comments.
"empty" lines should be removed from the block.
-# Only single spaces should be used; do @b not add mid-line indentation.
-# If the total line length will be less than 72-80 columns, then
- - The @c /**< form can be used on the same line.
+ - The @c /\**< form can be used on the same line.
- This style should be used sparingly; the best use is for fields:
- @code int field; /**< field description */ @endcode
+ @verbatim int field; /**< field description */ @endverbatim
@section styledoxyall Doxygen Style Guide
diff --git a/doc/openocd.texi b/doc/openocd.texi
index a8359ed..2382dd3 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -834,7 +834,7 @@ using Eclipse or some other GUI.
Today's most common case is a dongle with a JTAG cable on one side
(such as a ribbon cable with a 10-pin or 20-pin IDC connector)
and a USB cable on the other.
-Instead of USB, some cables use Ethernet;
+Instead of USB, some dongles use Ethernet;
older ones may use a PC parallel port, or even a serial port.
@enumerate
@@ -4547,8 +4547,10 @@ The current implementation supports three JTAG TAP cores:
@end itemize
And two debug interfaces cores:
@itemize @minus
-@item @code{Advanced debug interface} (See: @url{http://opencores.org/project@comma{}adv_debug_sys})
-@item @code{SoC Debug Interface} (See: @url{http://opencores.org/project@comma{}dbg_interface})
+@item @code{Advanced debug interface}
+@*(See: @url{http://opencores.org/project@comma{}adv_debug_sys})
+@item @code{SoC Debug Interface}
+@*(See: @url{http://opencores.org/project@comma{}dbg_interface})
@end itemize
@item @code{quark_d20xx} -- an Intel Quark D20xx core.
@item @code{quark_x10xx} -- an Intel Quark X10xx core.
@@ -5616,8 +5618,10 @@ is attempted. If this fails or gives inappropriate results, manual setting is
required (see 'set' command).
@example
-flash bank $_FLASHNAME stmqspi 0x90000000 0 0 0 $_TARGETNAME 0xA0001000
-flash bank $_FLASHNAME stmqspi 0x70000000 0 0 0 $_TARGETNAME 0xA0001400
+flash bank $_FLASHNAME stmqspi 0x90000000 0 0 0 \
+ $_TARGETNAME 0xA0001000
+flash bank $_FLASHNAME stmqspi 0x70000000 0 0 0 \
+ $_TARGETNAME 0xA0001400
@end example
There are three specific commands
@@ -5655,11 +5659,13 @@ Note the hardware dictated subtle difference of those two cases in dual-flash mo
To check basic communication settings, issue
@example
-stmqspi cmd bank_id 0 0x04; stmqspi cmd bank_id 1 0x05; stmqspi cmd bank_id 0 0x06; stmqspi cmd bank_id 1 0x05
+stmqspi cmd bank_id 0 0x04; stmqspi cmd bank_id 1 0x05
+stmqspi cmd bank_id 0 0x06; stmqspi cmd bank_id 1 0x05
@end example
for single flash mode or
@example
-stmqspi cmd bank_id 0 0x04; stmqspi cmd bank_id 2 0x05; stmqspi cmd bank_id 0 0x06; stmqspi cmd bank_id 2 0x05
+stmqspi cmd bank_id 0 0x04; stmqspi cmd bank_id 2 0x05
+stmqspi cmd bank_id 0 0x06; stmqspi cmd bank_id 2 0x05
@end example
for dual flash mode. This should return the status register contents.
@@ -5717,9 +5723,9 @@ CS1/CS2 is routed to on the given SoC.
@example
flash bank $_FLASHNAME ath79 0xbf000000 0 0 0 $_TARGETNAME
-# When using multiple chipselects the base should be different for each,
-# otherwise the write_image command is not able to distinguish the
-# banks.
+# When using multiple chipselects the base should be different
+# for each, otherwise the write_image command is not able to
+# distinguish the banks.
flash bank flash0 ath79 0xbf000000 0 0 0 $_TARGETNAME cs0
flash bank flash1 ath79 0x10000000 0 0 0 $_TARGETNAME cs1
flash bank flash2 ath79 0x20000000 0 0 0 $_TARGETNAME cs2
@@ -5880,7 +5886,8 @@ reserved-bits are masked out and cannot be changed.
NVMUSERROW: 0xFFFFFC5DD8E0C788
# Write 0xFFFFFC5DD8E0C788 to user row
>at91samd nvmuserrow 0xFFFFFC5DD8E0C788
-# Write 0x12300 to user row but leave other bits and low byte unchanged
+# Write 0x12300 to user row but leave other bits and low
+# byte unchanged
>at91samd nvmuserrow 0x12345 0xFFF00
@end example
@end deffn
@@ -6028,8 +6035,9 @@ The reserved fields are always masked out and cannot be changed.
USER PAGE: 0xAEECFF80FE9A9239
# Write
>atsame5 userpage 0xAEECFF80FE9A9239
-# Write 2 to SEESBLK and 4 to SEEPSZ fields but leave other bits unchanged
-# (setup SmartEEPROM of virtual size 8192 bytes)
+# Write 2 to SEESBLK and 4 to SEEPSZ fields but leave other
+# bits unchanged (setup SmartEEPROM of virtual size 8192
+# bytes)
>atsame5 userpage 0x4200000000 0x7f00000000
@end example
@end deffn
@@ -6788,7 +6796,8 @@ The driver probes for a number of these chips and autoconfigures itself,
apart from the base address.
@example
-flash bank $_CHIPNAME.eeprom psoc5lp_eeprom 0x40008000 0 0 0 $_TARGETNAME
+flash bank $_CHIPNAME.eeprom psoc5lp_eeprom 0x40008000 0 0 0 \
+ $_TARGETNAME
@end example
@end deffn
@@ -6842,19 +6851,31 @@ automatically by parsing data in SPCIF_GEOMETRY register.
PSoC6 is equipped with NOR Flash so erased Flash reads as 0x00.
@example
-flash bank main_flash_cm0 psoc6 0x10000000 0 0 0 $@{TARGET@}.cm0
-flash bank work_flash_cm0 psoc6 0x14000000 0 0 0 $@{TARGET@}.cm0
-flash bank super_flash_user_cm0 psoc6 0x16000800 0 0 0 $@{TARGET@}.cm0
-flash bank super_flash_nar_cm0 psoc6 0x16001A00 0 0 0 $@{TARGET@}.cm0
-flash bank super_flash_key_cm0 psoc6 0x16005A00 0 0 0 $@{TARGET@}.cm0
-flash bank super_flash_toc2_cm0 psoc6 0x16007C00 0 0 0 $@{TARGET@}.cm0
-
-flash bank main_flash_cm4 psoc6 0x10000000 0 0 0 $@{TARGET@}.cm4
-flash bank work_flash_cm4 psoc6 0x14000000 0 0 0 $@{TARGET@}.cm4
-flash bank super_flash_user_cm4 psoc6 0x16000800 0 0 0 $@{TARGET@}.cm4
-flash bank super_flash_nar_cm4 psoc6 0x16001A00 0 0 0 $@{TARGET@}.cm4
-flash bank super_flash_key_cm4 psoc6 0x16005A00 0 0 0 $@{TARGET@}.cm4
-flash bank super_flash_toc2_cm4 psoc6 0x16007C00 0 0 0 $@{TARGET@}.cm4
+flash bank main_flash_cm0 psoc6 0x10000000 0 0 0 \
+ $@{TARGET@}.cm0
+flash bank work_flash_cm0 psoc6 0x14000000 0 0 0 \
+ $@{TARGET@}.cm0
+flash bank super_flash_user_cm0 psoc6 0x16000800 0 0 0 \
+ $@{TARGET@}.cm0
+flash bank super_flash_nar_cm0 psoc6 0x16001A00 0 0 0 \
+ $@{TARGET@}.cm0
+flash bank super_flash_key_cm0 psoc6 0x16005A00 0 0 0 \
+ $@{TARGET@}.cm0
+flash bank super_flash_toc2_cm0 psoc6 0x16007C00 0 0 0 \
+ $@{TARGET@}.cm0
+
+flash bank main_flash_cm4 psoc6 0x10000000 0 0 0 \
+ $@{TARGET@}.cm4
+flash bank work_flash_cm4 psoc6 0x14000000 0 0 0 \
+ $@{TARGET@}.cm4
+flash bank super_flash_user_cm4 psoc6 0x16000800 0 0 0 \
+ $@{TARGET@}.cm4
+flash bank super_flash_nar_cm4 psoc6 0x16001A00 0 0 0 \
+ $@{TARGET@}.cm4
+flash bank super_flash_key_cm4 psoc6 0x16005A00 0 0 0 \
+ $@{TARGET@}.cm4
+flash bank super_flash_toc2_cm4 psoc6 0x16007C00 0 0 0 \
+ $@{TARGET@}.cm4
@end example
psoc6-specific commands
@@ -7110,7 +7131,8 @@ will be touched).
Example usage:
@example
-# swap bank 1 and bank 2 in dual bank devices, by setting SWAP_BANK_OPT bit in OPTSR_PRG
+# swap bank 1 and bank 2 in dual bank devices
+# by setting SWAP_BANK_OPT bit in OPTSR_PRG
stm32h7x option_write 0 0x20 0x8000000 0x8000000
@end example
@end deffn
@@ -10164,7 +10186,7 @@ Perform a 32-bit DMI write of value at address.
Synopsys DesignWare ARC Processors are a family of 32-bit CPUs that SoC
designers can optimize for a wide range of uses, from deeply embedded to
high-performance host applications in a variety of market segments. See more
-at: http://www.synopsys.com/IP/ProcessorIP/ARCProcessors/Pages/default.aspx.
+at: @url{http://www.synopsys.com/IP/ProcessorIP/ARCProcessors/Pages/default.aspx}.
OpenOCD currently supports ARC EM processors.
There is a set ARC-specific OpenOCD commands that allow low-level
access to the core and provide necessary support for ARC extensibility and
@@ -10776,7 +10798,8 @@ target remote localhost:3333
@item
A pipe connection is typically started as follows:
@example
-target extended-remote | openocd -c "gdb_port pipe; log_output openocd.log"
+target extended-remote | \
+ openocd -c "gdb_port pipe; log_output openocd.log"
@end example
This would cause GDB to run OpenOCD and communicate using pipes (stdin/stdout).
Using this method has the advantage of GDB starting/stopping OpenOCD for the debug
@@ -10990,17 +11013,11 @@ Cyg_Thread::thread_list, Cyg_Scheduler_Base::current_thread.
@item ThreadX symbols
_tx_thread_current_ptr, _tx_thread_created_ptr, _tx_thread_created_count.
@item FreeRTOS symbols
-@c The following is taken from recent texinfo to provide compatibility
-@c with ancient versions that do not support @raggedright
-@tex
-\begingroup
-\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+@raggedright
pxCurrentTCB, pxReadyTasksLists, xDelayedTaskList1, xDelayedTaskList2,
pxDelayedTaskList, pxOverflowDelayedTaskList, xPendingReadyList,
uxCurrentNumberOfTasks, uxTopUsedPriority.
-\par
-\endgroup
-@end tex
+@end raggedright
@item linux symbols
init_task.
@item ChibiOS symbols
@@ -11011,11 +11028,14 @@ Rtos::sListSuspended, Rtos::sMaxPriorities, Rtos::sCurrentTaskCount.
@item mqx symbols
_mqx_kernel_data, MQX_init_struct.
@item uC/OS-III symbols
-OSRunning, OSTCBCurPtr, OSTaskDbgListPtr, OSTaskQty
+OSRunning, OSTCBCurPtr, OSTaskDbgListPtr, OSTaskQty.
@item nuttx symbols
-g_readytorun, g_tasklisttable
+g_readytorun, g_tasklisttable.
@item RIOT symbols
-sched_threads, sched_num_threads, sched_active_pid, max_threads, _tcb_name_offset
+@raggedright
+sched_threads, sched_num_threads, sched_active_pid, max_threads,
+_tcb_name_offset.
+@end raggedright
@end table
For most RTOS supported the above symbols will be exported by default. However for
diff --git a/src/flash/nand/at91sam9.c b/src/flash/nand/at91sam9.c
index 47c0505..234dd70 100644
--- a/src/flash/nand/at91sam9.c
+++ b/src/flash/nand/at91sam9.c
@@ -105,7 +105,7 @@ static int at91sam9_init(struct nand_device *nand)
/**
* Enable NAND device attached to a controller.
*
- * @param info NAND controller information for controlling NAND device.
+ * @param nand NAND controller information for controlling NAND device.
* @return Success or failure of the enabling.
*/
static int at91sam9_enable(struct nand_device *nand)
@@ -119,7 +119,7 @@ static int at91sam9_enable(struct nand_device *nand)
/**
* Disable NAND device attached to a controller.
*
- * @param info NAND controller information for controlling NAND device.
+ * @param nand NAND controller information for controlling NAND device.
* @return Success or failure of the disabling.
*/
static int at91sam9_disable(struct nand_device *nand)
diff --git a/src/flash/nor/at91sam4.c b/src/flash/nor/at91sam4.c
index 86abf70..d4326e4 100644
--- a/src/flash/nor/at91sam4.c
+++ b/src/flash/nor/at91sam4.c
@@ -1709,6 +1709,9 @@ static int FLASHD_EraseEntireBank(struct sam4_bank_private *pPrivate)
/**
* Erases the entire flash.
* @param pPrivate - the info about the bank.
+ * @param firstPage
+ * @param numPages
+ * @param status
*/
static int FLASHD_ErasePages(struct sam4_bank_private *pPrivate,
int firstPage,
diff --git a/src/flash/nor/core.h b/src/flash/nor/core.h
index 107a1c5..97a368e 100644
--- a/src/flash/nor/core.h
+++ b/src/flash/nor/core.h
@@ -276,7 +276,8 @@ struct flash_bank *get_flash_bank_by_num_noprobe(unsigned int num);
* @param target The target, presumed to contain one or more banks.
* @param addr An address that is within the range of the bank.
* @param check return ERROR_OK and result_bank NULL if the bank does not exist
- * @returns The struct flash_bank located at @a addr, or NULL.
+ * @param result_bank The struct flash_bank located at @a addr, or NULL.
+ * @returns ERROR_OK on success, or an error indicating the problem.
*/
int get_flash_bank_by_addr(struct target *target, target_addr_t addr, bool check,
struct flash_bank **result_bank);
diff --git a/src/flash/nor/dsp5680xx_flash.c b/src/flash/nor/dsp5680xx_flash.c
index 6f1eccf..4902282 100644
--- a/src/flash/nor/dsp5680xx_flash.c
+++ b/src/flash/nor/dsp5680xx_flash.c
@@ -193,8 +193,8 @@ static int dsp5680xx_probe(struct flash_bank *bank)
/**
* The flash module (FM) on the dsp5680xx supports both individual sector
* and mass erase of the flash memory.
- * If this function is called with @first == @last == 0 or if @first is the
- * first sector (#0) and @last is the last sector then the mass erase command
+ * If this function is called with @a first == @a last == 0 or if @a first is the
+ * first sector (#0) and @a last is the last sector then the mass erase command
* is executed (much faster than erasing each sector individually).
*
* @param bank
diff --git a/src/flash/nor/lpc2900.c b/src/flash/nor/lpc2900.c
index 6596cde..4d3d7f7 100644
--- a/src/flash/nor/lpc2900.c
+++ b/src/flash/nor/lpc2900.c
@@ -453,8 +453,8 @@ static int lpc2900_write_index_page(struct flash_bank *bank,
/**
* Calculate FPTR.TR register value for desired program/erase time.
*
- * @param clock System clock in Hz
- * @param time Program/erase time in µs
+ * @param clock_var System clock in Hz
+ * @param time_var Program/erase time in µs
*/
static uint32_t lpc2900_calc_tr(uint32_t clock_var, uint32_t time_var)
{
diff --git a/src/flash/nor/max32xxx.c b/src/flash/nor/max32xxx.c
index 9a5e83f..586a73b 100644
--- a/src/flash/nor/max32xxx.c
+++ b/src/flash/nor/max32xxx.c
@@ -82,7 +82,7 @@ struct max32xxx_flash_bank {
/* see contrib/loaders/flash/max32xxx/max32xxx.s for src */
static const uint8_t write_code[] = {
-#include "../../contrib/loaders/flash/max32xxx/max32xxx.inc"
+#include "../../../contrib/loaders/flash/max32xxx/max32xxx.inc"
};
/* Config Command: flash bank name driver base size chip_width bus_width target [driver_option]
diff --git a/src/flash/nor/psoc6.c b/src/flash/nor/psoc6.c
index 931404e..9c834fd 100644
--- a/src/flash/nor/psoc6.c
+++ b/src/flash/nor/psoc6.c
@@ -873,7 +873,6 @@ exit:
/** ***********************************************************************************************
* @brief Performs Mass Erase operation
- * @param bank flash bank index to erase
* @return ERROR_OK in case of success, ERROR_XXX code otherwise
*************************************************************************************************/
COMMAND_HANDLER(psoc6_handle_mass_erase_command)
diff --git a/src/flash/nor/stmqspi.c b/src/flash/nor/stmqspi.c
index f54e497..a013336 100644
--- a/src/flash/nor/stmqspi.c
+++ b/src/flash/nor/stmqspi.c
@@ -1945,7 +1945,7 @@ static int read_flash_id(struct flash_bank *bank, uint32_t *id1, uint32_t *id2)
uint32_t io_base = stmqspi_info->io_base;
uint8_t byte;
unsigned int type, count, len1, len2;
- int retval;
+ int retval = ERROR_OK;
/* invalidate both ids */
*id1 = 0;
diff --git a/src/helper/bits.h b/src/helper/bits.h
index 464584d..cdcac9e 100644
--- a/src/helper/bits.h
+++ b/src/helper/bits.h
@@ -36,8 +36,8 @@
/**
* bitmap_zero - Clears all the bits in memory
- * @dst: the address of the bitmap
- * @nbits: the number of bits to clear
+ * @param dst the address of the bitmap
+ * @param nbits the number of bits to clear
*/
static inline void bitmap_zero(unsigned long *dst, unsigned int nbits)
{
@@ -47,8 +47,8 @@ static inline void bitmap_zero(unsigned long *dst, unsigned int nbits)
/**
* clear_bit - Clear a bit in memory
- * @nr: the bit to set
- * @addr: the address to start counting from
+ * @param nr the bit to set
+ * @param addr the address to start counting from
*/
static inline void clear_bit(unsigned int nr, volatile unsigned long *addr)
{
@@ -60,8 +60,8 @@ static inline void clear_bit(unsigned int nr, volatile unsigned long *addr)
/**
* set_bit - Set a bit in memory
- * @nr: the bit to set
- * @addr: the address to start counting from
+ * @param nr the bit to set
+ * @param addr the address to start counting from
*/
static inline void set_bit(unsigned int nr, volatile unsigned long *addr)
{
@@ -73,8 +73,8 @@ static inline void set_bit(unsigned int nr, volatile unsigned long *addr)
/**
* test_bit - Determine whether a bit is set
- * @nr: bit number to test
- * @addr: Address to start counting from
+ * @param nr bit number to test
+ * @param addr Address to start counting from
*/
static inline int test_bit(unsigned int nr, const volatile unsigned long *addr)
{
diff --git a/src/helper/list.h b/src/helper/list.h
index 6fd0e7c..7f60464 100644
--- a/src/helper/list.h
+++ b/src/helper/list.h
@@ -64,8 +64,8 @@ extern void __list_add(struct list_head *new,
/**
* list_add - add a new entry
- * @new: new entry to be added
- * @head: list head to add it after
+ * @param new new entry to be added
+ * @param head list head to add it after
*
* Insert a new entry after the specified head.
* This is good for implementing stacks.
@@ -78,8 +78,8 @@ static inline void list_add(struct list_head *new, struct list_head *head)
/**
* list_add_tail - add a new entry
- * @new: new entry to be added
- * @head: list head to add it before
+ * @param new new entry to be added
+ * @param head list head to add it before
*
* Insert a new entry before the specified head.
* This is useful for implementing queues.
@@ -104,7 +104,7 @@ static inline void __list_del(struct list_head *prev, struct list_head *next)
/**
* list_del - deletes entry from list.
- * @entry: the element to delete from the list.
+ * @param entry the element to delete from the list.
* Note: list_empty() on entry does not return true after this, the entry is
* in an undefined state.
*/
@@ -127,10 +127,10 @@ extern void list_del(struct list_head *entry);
/**
* list_replace - replace old entry by new one
- * @old : the element to be replaced
- * @new : the new element to insert
+ * @param old the element to be replaced
+ * @param new the new element to insert
*
- * If @old was empty, it will be overwritten.
+ * If @a old was empty, it will be overwritten.
*/
static inline void list_replace(struct list_head *old,
struct list_head *new)
@@ -150,7 +150,7 @@ static inline void list_replace_init(struct list_head *old,
/**
* list_del_init - deletes entry from list and reinitialize it.
- * @entry: the element to delete from the list.
+ * @param entry the element to delete from the list.
*/
static inline void list_del_init(struct list_head *entry)
{
@@ -160,8 +160,8 @@ static inline void list_del_init(struct list_head *entry)
/**
* list_move - delete from one list and add as another's head
- * @list: the entry to move
- * @head: the head that will precede our entry
+ * @param list the entry to move
+ * @param head the head that will precede our entry
*/
static inline void list_move(struct list_head *list, struct list_head *head)
{
@@ -171,8 +171,8 @@ static inline void list_move(struct list_head *list, struct list_head *head)
/**
* list_move_tail - delete from one list and add as another's tail
- * @list: the entry to move
- * @head: the head that will follow our entry
+ * @param list the entry to move
+ * @param head the head that will follow our entry
*/
static inline void list_move_tail(struct list_head *list,
struct list_head *head)
@@ -182,9 +182,9 @@ static inline void list_move_tail(struct list_head *list,
}
/**
- * list_is_last - tests whether @list is the last entry in list @head
- * @list: the entry to test
- * @head: the head of the list
+ * list_is_last - tests whether @a list is the last entry in list @a head
+ * @param list the entry to test
+ * @param head the head of the list
*/
static inline int list_is_last(const struct list_head *list,
const struct list_head *head)
@@ -194,7 +194,7 @@ static inline int list_is_last(const struct list_head *list,
/**
* list_empty - tests whether a list is empty
- * @head: the list to test.
+ * @param head the list to test.
*/
static inline int list_empty(const struct list_head *head)
{
@@ -203,7 +203,7 @@ static inline int list_empty(const struct list_head *head)
/**
* list_empty_careful - tests whether a list is empty and not being modified
- * @head: the list to test
+ * @param head the list to test
*
* Description:
* tests whether a list is empty _and_ checks that no other CPU might be
@@ -222,7 +222,7 @@ static inline int list_empty_careful(const struct list_head *head)
/**
* list_rotate_left - rotate the list to the left
- * @head: the head of the list
+ * @param head the head of the list
*/
static inline void list_rotate_left(struct list_head *head)
{
@@ -236,7 +236,7 @@ static inline void list_rotate_left(struct list_head *head)
/**
* list_is_singular - tests whether a list has just one entry.
- * @head: the list to test.
+ * @param head the list to test.
*/
static inline int list_is_singular(const struct list_head *head)
{
@@ -257,14 +257,14 @@ static inline void __list_cut_position(struct list_head *list,
/**
* list_cut_position - cut a list into two
- * @list: a new list to add all removed entries
- * @head: a list with entries
- * @entry: an entry within head, could be the head itself
+ * @param list a new list to add all removed entries
+ * @param head a list with entries
+ * @param entry an entry within head, could be the head itself
* and if so we won't cut the list
*
- * This helper moves the initial part of @head, up to and
- * including @entry, from @head to @list. You should
- * pass on @entry an element you know is on @head. @list
+ * This helper moves the initial part of @a head, up to and
+ * including @a entry, from @a head to @a list. You should
+ * pass on @a entry an element you know is on @a head. @a list
* should be an empty list or a list you do not care about
* losing its data.
*
@@ -299,8 +299,8 @@ static inline void __list_splice(const struct list_head *list,
/**
* list_splice - join two lists, this is designed for stacks
- * @list: the new list to add.
- * @head: the place to add it in the first list.
+ * @param list the new list to add.
+ * @param head the place to add it in the first list.
*/
static inline void list_splice(const struct list_head *list,
struct list_head *head)
@@ -311,8 +311,8 @@ static inline void list_splice(const struct list_head *list,
/**
* list_splice_tail - join two lists, each list being a queue
- * @list: the new list to add.
- * @head: the place to add it in the first list.
+ * @param list the new list to add.
+ * @param head the place to add it in the first list.
*/
static inline void list_splice_tail(struct list_head *list,
struct list_head *head)
@@ -323,10 +323,10 @@ static inline void list_splice_tail(struct list_head *list,
/**
* list_splice_init - join two lists and reinitialise the emptied list.
- * @list: the new list to add.
- * @head: the place to add it in the first list.
+ * @param list the new list to add.
+ * @param head the place to add it in the first list.
*
- * The list at @list is reinitialised
+ * The list at @a list is reinitialised
*/
static inline void list_splice_init(struct list_head *list,
struct list_head *head)
@@ -339,11 +339,11 @@ static inline void list_splice_init(struct list_head *list,
/**
* list_splice_tail_init - join two lists and reinitialise the emptied list
- * @list: the new list to add.
- * @head: the place to add it in the first list.
+ * @param list the new list to add.
+ * @param head the place to add it in the first list.
*
* Each of the lists is a queue.
- * The list at @list is reinitialised
+ * The list at @a list is reinitialised
*/
static inline void list_splice_tail_init(struct list_head *list,
struct list_head *head)
@@ -356,18 +356,18 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_entry - get the struct for this entry
- * @ptr: the &struct list_head pointer.
- * @type: the type of the struct this is embedded in.
- * @member: the name of the list_struct within the struct.
+ * @param ptr the &struct list_head pointer.
+ * @param type the type of the struct this is embedded in.
+ * @param member the name of the list_struct within the struct.
*/
#define list_entry(ptr, type, member) \
container_of(ptr, type, member)
/**
* list_first_entry - get the first element from a list
- * @ptr: the list head to take the element from.
- * @type: the type of the struct this is embedded in.
- * @member: the name of the list_struct within the struct.
+ * @param ptr the list head to take the element from.
+ * @param type the type of the struct this is embedded in.
+ * @param member the name of the list_struct within the struct.
*
* Note, that list is expected to be not empty.
*/
@@ -376,8 +376,8 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each - iterate over a list
- * @pos: the &struct list_head to use as a loop cursor.
- * @head: the head for your list.
+ * @param pos the &struct list_head to use as a loop cursor.
+ * @param head the head for your list.
*/
#define list_for_each(pos, head) \
for (pos = (head)->next; prefetch(pos->next), pos != (head); \
@@ -385,8 +385,8 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* __list_for_each - iterate over a list
- * @pos: the &struct list_head to use as a loop cursor.
- * @head: the head for your list.
+ * @param pos the &struct list_head to use as a loop cursor.
+ * @param head the head for your list.
*
* This variant differs from list_for_each() in that it's the
* simplest possible list iteration code, no prefetching is done.
@@ -398,8 +398,8 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_prev - iterate over a list backwards
- * @pos: the &struct list_head to use as a loop cursor.
- * @head: the head for your list.
+ * @param pos the &struct list_head to use as a loop cursor.
+ * @param head the head for your list.
*/
#define list_for_each_prev(pos, head) \
for (pos = (head)->prev; prefetch(pos->prev), pos != (head); \
@@ -407,9 +407,9 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_safe - iterate over a list safe against removal of list entry
- * @pos: the &struct list_head to use as a loop cursor.
- * @n: another &struct list_head to use as temporary storage
- * @head: the head for your list.
+ * @param pos the &struct list_head to use as a loop cursor.
+ * @param n another &struct list_head to use as temporary storage
+ * @param head the head for your list.
*/
#define list_for_each_safe(pos, n, head) \
for (pos = (head)->next, n = pos->next; pos != (head); \
@@ -417,9 +417,9 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_prev_safe - iterate over a list backwards safe against removal of list entry
- * @pos: the &struct list_head to use as a loop cursor.
- * @n: another &struct list_head to use as temporary storage
- * @head: the head for your list.
+ * @param pos the &struct list_head to use as a loop cursor.
+ * @param n another &struct list_head to use as temporary storage
+ * @param head the head for your list.
*/
#define list_for_each_prev_safe(pos, n, head) \
for (pos = (head)->prev, n = pos->prev; \
@@ -428,9 +428,9 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_entry - iterate over list of given type
- * @pos: the type * to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @param pos the type * to use as a loop cursor.
+ * @param head the head for your list.
+ * @param member the name of the list_struct within the struct.
*/
#define list_for_each_entry(pos, head, member) \
for (pos = list_entry((head)->next, typeof(*pos), member); \
@@ -439,9 +439,9 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_entry_reverse - iterate backwards over list of given type.
- * @pos: the type * to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @param pos the type * to use as a loop cursor.
+ * @param head the head for your list.
+ * @param member the name of the list_struct within the struct.
*/
#define list_for_each_entry_reverse(pos, head, member) \
for (pos = list_entry((head)->prev, typeof(*pos), member); \
@@ -450,9 +450,9 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
- * @pos: the type * to use as a start point
- * @head: the head of the list
- * @member: the name of the list_struct within the struct.
+ * @param pos the type * to use as a start point
+ * @param head the head of the list
+ * @param member the name of the list_struct within the struct.
*
* Prepares a pos entry for use as a start point in list_for_each_entry_continue().
*/
@@ -461,9 +461,9 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_entry_continue - continue iteration over list of given type
- * @pos: the type * to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @param pos the type * to use as a loop cursor.
+ * @param head the head for your list.
+ * @param member the name of the list_struct within the struct.
*
* Continue to iterate over list of given type, continuing after
* the current position.
@@ -475,9 +475,9 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_entry_continue_reverse - iterate backwards from the given point
- * @pos: the type * to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @param pos the type * to use as a loop cursor.
+ * @param head the head for your list.
+ * @param member the name of the list_struct within the struct.
*
* Start to iterate over list of given type backwards, continuing after
* the current position.
@@ -489,9 +489,9 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_entry_from - iterate over list of given type from the current point
- * @pos: the type * to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @param pos the type * to use as a loop cursor.
+ * @param head the head for your list.
+ * @param member the name of the list_struct within the struct.
*
* Iterate over list of given type, continuing from current position.
*/
@@ -501,10 +501,10 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
- * @pos: the type * to use as a loop cursor.
- * @n: another type * to use as temporary storage
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @param pos the type * to use as a loop cursor.
+ * @param n another type * to use as temporary storage
+ * @param head the head for your list.
+ * @param member the name of the list_struct within the struct.
*/
#define list_for_each_entry_safe(pos, n, head, member) \
for (pos = list_entry((head)->next, typeof(*pos), member), \
@@ -514,10 +514,10 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_entry_safe_continue - continue list iteration safe against removal
- * @pos: the type * to use as a loop cursor.
- * @n: another type * to use as temporary storage
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @param pos the type * to use as a loop cursor.
+ * @param n another type * to use as temporary storage
+ * @param head the head for your list.
+ * @param member the name of the list_struct within the struct.
*
* Iterate over list of given type, continuing after current point,
* safe against removal of list entry.
@@ -530,10 +530,10 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_entry_safe_from - iterate over list from current point safe against removal
- * @pos: the type * to use as a loop cursor.
- * @n: another type * to use as temporary storage
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @param pos the type * to use as a loop cursor.
+ * @param n another type * to use as temporary storage
+ * @param head the head for your list.
+ * @param member the name of the list_struct within the struct.
*
* Iterate over list of given type from current point, safe against
* removal of list entry.
@@ -545,10 +545,10 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_for_each_entry_safe_reverse - iterate backwards over list safe against removal
- * @pos: the type * to use as a loop cursor.
- * @n: another type * to use as temporary storage
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @param pos the type * to use as a loop cursor.
+ * @param n another type * to use as temporary storage
+ * @param head the head for your list.
+ * @param member the name of the list_struct within the struct.
*
* Iterate backwards over list of given type, safe against removal
* of list entry.
@@ -561,9 +561,9 @@ static inline void list_splice_tail_init(struct list_head *list,
/**
* list_safe_reset_next - reset a stale list_for_each_entry_safe loop
- * @pos: the loop cursor used in the list_for_each_entry_safe loop
- * @n: temporary storage used in list_for_each_entry_safe
- * @member: the name of the list_struct within the struct.
+ * @param pos the loop cursor used in the list_for_each_entry_safe loop
+ * @param n temporary storage used in list_for_each_entry_safe
+ * @param member the name of the list_struct within the struct.
*
* list_safe_reset_next is not safe to use in general if the list may be
* modified concurrently (eg. the lock is dropped in the loop body). An
@@ -686,10 +686,10 @@ static inline void hlist_move_list(struct hlist_head *old,
/**
* hlist_for_each_entry - iterate over list of given type
- * @tpos: the type * to use as a loop cursor.
- * @pos: the &struct hlist_node to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the hlist_node within the struct.
+ * @param tpos the type * to use as a loop cursor.
+ * @param pos the &struct hlist_node to use as a loop cursor.
+ * @param head the head for your list.
+ * @param member the name of the hlist_node within the struct.
*/
#define hlist_for_each_entry(tpos, pos, head, member) \
for (pos = (head)->first; \
@@ -699,9 +699,9 @@ static inline void hlist_move_list(struct hlist_head *old,
/**
* hlist_for_each_entry_continue - iterate over a hlist continuing after current point
- * @tpos: the type * to use as a loop cursor.
- * @pos: the &struct hlist_node to use as a loop cursor.
- * @member: the name of the hlist_node within the struct.
+ * @param tpos the type * to use as a loop cursor.
+ * @param pos the &struct hlist_node to use as a loop cursor.
+ * @param member the name of the hlist_node within the struct.
*/
#define hlist_for_each_entry_continue(tpos, pos, member) \
for (pos = (pos)->next; \
@@ -711,9 +711,9 @@ static inline void hlist_move_list(struct hlist_head *old,
/**
* hlist_for_each_entry_from - iterate over a hlist continuing from current point
- * @tpos: the type * to use as a loop cursor.
- * @pos: the &struct hlist_node to use as a loop cursor.
- * @member: the name of the hlist_node within the struct.
+ * @param tpos the type * to use as a loop cursor.
+ * @param pos the &struct hlist_node to use as a loop cursor.
+ * @param member the name of the hlist_node within the struct.
*/
#define hlist_for_each_entry_from(tpos, pos, member) \
for (; pos && ({ prefetch(pos->next); 1; }) && \
@@ -722,11 +722,11 @@ static inline void hlist_move_list(struct hlist_head *old,
/**
* hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry
- * @tpos: the type * to use as a loop cursor.
- * @pos: the &struct hlist_node to use as a loop cursor.
- * @n: another &struct hlist_node to use as temporary storage
- * @head: the head for your list.
- * @member: the name of the hlist_node within the struct.
+ * @param tpos the type * to use as a loop cursor.
+ * @param pos the &struct hlist_node to use as a loop cursor.
+ * @param n another &struct hlist_node to use as temporary storage
+ * @param head the head for your list.
+ * @param member the name of the hlist_node within the struct.
*/
#define hlist_for_each_entry_safe(tpos, pos, n, head, member) \
for (pos = (head)->first; \
diff --git a/src/helper/system.h b/src/helper/system.h
index 97b3443..1aaca3b 100644
--- a/src/helper/system.h
+++ b/src/helper/system.h
@@ -28,19 +28,11 @@
#include <assert.h>
#include <ctype.h>
#include <errno.h>
+#include <time.h>
-/* +++ AC_HEADER_TIME +++ */
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
#endif
-/* --- AC_HEADER_TIME --- */
/* +++ platform specific headers +++ */
#ifdef _WIN32
diff --git a/src/helper/time_support.h b/src/helper/time_support.h
index 7abbdb2..a9f2dff 100644
--- a/src/helper/time_support.h
+++ b/src/helper/time_support.h
@@ -25,15 +25,10 @@
#ifndef OPENOCD_HELPER_TIME_SUPPORT_H
#define OPENOCD_HELPER_TIME_SUPPORT_H
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
+#include <time.h>
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
#endif
int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y);
diff --git a/src/jtag/drivers/OpenULINK/src/jtag.c b/src/jtag/drivers/OpenULINK/src/jtag.c
index ecf98a0..c76f034 100644
--- a/src/jtag/drivers/OpenULINK/src/jtag.c
+++ b/src/jtag/drivers/OpenULINK/src/jtag.c
@@ -48,6 +48,7 @@ uint8_t delay_tms;
* Maximum achievable TCK frequency is 182 kHz for ULINK clocked at 24 MHz.
*
* @param out_offset offset in OUT2BUF where payload data starts
+ * @param in_offset
*/
void jtag_scan_in(uint8_t out_offset, uint8_t in_offset)
{
@@ -125,6 +126,7 @@ void jtag_scan_in(uint8_t out_offset, uint8_t in_offset)
* Maximum achievable TCK frequency is 113 kHz for ULINK clocked at 24 MHz.
*
* @param out_offset offset in OUT2BUF where payload data starts
+ * @param in_offset
*/
void jtag_slow_scan_in(uint8_t out_offset, uint8_t in_offset)
{
@@ -373,6 +375,7 @@ void jtag_slow_scan_out(uint8_t out_offset)
* Maximum achievable TCK frequency is 100 kHz for ULINK clocked at 24 MHz.
*
* @param out_offset offset in OUT2BUF where payload data starts
+ * @param in_offset
*/
void jtag_scan_io(uint8_t out_offset, uint8_t in_offset)
{
@@ -465,6 +468,7 @@ void jtag_scan_io(uint8_t out_offset, uint8_t in_offset)
* Maximum achievable TCK frequency is 78 kHz for ULINK clocked at 24 MHz.
*
* @param out_offset offset in OUT2BUF where payload data starts
+ * @param in_offset
*/
void jtag_slow_scan_io(uint8_t out_offset, uint8_t in_offset)
{
diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c
index a92f166..11d46f2 100644
--- a/src/jtag/drivers/ftdi.c
+++ b/src/jtag/drivers/ftdi.c
@@ -589,17 +589,19 @@ static int ftdi_reset(int trst, int srst)
LOG_DEBUG_IO("reset trst: %i srst %i", trst, srst);
- if (trst == 1) {
- if (sig_ntrst)
- ftdi_set_signal(sig_ntrst, '0');
- else
- LOG_ERROR("Can't assert TRST: nTRST signal is not defined");
- } else if (sig_ntrst && jtag_get_reset_config() & RESET_HAS_TRST &&
- trst == 0) {
- if (jtag_get_reset_config() & RESET_TRST_OPEN_DRAIN)
- ftdi_set_signal(sig_ntrst, 'z');
- else
- ftdi_set_signal(sig_ntrst, '1');
+ if (!swd_mode) {
+ if (trst == 1) {
+ if (sig_ntrst)
+ ftdi_set_signal(sig_ntrst, '0');
+ else
+ LOG_ERROR("Can't assert TRST: nTRST signal is not defined");
+ } else if (sig_ntrst && jtag_get_reset_config() & RESET_HAS_TRST &&
+ trst == 0) {
+ if (jtag_get_reset_config() & RESET_TRST_OPEN_DRAIN)
+ ftdi_set_signal(sig_ntrst, 'z');
+ else
+ ftdi_set_signal(sig_ntrst, '1');
+ }
}
if (srst == 1) {
@@ -1417,7 +1419,6 @@ static void ftdi_swd_swdio_en(bool enable)
/**
* Flush the MPSSE queue and process the SWD transaction queue
- * @param dap
* @return
*/
static int ftdi_swd_run_queue(void)
diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c
index b915707..15d252c 100644
--- a/src/jtag/drivers/jlink.c
+++ b/src/jtag/drivers/jlink.c
@@ -553,59 +553,17 @@ static bool jlink_usb_location_equal(struct jaylink_device *dev)
}
-static int jlink_init(void)
+static int jlink_open_device(uint32_t ifaces, bool *found_device)
{
- int ret;
- struct jaylink_device **devs;
- unsigned int i;
- bool found_device;
- uint32_t tmp;
- char *firmware_version;
- struct jaylink_hardware_version hwver;
- struct jaylink_hardware_status hwstatus;
- enum jaylink_usb_address address;
- size_t length;
- size_t num_devices;
- uint32_t host_interfaces;
-
- LOG_DEBUG("Using libjaylink %s (compiled with %s).",
- jaylink_version_package_get_string(), JAYLINK_VERSION_PACKAGE_STRING);
-
- if (!jaylink_library_has_cap(JAYLINK_CAP_HIF_USB) && use_usb_address) {
- LOG_ERROR("J-Link driver does not support USB devices.");
- return ERROR_JTAG_INIT_FAILED;
- }
-
- ret = jaylink_init(&jayctx);
-
+ int ret = jaylink_discovery_scan(jayctx, ifaces);
if (ret != JAYLINK_OK) {
- LOG_ERROR("jaylink_init() failed: %s.", jaylink_strerror(ret));
- return ERROR_JTAG_INIT_FAILED;
- }
-
- ret = jaylink_log_set_callback(jayctx, &jaylink_log_handler, NULL);
-
- if (ret != JAYLINK_OK) {
- LOG_ERROR("jaylink_log_set_callback() failed: %s.",
- jaylink_strerror(ret));
- jaylink_exit(jayctx);
- return ERROR_JTAG_INIT_FAILED;
- }
-
- host_interfaces = JAYLINK_HIF_USB;
-
- if (use_serial_number)
- host_interfaces |= JAYLINK_HIF_TCP;
-
- ret = jaylink_discovery_scan(jayctx, host_interfaces);
-
- if (ret != JAYLINK_OK) {
- LOG_ERROR("jaylink_discovery_scan() failed: %s.",
- jaylink_strerror(ret));
+ LOG_ERROR("jaylink_discovery_scan() failed: %s.", jaylink_strerror(ret));
jaylink_exit(jayctx);
return ERROR_JTAG_INIT_FAILED;
}
+ size_t num_devices;
+ struct jaylink_device **devs;
ret = jaylink_get_devices(jayctx, &devs, &num_devices);
if (ret != JAYLINK_OK) {
@@ -623,12 +581,13 @@ static int jlink_init(void)
return ERROR_JTAG_INIT_FAILED;
}
- found_device = false;
+ *found_device = false;
- for (i = 0; devs[i]; i++) {
+ for (size_t i = 0; devs[i]; i++) {
struct jaylink_device *dev = devs[i];
if (use_serial_number) {
+ uint32_t tmp;
ret = jaylink_device_get_serial_number(dev, &tmp);
if (ret == JAYLINK_ERR_NOT_AVAILABLE) {
@@ -644,6 +603,7 @@ static int jlink_init(void)
}
if (use_usb_address) {
+ enum jaylink_usb_address address;
ret = jaylink_device_get_usb_address(dev, &address);
if (ret == JAYLINK_ERR_NOT_SUPPORTED) {
@@ -664,7 +624,7 @@ static int jlink_init(void)
ret = jaylink_open(dev, &devh);
if (ret == JAYLINK_OK) {
- found_device = true;
+ *found_device = true;
break;
}
@@ -672,6 +632,52 @@ static int jlink_init(void)
}
jaylink_free_devices(devs, true);
+ return ERROR_OK;
+}
+
+
+static int jlink_init(void)
+{
+ int ret;
+ char *firmware_version;
+ struct jaylink_hardware_version hwver;
+ struct jaylink_hardware_status hwstatus;
+ size_t length;
+
+ LOG_DEBUG("Using libjaylink %s (compiled with %s).",
+ jaylink_version_package_get_string(), JAYLINK_VERSION_PACKAGE_STRING);
+
+ if (!jaylink_library_has_cap(JAYLINK_CAP_HIF_USB) && use_usb_address) {
+ LOG_ERROR("J-Link driver does not support USB devices.");
+ return ERROR_JTAG_INIT_FAILED;
+ }
+
+ ret = jaylink_init(&jayctx);
+
+ if (ret != JAYLINK_OK) {
+ LOG_ERROR("jaylink_init() failed: %s.", jaylink_strerror(ret));
+ return ERROR_JTAG_INIT_FAILED;
+ }
+
+ ret = jaylink_log_set_callback(jayctx, &jaylink_log_handler, NULL);
+
+ if (ret != JAYLINK_OK) {
+ LOG_ERROR("jaylink_log_set_callback() failed: %s.",
+ jaylink_strerror(ret));
+ jaylink_exit(jayctx);
+ return ERROR_JTAG_INIT_FAILED;
+ }
+
+ bool found_device;
+ ret = jlink_open_device(JAYLINK_HIF_USB, &found_device);
+ if (ret != ERROR_OK)
+ return ret;
+
+ if (!found_device && use_serial_number) {
+ ret = jlink_open_device(JAYLINK_HIF_TCP, &found_device);
+ if (ret != ERROR_OK)
+ return ret;
+ }
if (!found_device) {
LOG_ERROR("No J-Link device found.");
diff --git a/src/jtag/drivers/jtag_dpi.c b/src/jtag/drivers/jtag_dpi.c
index 575c6bc..7cac200 100644
--- a/src/jtag/drivers/jtag_dpi.c
+++ b/src/jtag/drivers/jtag_dpi.c
@@ -79,8 +79,8 @@ static int read_sock(char *buf, size_t len)
/**
* jtag_dpi_reset - ask to reset the JTAG device
- * @trst: 1 if TRST is to be asserted
- * @srst: 1 if SRST is to be asserted
+ * @param trst 1 if TRST is to be asserted
+ * @param srst 1 if SRST is to be asserted
*/
static int jtag_dpi_reset(int trst, int srst)
{
@@ -109,11 +109,11 @@ static int jtag_dpi_reset(int trst, int srst)
/**
* jtag_dpi_scan - launches a DR-scan or IR-scan
- * @cmd: the command to launch
+ * @param cmd the command to launch
*
* Launch a JTAG IR-scan or DR-scan
*
- * Returns ERROR_OK if OK, ERROR_xxx if a read/write error occured.
+ * Returns ERROR_OK if OK, ERROR_xxx if a read/write error occurred.
*/
static int jtag_dpi_scan(struct scan_command *cmd)
{
diff --git a/src/jtag/drivers/jtag_vpi.c b/src/jtag/drivers/jtag_vpi.c
index 32a43f8..c5ffe83 100644
--- a/src/jtag/drivers/jtag_vpi.c
+++ b/src/jtag/drivers/jtag_vpi.c
@@ -208,8 +208,8 @@ static int jtag_vpi_receive_cmd(struct vpi_cmd *vpi)
/**
* jtag_vpi_reset - ask to reset the JTAG device
- * @trst: 1 if TRST is to be asserted
- * @srst: 1 if SRST is to be asserted
+ * @param trst 1 if TRST is to be asserted
+ * @param srst 1 if SRST is to be asserted
*/
static int jtag_vpi_reset(int trst, int srst)
{
@@ -223,12 +223,12 @@ static int jtag_vpi_reset(int trst, int srst)
/**
* jtag_vpi_tms_seq - ask a TMS sequence transition to JTAG
- * @bits: TMS bits to be written (bit0, bit1 .. bitN)
- * @nb_bits: number of TMS bits (between 1 and 8)
+ * @param bits TMS bits to be written (bit0, bit1 .. bitN)
+ * @param nb_bits number of TMS bits (between 1 and 8)
*
* Write a series of TMS transitions, where each transition consists in :
- * - writing out TCK=0, TMS=<new_state>, TDI=<???>
- * - writing out TCK=1, TMS=<new_state>, TDI=<???> which triggers the transition
+ * - writing out TCK=0, TMS=\<new_state>, TDI=\<???>
+ * - writing out TCK=1, TMS=\<new_state>, TDI=\<???> which triggers the transition
* The function ensures that at the end of the sequence, the clock (TCK) is put
* low.
*/
@@ -250,11 +250,11 @@ static int jtag_vpi_tms_seq(const uint8_t *bits, int nb_bits)
/**
* jtag_vpi_path_move - ask a TMS sequence transition to JTAG
- * @cmd: path transition
+ * @param cmd path transition
*
* Write a series of TMS transitions, where each transition consists in :
- * - writing out TCK=0, TMS=<new_state>, TDI=<???>
- * - writing out TCK=1, TMS=<new_state>, TDI=<???> which triggers the transition
+ * - writing out TCK=0, TMS=\<new_state>, TDI=\<???>
+ * - writing out TCK=1, TMS=\<new_state>, TDI=\<???> which triggers the transition
* The function ensures that at the end of the sequence, the clock (TCK) is put
* low.
*/
@@ -276,7 +276,7 @@ static int jtag_vpi_path_move(struct pathmove_command *cmd)
/**
* jtag_vpi_tms - ask a tms command
- * @cmd: tms command
+ * @param cmd tms command
*/
static int jtag_vpi_tms(struct tms_command *cmd)
{
@@ -342,8 +342,9 @@ static int jtag_vpi_queue_tdi_xfer(uint8_t *bits, int nb_bits, int tap_shift)
/**
* jtag_vpi_queue_tdi - short description
- * @bits: bits to be queued on TDI (or NULL if 0 are to be queued)
- * @nb_bits: number of bits
+ * @param bits bits to be queued on TDI (or NULL if 0 are to be queued)
+ * @param nb_bits number of bits
+ * @param tap_shift
*/
static int jtag_vpi_queue_tdi(uint8_t *bits, int nb_bits, int tap_shift)
{
@@ -372,7 +373,7 @@ static int jtag_vpi_queue_tdi(uint8_t *bits, int nb_bits, int tap_shift)
/**
* jtag_vpi_clock_tms - clock a TMS transition
- * @tms: the TMS to be sent
+ * @param tms the TMS to be sent
*
* Triggers a TMS transition (ie. one JTAG TAP state move).
*/
@@ -386,7 +387,7 @@ static int jtag_vpi_clock_tms(int tms)
/**
* jtag_vpi_scan - launches a DR-scan or IR-scan
- * @cmd: the command to launch
+ * @param cmd the command to launch
*
* Launch a JTAG IR-scan or DR-scan
*
diff --git a/src/jtag/drivers/ulink.c b/src/jtag/drivers/ulink.c
index f473ce3..ccc023f 100644
--- a/src/jtag/drivers/ulink.c
+++ b/src/jtag/drivers/ulink.c
@@ -696,6 +696,7 @@ static int ulink_append_queue(struct ulink *device, struct ulink_cmd *ulink_cmd)
* Sends all queued OpenULINK commands to the ULINK for execution.
*
* @param device pointer to struct ulink identifying ULINK driver instance.
+ * @param timeout
* @return on success: ERROR_OK
* @return on failure: ERROR_FAIL
*/
@@ -1682,6 +1683,7 @@ static int ulink_queue_runtest(struct ulink *device, struct jtag_command *cmd)
/**
* Execute a JTAG_RESET command
*
+ * @param device
* @param cmd pointer to the command that shall be executed.
* @return on success: ERROR_OK
* @return on failure: ERROR_FAIL
diff --git a/src/jtag/drivers/usb_blaster/usb_blaster.c b/src/jtag/drivers/usb_blaster/usb_blaster.c
index de3b5d5..5002a5f 100644
--- a/src/jtag/drivers/usb_blaster/usb_blaster.c
+++ b/src/jtag/drivers/usb_blaster/usb_blaster.c
@@ -253,7 +253,7 @@ static void ublast_flush_buffer(void)
/**
* ublast_queue_byte - queue one 'bitbang mode' byte for USB Blaster
- * @abyte: the byte to queue
+ * @param abyte the byte to queue
*
* Queues one byte in 'bitbang mode' to the USB Blaster. The byte is not
* actually sent, but stored in a buffer. The write is performed once
@@ -271,7 +271,7 @@ static void ublast_queue_byte(uint8_t abyte)
/**
* ublast_compute_pin - compute if gpio should be asserted
- * @steer: control (ie. TRST driven, SRST driven, of fixed)
+ * @param steer control (ie. TRST driven, SRST driven, of fixed)
*
* Returns pin value (1 means driven high, 0 mean driven low)
*/
@@ -293,7 +293,7 @@ static bool ublast_compute_pin(enum gpio_steer steer)
/**
* ublast_build_out - build bitbang mode output byte
- * @type: says if reading back TDO is required
+ * @param type says if reading back TDO is required
*
* Returns the compute bitbang mode byte
*/
@@ -313,8 +313,8 @@ static uint8_t ublast_build_out(enum scan_type type)
/**
* ublast_reset - reset the JTAG device is possible
- * @trst: 1 if TRST is to be asserted
- * @srst: 1 if SRST is to be asserted
+ * @param trst 1 if TRST is to be asserted
+ * @param srst 1 if SRST is to be asserted
*/
static void ublast_reset(int trst, int srst)
{
@@ -329,7 +329,7 @@ static void ublast_reset(int trst, int srst)
/**
* ublast_clock_tms - clock a TMS transition
- * @tms: the TMS to be sent
+ * @param tms the TMS to be sent
*
* Triggers a TMS transition (ie. one JTAG TAP state move).
*/
@@ -360,12 +360,12 @@ static void ublast_idle_clock(void)
/**
* ublast_clock_tdi - Output a TDI with bitbang mode
- * @tdi: the TDI bit to be shifted out
- * @type: scan type (ie. does a readback of TDO is required)
+ * @param tdi the TDI bit to be shifted out
+ * @param type scan type (ie. does a readback of TDO is required)
*
* Output a TDI bit and assert clock to push it into the JTAG device :
- * - writing out TCK=0, TMS=<old_state>=0, TDI=<tdi>
- * - writing out TCK=1, TMS=<new_state>, TDI=<tdi> which triggers the JTAG
+ * - writing out TCK=0, TMS=\<old_state>=0, TDI=\<tdi>
+ * - writing out TCK=1, TMS=\<new_state>, TDI=\<tdi> which triggers the JTAG
* device acquiring the data.
*
* If a TDO is to be read back, the required read is requested (bitbang mode),
@@ -387,8 +387,8 @@ static void ublast_clock_tdi(int tdi, enum scan_type type)
/**
* ublast_clock_tdi_flip_tms - Output a TDI with bitbang mode, change JTAG state
- * @tdi: the TDI bit to be shifted out
- * @type: scan type (ie. does a readback of TDO is required)
+ * @param tdi the TDI bit to be shifted out
+ * @param type scan type (ie. does a readback of TDO is required)
*
* This function is the same as ublast_clock_tdi(), but it changes also the TMS
* while output the TDI. This should be the last TDI output of a TDI
@@ -416,8 +416,8 @@ static void ublast_clock_tdi_flip_tms(int tdi, enum scan_type type)
/**
* ublast_queue_bytes - queue bytes for the USB Blaster
- * @bytes: byte array
- * @nb_bytes: number of bytes
+ * @param bytes byte array
+ * @param nb_bytes number of bytes
*
* Queues bytes to be sent to the USB Blaster. The bytes are not
* actually sent, but stored in a buffer. The write is performed once
@@ -443,13 +443,13 @@ static void ublast_queue_bytes(uint8_t *bytes, int nb_bytes)
/**
* ublast_tms_seq - write a TMS sequence transition to JTAG
- * @bits: TMS bits to be written (bit0, bit1 .. bitN)
- * @nb_bits: number of TMS bits (between 1 and 8)
- * @skip: number of TMS bits to skip at the beginning of the series
+ * @param bits TMS bits to be written (bit0, bit1 .. bitN)
+ * @param nb_bits number of TMS bits (between 1 and 8)
+ * @param skip number of TMS bits to skip at the beginning of the series
*
* Write a series of TMS transitions, where each transition consists in :
- * - writing out TCK=0, TMS=<new_state>, TDI=<???>
- * - writing out TCK=1, TMS=<new_state>, TDI=<???> which triggers the transition
+ * - writing out TCK=0, TMS=\<new_state>, TDI=\<???>
+ * - writing out TCK=1, TMS=\<new_state>, TDI=\<???> which triggers the transition
* The function ensures that at the end of the sequence, the clock (TCK) is put
* low.
*/
@@ -465,7 +465,7 @@ static void ublast_tms_seq(const uint8_t *bits, int nb_bits, int skip)
/**
* ublast_tms - write a tms command
- * @cmd: tms command
+ * @param cmd tms command
*/
static void ublast_tms(struct tms_command *cmd)
{
@@ -475,11 +475,11 @@ static void ublast_tms(struct tms_command *cmd)
/**
* ublast_path_move - write a TMS sequence transition to JTAG
- * @cmd: path transition
+ * @param cmd path transition
*
* Write a series of TMS transitions, where each transition consists in :
- * - writing out TCK=0, TMS=<new_state>, TDI=<???>
- * - writing out TCK=1, TMS=<new_state>, TDI=<???> which triggers the transition
+ * - writing out TCK=0, TMS=\<new_state>, TDI=\<???>
+ * - writing out TCK=1, TMS=\<new_state>, TDI=\<???> which triggers the transition
* The function ensures that at the end of the sequence, the clock (TCK) is put
* low.
*/
@@ -501,8 +501,8 @@ static void ublast_path_move(struct pathmove_command *cmd)
/**
* ublast_state_move - move JTAG state to the target state
- * @state: the target state
- * @skip: number of bits to skip at the beginning of the path
+ * @param state the target state
+ * @param skip number of bits to skip at the beginning of the path
*
* Input the correct TMS sequence to the JTAG TAP so that we end up in the
* target state. This assumes the current state (tap_get_state()) is correct.
@@ -524,8 +524,8 @@ static void ublast_state_move(tap_state_t state, int skip)
/**
* ublast_read_byteshifted_tdos - read TDO of byteshift writes
- * @buf: the buffer to store the bits
- * @nb_bits: the number of bits
+ * @param buf the buffer to store the bits
+ * @param nb_bytes the number of bytes
*
* Reads back from USB Blaster TDO bits, triggered by a 'byteshift write', ie. eight
* bits per received byte from USB interface, and store them in buffer.
@@ -552,8 +552,8 @@ static int ublast_read_byteshifted_tdos(uint8_t *buf, int nb_bytes)
/**
* ublast_read_bitbang_tdos - read TDO of bitbang writes
- * @buf: the buffer to store the bits
- * @nb_bits: the number of bits
+ * @param buf the buffer to store the bits
+ * @param nb_bits the number of bits
*
* Reads back from USB Blaster TDO bits, triggered by a 'bitbang write', ie. one
* bit per received byte from USB interface, and store them in buffer, where :
@@ -592,9 +592,9 @@ static int ublast_read_bitbang_tdos(uint8_t *buf, int nb_bits)
/**
* ublast_queue_tdi - short description
- * @bits: bits to be queued on TDI (or NULL if 0 are to be queued)
- * @nb_bits: number of bits
- * @scan: scan type (ie. if TDO read back is required or not)
+ * @param bits bits to be queued on TDI (or NULL if 0 are to be queued)
+ * @param nb_bits number of bits
+ * @param scan scan type (ie. if TDO read back is required or not)
*
* Outputs a series of TDI bits on TDI.
* As a side effect, the last TDI bit is sent along a TMS=1, and triggers a JTAG
@@ -703,7 +703,7 @@ static void ublast_stableclocks(int cycles)
/**
* ublast_scan - launches a DR-scan or IR-scan
- * @cmd: the command to launch
+ * @param cmd the command to launch
*
* Launch a JTAG IR-scan or DR-scan
*
diff --git a/src/rtt/rtt.h b/src/rtt/rtt.h
index 597c838..bc21bd0 100644
--- a/src/rtt/rtt.h
+++ b/src/rtt/rtt.h
@@ -237,7 +237,7 @@ const struct rtt_control *rtt_get_control(void);
* Read channel information.
*
* @param[in] channel_index Channel index.
- * @param[in] channel_type Channel type.
+ * @param[in] type Channel type.
* @param[out] info Channel information.
*
* @returns ERROR_OK on success, an error code on failure.
diff --git a/src/target/arc.c b/src/target/arc.c
index ffe9745..8e56845 100644
--- a/src/target/arc.c
+++ b/src/target/arc.c
@@ -924,6 +924,7 @@ exit:
* Finds an actionpoint that triggered last actionpoint event, as specified by
* DEBUG.ASR.
*
+ * @param target
* @param actionpoint Pointer to be set to last active actionpoint. Pointer
* will be set to NULL if DEBUG.AH is 0.
*/
diff --git a/src/target/arc_jtag.c b/src/target/arc_jtag.c
index fd77b37..ca1a096 100644
--- a/src/target/arc_jtag.c
+++ b/src/target/arc_jtag.c
@@ -237,7 +237,7 @@ static void arc_jtag_enque_register_rw(struct arc_jtag *jtag_info, uint32_t *add
* @param type Type of registers to write: core or aux.
* @param addr Array of registers numbers.
* @param count Amount of registers in arrays.
- * @param values Array of register values.
+ * @param buffer Array of register values.
*/
static int arc_jtag_write_registers(struct arc_jtag *jtag_info, uint32_t type,
uint32_t *addr, uint32_t count, const uint32_t *buffer)
@@ -272,7 +272,7 @@ static int arc_jtag_write_registers(struct arc_jtag *jtag_info, uint32_t type,
* @param type Type of registers to read: core or aux.
* @param addr Array of registers numbers.
* @param count Amount of registers in arrays.
- * @param values Array of register values.
+ * @param buffer Array of register values.
*/
static int arc_jtag_read_registers(struct arc_jtag *jtag_info, uint32_t type,
uint32_t *addr, uint32_t count, uint32_t *buffer)
@@ -337,7 +337,7 @@ int arc_jtag_write_core_reg_one(struct arc_jtag *jtag_info, uint32_t addr,
* @param jtag_info
* @param addr Array of registers numbers.
* @param count Amount of registers in arrays.
- * @param values Array of register values.
+ * @param buffer Array of register values.
*/
int arc_jtag_write_core_reg(struct arc_jtag *jtag_info, uint32_t *addr,
uint32_t count, const uint32_t *buffer)
@@ -361,7 +361,7 @@ int arc_jtag_read_core_reg_one(struct arc_jtag *jtag_info, uint32_t addr,
* @param jtag_info
* @param addr Array of core register numbers.
* @param count Amount of registers in arrays.
- * @param values Array of register values.
+ * @param buffer Array of register values.
*/
int arc_jtag_read_core_reg(struct arc_jtag *jtag_info, uint32_t *addr,
uint32_t count, uint32_t *buffer)
@@ -385,7 +385,7 @@ int arc_jtag_write_aux_reg_one(struct arc_jtag *jtag_info, uint32_t addr,
* @param jtag_info
* @param addr Array of registers numbers.
* @param count Amount of registers in arrays.
- * @param values Array of register values.
+ * @param buffer Array of register values.
*/
int arc_jtag_write_aux_reg(struct arc_jtag *jtag_info, uint32_t *addr,
uint32_t count, const uint32_t *buffer)
@@ -409,7 +409,7 @@ int arc_jtag_read_aux_reg_one(struct arc_jtag *jtag_info, uint32_t addr,
* @param jtag_info
* @param addr Array of AUX register numbers.
* @param count Amount of registers in arrays.
- * @param values Array of register values.
+ * @param buffer Array of register values.
*/
int arc_jtag_read_aux_reg(struct arc_jtag *jtag_info, uint32_t *addr,
uint32_t count, uint32_t *buffer)
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index 59bb186..8f5ad59 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -450,7 +450,7 @@ static int mem_ap_write(struct adiv5_ap *ap, const uint8_t *buffer, uint32_t siz
* @param buffer The data buffer to receive the data. No particular alignment is assumed.
* @param size Which access size to use, in bytes. 1, 2 or 4.
* @param count The number of reads to do (in size units, not bytes).
- * @param address Address to be read; it must be readable by the currently selected MEM-AP.
+ * @param adr Address to be read; it must be readable by the currently selected MEM-AP.
* @param addrinc Whether the target address should be increased after each read or not. This
* should normally be true, except when reading from e.g. a FIFO.
* @return ERROR_OK on success, otherwise an error code.
diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index ac308b4..ce2c426 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -2011,8 +2011,8 @@ int cortex_m_examine(struct target *target)
}
LOG_DEBUG("cpuid: 0x%8.8" PRIx32 "", cpuid);
- /* VECTRESET is not supported on Cortex-M0, M0+ and M1 */
- cortex_m->vectreset_supported = i > 1;
+ /* VECTRESET is supported only on ARMv7-M cores */
+ cortex_m->vectreset_supported = !armv7m->arm.is_armv8m && !armv7m->arm.is_armv6m;
if (i == 4) {
target_read_u32(target, MVFR0, &mvfr0);
diff --git a/src/target/dsp5680xx.c b/src/target/dsp5680xx.c
index ee26d24..62844ea 100644
--- a/src/target/dsp5680xx.c
+++ b/src/target/dsp5680xx.c
@@ -117,7 +117,7 @@ static int dsp5680xx_drscan(struct target *target, uint8_t *d_in,
* @param target
* @param d_in This is the data that will be shifted into the JTAG IR reg.
* @param d_out The data that will be shifted out of the JTAG IR reg will be stored here.
- * @apram ir_len Length of the data to be shifted to JTAG IR.
+ * @param ir_len Length of the data to be shifted to JTAG IR.
*
*/
static int dsp5680xx_irscan(struct target *target, uint32_t *d_in,
@@ -1070,8 +1070,8 @@ static int dsp5680xx_resume(struct target *target, int current,
}
/**
- * The value of @address determines if it corresponds to P: (program) or X: (dat) memory.
- * If the address is over 0x200000 then it is considered X: memory, and @pmem = 0.
+ * The value of @a address determines if it corresponds to P: (program) or X: (dat) memory.
+ * If the address is over 0x200000 then it is considered X: memory, and @a pmem = 0.
* The special case of 0xFFXXXX is not modified, since it allows to read out the
* memory mapped EOnCE registers.
*
@@ -1405,32 +1405,26 @@ static int dsp5680xx_write_32(struct target *t, uint32_t a, uint32_t c,
}
/**
- * Writes @buffer to memory.
- * The parameter @address determines whether @buffer should be written to
+ * Writes @a buffer to memory.
+ * The parameter @a address determines whether @a buffer should be written to
* P: (program) memory or X: (dat) memory.
*
* @param target
- * @param address
+ * @param a address
* @param size Bytes (1), Half words (2), Words (4).
* @param count In bytes.
- * @param buffer
+ * @param b buffer
*
* @return
*/
-static int dsp5680xx_write(struct target *t, target_addr_t a, uint32_t s, uint32_t c,
+static int dsp5680xx_write(struct target *target, target_addr_t a, uint32_t size, uint32_t count,
const uint8_t *b)
{
/* TODO Cannot write 32bit to odd address, will write 0x12345678 as 0x5678 0x0012 */
- struct target *target = t;
-
uint32_t address = a;
- uint32_t count = c;
-
uint8_t const *buffer = b;
- uint32_t size = s;
-
check_halt_and_debug(target);
int retval = 0;
@@ -1479,12 +1473,12 @@ static int dsp5680xx_write_buffer(struct target *t, target_addr_t a, uint32_t si
*
* @return
*/
-static int dsp5680xx_read_buffer(struct target *t, target_addr_t a, uint32_t size,
- uint8_t *buf)
+static int dsp5680xx_read_buffer(struct target *target, target_addr_t address, uint32_t size,
+ uint8_t *buffer)
{
- check_halt_and_debug(t);
+ check_halt_and_debug(target);
/* The "/2" solves the byte/word addressing issue.*/
- return dsp5680xx_read(t, a, 2, size / 2, buf);
+ return dsp5680xx_read(target, address, 2, size / 2, buffer);
}
/**
@@ -1499,19 +1493,19 @@ static int dsp5680xx_read_buffer(struct target *t, target_addr_t a, uint32_t siz
*
* @return
*/
-static int dsp5680xx_checksum_memory(struct target *t, target_addr_t a, uint32_t s,
+static int dsp5680xx_checksum_memory(struct target *target, target_addr_t address, uint32_t size,
uint32_t *checksum)
{
return ERROR_FAIL;
}
/**
- * Calculates a signature over @word_count words in the data from @buff16.
- * The algorithm used is the same the FM uses, so the @return may be used to compare
+ * Calculates a signature over @a word_count words in the data from @a buff8.
+ * The algorithm used is the same the FM uses, so the @a return may be used to compare
* with the one generated by the FM module, and check if flashing was successful.
* This algorithm is based on the perl script available from the Freescale website at FAQ 25630.
*
- * @param buff16
+ * @param buff8
* @param word_count
*
* @return
@@ -1606,32 +1600,21 @@ int dsp5680xx_f_protect_check(struct target *target, uint16_t *protected)
/**
* Executes a command on the FM module.
- * Some commands use the parameters @address and @data, others ignore them.
+ * Some commands use the parameters @a address and @a data, others ignore them.
*
* @param target
- * @param command Command to execute.
+ * @param c Command to execute.
* @param address Command parameter.
* @param data Command parameter.
* @param hfm_ustat FM status register.
- * @param pmem Address is P: (program) memory (@pmem == 1) or X: (dat) memory (@pmem == 0)
+ * @param pmem Address is P: (program) memory (@a pmem == 1) or X: (dat) memory (@a pmem == 0)
*
* @return
*/
-static int dsp5680xx_f_ex(struct target *t, uint16_t c, uint32_t a, uint32_t d,
- uint16_t *h, int p)
+static int dsp5680xx_f_ex(struct target *target, uint16_t c, uint32_t address, uint32_t data,
+ uint16_t *hfm_ustat, int pmem)
{
- struct target *target = t;
-
uint32_t command = c;
-
- uint32_t address = a;
-
- uint32_t data = d;
-
- uint16_t *hfm_ustat = h;
-
- int pmem = p;
-
int retval;
retval = core_load_TX_RX_high_addr_to_r0(target);
@@ -1787,9 +1770,9 @@ static int set_fm_ck_div(struct target *target)
/**
* Executes the FM calculate signature command. The FM will calculate over the
- * data from @address to @address + @words -1. The result is written to a
- * register, then read out by this function and returned in @signature. The
- * value @signature may be compared to the one returned by perl_crc to
+ * data from @a address to @a address + @a words -1. The result is written to a
+ * register, then read out by this function and returned in @a signature. The
+ * value @a signature may be compared to the one returned by perl_crc to
* verify the flash was written correctly.
*
* @param target
@@ -1799,13 +1782,9 @@ static int set_fm_ck_div(struct target *target)
*
* @return
*/
-static int dsp5680xx_f_signature(struct target *t, uint32_t a, uint32_t words,
+static int dsp5680xx_f_signature(struct target *target, uint32_t address, uint32_t words,
uint16_t *signature)
{
- struct target *target = t;
-
- uint32_t address = a;
-
int retval;
uint16_t hfm_ustat;
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 87aff06..3fa9fff 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -550,13 +550,15 @@ static dmi_status_t dmi_scan(struct target *target, uint32_t *address_in,
}
/**
+ * @param target
* @param data_in The data we received from the target.
- * @param dmi_op The operation to perform (read/write/nop).
* @param dmi_busy_encountered
* If non-NULL, will be updated to reflect whether DMI busy was
* encountered while executing this operation or not.
+ * @param dmi_op The operation to perform (read/write/nop).
* @param address The address argument to that operation.
* @param data_out The data to send to the target.
+ * @param timeout_sec
* @param exec When true, this scan will execute something, so extra RTI
* cycles may be added.
* @param ensure_success
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index 7542a91..ef05118 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -1511,7 +1511,7 @@ static int riscv_address_translate(struct target *target,
uint64_t ppn_value;
target_addr_t table_address;
const virt2phys_info_t *info;
- uint64_t pte;
+ uint64_t pte = 0;
int i;
int result = riscv_get_register(target, &satp_value, GDB_REGNO_SATP);
diff --git a/src/target/semihosting_common.c b/src/target/semihosting_common.c
index 9650556..61a69d1 100644
--- a/src/target/semihosting_common.c
+++ b/src/target/semihosting_common.c
@@ -89,6 +89,8 @@ extern int gdb_actual_connections;
* Initialize common semihosting support.
*
* @param target Pointer to the target to initialize.
+ * @param setup
+ * @param post_result
* @return An error status if there is a problem during initialization.
*/
int semihosting_common_init(struct target *target, void *setup,
diff --git a/src/target/target.c b/src/target/target.c
index 4ea6aca..86178a0 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -803,6 +803,13 @@ static int target_soft_reset_halt(struct target *target)
* algorithm.
*
* @param target used to run the algorithm
+ * @param num_mem_params
+ * @param mem_params
+ * @param num_reg_params
+ * @param reg_param
+ * @param entry_point
+ * @param exit_point
+ * @param timeout_ms
* @param arch_info target-specific description of the algorithm.
*/
int target_run_algorithm(struct target *target,
@@ -838,6 +845,12 @@ done:
* Executes a target-specific native code algorithm and leaves it running.
*
* @param target used to run the algorithm
+ * @param num_mem_params
+ * @param mem_params
+ * @param num_reg_params
+ * @param reg_params
+ * @param entry_point
+ * @param exit_point
* @param arch_info target-specific description of the algorithm.
*/
int target_start_algorithm(struct target *target,
@@ -876,6 +889,12 @@ done:
* Waits for an algorithm started with target_start_algorithm() to complete.
*
* @param target used to run the algorithm
+ * @param num_mem_params
+ * @param mem_params
+ * @param num_reg_params
+ * @param reg_params
+ * @param exit_point
+ * @param timeout_ms
* @param arch_info target-specific description of the algorithm.
*/
int target_wait_algorithm(struct target *target,
@@ -947,6 +966,7 @@ done:
* @param entry_point address on the target to execute to start the algorithm
* @param exit_point address at which to set a breakpoint to catch the
* end of the algorithm; can be 0 if target triggers a breakpoint itself
+ * @param arch_info
*/
int target_run_flash_async_algorithm(struct target *target,
@@ -5155,6 +5175,7 @@ no_params:
e = Jim_GetOpt_String(goi, &s, NULL);
if (e != JIM_OK)
return e;
+ free(target->gdb_port_override);
target->gdb_port_override = strdup(s);
} else {
if (goi->argc != 0)
diff --git a/tcl/interface/ftdi/steppenprobe.cfg b/tcl/interface/ftdi/steppenprobe.cfg
index 7b5b9a0..7b5b9a0 100755..100644
--- a/tcl/interface/ftdi/steppenprobe.cfg
+++ b/tcl/interface/ftdi/steppenprobe.cfg