From upstream (#580)
* configure: do not make Capstone dependency automagic This adds regular ./configure options to control dependency on the Capstone disassembly engine. See [0] for the rationale. [0] https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies Change-Id: I3e16dc5255d650aa1949ccf896b26dc96e522a75 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/5985 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> * configure.ac: fix build with libusb0 and without libusb1 Driver 'openjtag' requires both libftdi and libusb1. The current check is incorrect and the driver is built when libftdi is present with libusb0 and without libusb1, which causes the linker to fail resolving the required libusb1 symbols. Remove the check for libusb0 on driver 'openjtag'. Create a new adapters group LIBFTDI_USB1_ADAPTERS to hold the driver 'openjtag'. Change-Id: I1f5e554b519e51c829d116ede894639cb55a26aa Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5989 Tested-by: jenkins * doc: fix over/underfull hboxes in PDF This adds some cosmetic changes to make the PDF User Manual look proper. Building it now requires Texinfo 5.0 which shouldn't be problematic according to [0]. Commit79fdeb37f4
is effectively reverted. [0] https://repology.org/project/texinfo/versions Change-Id: I990bc23bdb53d24c302b26d74fd770ea738e4096 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/5995 Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li> Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> * contrib: rpc_examples: haskell: fix ftbs with current libraries And get rid of some warnings along the way. Change-Id: I8fdbe1fa304276be6b0f25249b902b3576aa3793 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/5987 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> * Makefile.am: fix override of target 'check-recursive' To prevent executing the Jim Tcl tests, the makefile's target 'check-recursive' has been overridden in commit56d163ce79
("jimtcl: update to 0.77, the current version, enable only specific modules"). This causes a runtime warning during build: Makefile:6332: warning: overriding recipe for target 'check-recursive' Makefile:5098: warning: ignoring old recipe for target 'check-recursive' Instead of override the makefile's target 'check-recursive', prevent the recursion by re-assigning as empty the variable SUBDIRS for this specific target only. Change-Id: I03d1c467eba42316a59aeed4612d6bdbe6211282 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes:56d163ce79
("jimtcl: update to 0.77, the current version, enable only specific modules") Reviewed-on: http://openocd.zylin.com/5986 Tested-by: jenkins * contrib: udev file for Cypress SuperSpeed Explorer kit lsusb output: Bus 003 Device 011: ID 04b4:0007 Cypress Semiconductor Corp. Couldn't open device, some information will be missing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x04b4 Cypress Semiconductor Corp. idProduct 0x0007 bcdDevice 0.00 iManufacturer 1 iProduct 2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 114 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 100mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Union: bMasterInterface 0 bSlaveInterface 1 CDC Call Management: bmCapabilities 0x00 bDataInterface 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 4 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 5 bInterfaceProtocol 0 iInterface 0 Change-Id: I62f0300199da3551c8774a4a5a4cd106a3ab2904 Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Jiri Kastner <cz172638@gmail.com> Reviewed-on: http://openocd.zylin.com/3611 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> * target: fix memory leak on multiple '-gdb-port' flag In the odd case of multiple flags '-gdb-port' during 'target create' or following 'configure', the new strdup()'ed value will replace the old one without freeing it. Free the old value (if it exists) before replacing it. Change-Id: I1673346613ce7023880046e3a9ba473e75f18b8a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6005 Tested-by: jenkins * udev: fix permission for Ambiq Micro EVK's Commit68e204f1e9
("udev: Add rules for Ambiq Micro EVK's.") was initially proposed as http://openocd.zylin.com/3429/ then replaced by http://openocd.zylin.com/3980/ The initial proposal was for file '99-openocd.rules', in which MODE="664" was the norm. After merge of http://openocd.zylin.com/2804/ the new udev rules in '60-openocd.rules' switched to MODE="660", but the evolution of the above patch missed this change. Switch udev rules of Ambiq Micro EVK's to MODE="660" and uniform them to the rest of the file. Change-Id: I4b4eea535184ee8569da3264bff4f1fafb5bce4d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes:68e204f1e9
("udev: Add rules for Ambiq Micro EVK's.") Reviewed-on: http://openocd.zylin.com/6004 Tested-by: jenkins * doc/style: fix doxygen error Doxygen complains about non-closed nested comments: doc/manual/style.txt:423: warning: Reached end of file while still inside a (nested) comment. Nesting level 1 (probable line reference: 149) This is caused by the string '/**' that is interpreted as the beginning of a comment. Escape the string to not let doxygen consider it as a comment While there, replace @code/@endcode with @verbatim/@endverbatim to properly render the line. Change-Id: If2a27c4cf659326e317cc4ac8c0b313e97e40432 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5996 Tested-by: jenkins * flash/nor/max32xxx: fix path of include file The relative path should have three times '..'. Issue identified by doxygen: src/flash/nor/max32xxx.c:85: warning: include file ../../contrib/loaders/flash/max32xxx/max32xxx.inc not found, perhaps you forgot to add its directory to INCLUDE_PATH? Change-Id: Ie7b4948c6770b8acb9eff26e08eea32945ebb219 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5997 Tested-by: jenkins * Doxyfile.in: fix build out-of-tree When doxygen is built out-of-tree, it fails to find the generated file startup_tcl.inc: src/openocd.c:59: warning: include file startup_tcl.inc not found, perhaps you forgot to add its directory to INCLUDE_PATH? Add '@builddir@/src' to INCLUDE_PATH. Change-Id: I51f2f6fe7224bba0f8b3db7219f9831de4e67139 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5998 Tested-by: jenkins * doc/manual/primer/jtag.txt: remove duplicated section name The section name 'primerjtag' is used twice, causing doxygen to complain: warning: multiple use of section label 'primerjtag', (first occurrence: doc/manual/primer/jtag.txt, line 107) Rename one of them. Change-Id: Id307915dbc51a7f647fab4fb28ab431e65344d61 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5999 Tested-by: jenkins * Doxyfile.in: exclude libjaylink from doxygen When build using libjaylink as git submodule, doxygen includes the libjaylink files and complains for multiple 'mainpage' comment block, one in OpenOCD and the other in libjaylink: src/jtag/drivers/libjaylink/libjaylink/core.c:37: warning: found more than one \mainpage comment block! (first occurrence: doc/manual/main.txt, line 1), Skipping current block! Exclude libjaylink submodule from doxygen. Change-Id: I5e856817344c9f21f8c26f077a23c00b83cfbcb5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6000 Tested-by: jenkins * openocd: fix incorrect doxygen comments Use '@param' in front of function's parameters and '@a' when the parameter is recalled in the description. This fixes doxygen complains: warning: Found unknown command '@buff16' While there, fix a minor typo s/occured/occurred/ in a comment and the typo s/@apram/@param/ in a doxygen comment. Change-Id: I5cd86a80adef552331310a21c55ec5d11354be21 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6001 Tested-by: jenkins * openocd: fix doxygen parameters of functions Add to doxygen comment the missing parameters. Remove from doxygen comment any non-existing parameter. Fix the parameter names in doxygen comment to match the one in the function prototype. Where the parameter name in the doxygen description seems better than the one in the code, change the code. Escape the character '<' to prevent doxygen to interpret it as an xml tag. Change-Id: I22da723339ac7d7a7a64ac4c1cc4336e2416c2cc Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6002 Tested-by: jenkins * doc/manual/primer/autotools.txt: fix doxygen warning Commitab90b87778
("configure: remove AM_MAINTAINER_MODE, effectively always enabling all the rules") removes the configure flag '--enable-maintainer-mode' and its documentation, but have left a reference to the removed subsection 'primermaintainermode' and this triggers a warning in doxygen: doc/manual/primer/autotools.txt:21: warning: unable to resolve reference to 'primermaintainermode' for \ref command Remove the obsoleted paragraph. Change-Id: I56e69ef033d546d159745bed1b47c6105827e7ae Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes:ab90b87778
("configure: remove AM_MAINTAINER_MODE, effectively always enabling all the rules") Reviewed-on: http://openocd.zylin.com/6003 Tested-by: jenkins * flash/stmqspi: fix build error with -Werror=maybe-uninitialized using gcc 9.3 on ubuntu focal fossa with -Werror=maybe-uninitialized we get this error: /src/flash/nor/stmqspi.c: In function ‘read_flash_id’: /src/flash/nor/stmqspi.c:1948:6: error: ‘retval’ may be used uninitialized Change-Id: Ifd8ae60df847fc61e22ca100c008e3914c9af79b Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@st.com> Reviewed-on: http://openocd.zylin.com/6012 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> * target/riscv: fix build error with -Werror=maybe-uninitialized using gcc 9.3 on ubuntu focal fossa with -Werror=maybe-uninitialized we get this error: /src/target/riscv/riscv.c: In function ‘riscv_address_translate’: /src/target/riscv/riscv.c:1536:13: error: ‘pte’ may be used uninitialized Change-Id: I51e180b43f9b6996e4e4058db49c179b9f81bcdc Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@st.com> Reviewed-on: http://openocd.zylin.com/6013 Tested-by: jenkins Reviewed-by: Tim Newsome <tim@sifive.com> Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> * cortex_m: [FIX] ARMv8-M does not support VECTRESET ref: Arm®v8-M Architecture Reference Manual (DDI0553B.m) D1.2.3: AIRCR, Application Interrupt and Reset Control Register Bit [0] is RES0 Change-Id: I6ef451b2c114487e2732852a60e86c292ffa6a50 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@st.com> Reviewed-on: http://openocd.zylin.com/6014 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> * driver/ftdi: skip trst in swd mode When using the adapter olimex arm-jtag-swd (to convert to SWD a JTAG-only FTDI adapter), the pin trst on JTAG side is re-used to control the direction of pin SWDIO on SWD side. There is a single reset API at adapter driver to assert/deassert either srst and/or trst. A request to assert/deassert srst can cause also trst to change value, hanging the SWD communication. In SWD mode, ignore the value passed to trst. Change-Id: I5fe1eed851177d405d77ae6079da9642dc1a08f1 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6006 Tested-by: jenkins * configure.ac: drop macro 'AC_PROG_CC_C99' from autoconf 2.70 The macro AC_PROG_CC_C99 has been obsoleted by autoconf 2.70 and triggers a set of warnings from both 'aclocal' and 'autoconf'. The test of AC_PROG_CC_C99 is now included in AC_PROG_CC. For autoconf 2.69 and earlier the macro is still required, so cannot be simply dropped. Use a conditional test to avoid the warning on autoconf 2.70 but still use AC_PROG_CC_C99 on older autoconf. Change-Id: I5e8437f5a826fb63be6d07bcb5bb824f94683020 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6009 Tested-by: jenkins Reviewed-by: Marc Schink <dev@zapb.de> * configure: drop macro 'AC_HEADER_TIME' The macro AC_HEADER_TIME has been obsoleted by autoconf 2.70. Not all systems provide 'sys/time.h', plus some old system didn't allowed to include both 'time.h' and 'sys/time.h' because 'time.h' was included by 'sys/time.h' and was not properly protected to allow multiple inclusion. The macro AC_HEADER_TIME helps to detect such odd case. Nowadays all the systems properly protect 'time.h', so its safe to unconditionally include 'time.h', even if it is also included by 'sys/time.h'. The case of systems without 'sys/time.h' is already covered by configure.ac through the directive AC_CHECK_HEADERS([sys/time.h]) Remove the obsoleted autoconf macro and simplify the code by including 'time.h' unconditionally and check HAVE_SYS_TIME_H to include 'sys/time.h'. Change-Id: Iddb3f3f1d90c22668b97f8e756e1b4f733367a7d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6010 Tested-by: jenkins Reviewed-by: Marc Schink <dev@zapb.de> * README.macOS: explain how to install suitable Texinfo Change-Id: Ic5906111f412eebd906a9be3fd0e133484def3eb Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/6026 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> * jlink: fix device discovery when network is off If user specifies a serial number for the jlink device, openocd extends the search to network jlink devices too, without checking if the host has a valid and functional network connection. If the network is not functional, libjaylink returns error. This error invalidates the discovery on USB, even if it was successful. Factor-out parts of the jlink_init into separate jlink_open_device function, use that function to firstly discover and match USB devices and, if matching device was not found on the USB bus and serial number was specified, repeat discovery and matching via TCP. Fixes: https://sourceforge.net/p/openocd/tickets/294/ Change-Id: Iea0de1640d4e5b21ecc7e9c1dd6d36f214d647c2 Signed-off-by: Bohdan Tymkiv <bohdan200@gmail.com> Reviewed-on: http://openocd.zylin.com/6025 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins Reviewed-by: Marc Schink <dev@zapb.de> * README: add missing items for 0.11 JTAG adapters Cadence DPI, Cypress Kitpro, FTDI FT232R, Linux GPIOD, Mellanox rshim, Nuvoton Nu-Link, Nu-Link2, NXP IMX GPIO, Remote Bitbang, TI XDS110, Xilinx XVC/PCIe Debug targets AArch64, Cortex-M (ARMv8-M), ARCv2, MIPS64, RISC-V, ST-STM8 Flash Drivers ATmega128RFA1, Atmel SAM, eSi-RISC, EZR32HG, MAX32, MXC, nRF52, PSoC6, Renesas RPC HF and SH QSPI, SiFive Freedom E, ST BlueNRG, STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, SWM050, TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF Change-Id: I341618ac5d7189e4f98268cecd66c99447b72af8 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@st.com> Reviewed-on: http://openocd.zylin.com/6027 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com> * The openocd-0.11.0-rc2 release candidate Signed-off-by: Paul Fertser <fercerpav@gmail.com> * Restore +dev suffix Signed-off-by: Paul Fertser <fercerpav@gmail.com> * steppenprobe: fix file permission Commit895d4a5995
("tcl/interface/ftdi: Add Steppenprobe open hardware interface") erroneously set the execution permission to the configuration file. Strip the execution permission. Change-Id: I556451d5e6fee4aee385451e8c90216a25b6ef46 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: http://openocd.zylin.com/5653 Reviewed-on: http://openocd.zylin.com/6038 Reviewed-by: Paul Fertser <fercerpav@gmail.com> Tested-by: Paul Fertser <fercerpav@gmail.com> * github: fix github wokflow while pushing a tag this fix permits to add correctly the generated artifact (windows binaries) into the release section. Change-Id: Ia982370d3a1e08c623ebcabb5ac97e9fb49d00e0 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/6047 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> * doc: Fix type in Hooking up the JTAG Adapter We are talking about adapter connectivity in this chapter. It should be "dongles" instead of "cables". Change-Id: I7bd4307765517375caa2af86dfc929d0ef66c3e6 Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com> Reviewed-on: http://openocd.zylin.com/6040 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins * doc/manual: Fix @subpage handling The subpage "thelist" used to have a title "Pending and Open Tasks" but the commitc41db358a0
changed it to "The List". With @subpage, it now renders: "The List of The List enumerates opportunities for" instead of "The List of Pending and Open Tasks enumerates opportunities for" This commit fix it to "The List enumerates opportunities for" Change-Id: Ifee0dcd9b3c9f7e651a8748a7afda99eedea3c5c Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com> Reviewed-on: http://openocd.zylin.com/6041 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> * doc/manual: Fix function name typo We have both the singular form, register_command(), and the plural form register_commands(). Change-Id: I905ea83988b8ac70dd809b02d53b646aa4d66697 Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com> Reviewed-on: http://openocd.zylin.com/6042 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins Co-authored-by: Paul Fertser <fercerpav@gmail.com> Co-authored-by: Antonio Borneo <borneo.antonio@gmail.com> Co-authored-by: Jiri Kastner <cz172638@gmail.com> Co-authored-by: Tarek BOCHKATI <tarek.bouchkati@st.com> Co-authored-by: Bohdan Tymkiv <bohdan200@gmail.com> Co-authored-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Co-authored-by: Yasushi SHOJI <yashi@spacecubics.com>
This commit is contained in:
parent
3b5ba4d1db
commit
d57ab0b632
|
@ -600,7 +600,7 @@ RECURSIVE = YES
|
||||||
# excluded from the INPUT source files. This way you can easily exclude a
|
# 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.
|
# 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
|
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
|
||||||
# directories that are symbolic links (a Unix filesystem feature) are excluded
|
# 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
|
# contain include files that are not input files but should be processed by
|
||||||
# the preprocessor.
|
# the preprocessor.
|
||||||
|
|
||||||
INCLUDE_PATH =
|
INCLUDE_PATH = @builddir@/src
|
||||||
|
|
||||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
# 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
|
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||||
|
|
|
@ -6,8 +6,7 @@ AUTOMAKE_OPTIONS = gnu 1.6
|
||||||
DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
|
DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
|
||||||
|
|
||||||
# do not run Jim Tcl tests (esp. during distcheck)
|
# do not run Jim Tcl tests (esp. during distcheck)
|
||||||
check-recursive:
|
check-recursive: SUBDIRS :=
|
||||||
@true
|
|
||||||
|
|
||||||
nobase_dist_pkgdata_DATA = \
|
nobase_dist_pkgdata_DATA = \
|
||||||
contrib/libdcc/dcc_stdio.c \
|
contrib/libdcc/dcc_stdio.c \
|
||||||
|
@ -49,7 +48,7 @@ EXTRA_DIST += \
|
||||||
HACKING \
|
HACKING \
|
||||||
NEWTAPS \
|
NEWTAPS \
|
||||||
README.Windows \
|
README.Windows \
|
||||||
README.OSX \
|
README.macOS \
|
||||||
$(EXTRA_DIST_NEWS) \
|
$(EXTRA_DIST_NEWS) \
|
||||||
Doxyfile.in \
|
Doxyfile.in \
|
||||||
tools/logger.pl \
|
tools/logger.pl \
|
||||||
|
|
2
NEWS
2
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
|
cosmetic bugfixes. For more details about what has changed since the
|
||||||
last release, see the git repository history:
|
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
|
For older NEWS, see the NEWS files associated with each release
|
||||||
|
|
48
README
48
README
|
@ -101,34 +101,40 @@ Supported hardware
|
||||||
JTAG adapters
|
JTAG adapters
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
AICE, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432,
|
AICE, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432, BCM2835,
|
||||||
BCM2835, Bus Blaster, Buspirate, Chameleon, CMSIS-DAP, Cortino, DENX,
|
Bus Blaster, Buspirate, Cadence DPI, Chameleon, CMSIS-DAP, Cortino,
|
||||||
Digilent JTAG-SMT2, DLC 5, DLP-USB1232H, embedded projects, eStick,
|
Cypress KitProg, DENX, Digilent JTAG-SMT2, DLC 5, DLP-USB1232H,
|
||||||
FlashLINK, FlossJTAG, Flyswatter, Flyswatter2, Gateworks, Hoegl, ICDI,
|
embedded projects, eStick, FlashLINK, FlossJTAG, Flyswatter, Flyswatter2,
|
||||||
ICEBear, J-Link, JTAG VPI, JTAGkey, JTAGkey2, JTAG-lock-pick, KT-Link,
|
FTDI FT232R, Gateworks, Hoegl, ICDI, ICEBear, J-Link, JTAG VPI, JTAGkey,
|
||||||
Lisa/L, LPC1768-Stick, MiniModule, NGX, NXHX, OOCDLink, Opendous,
|
JTAGkey2, JTAG-lock-pick, KT-Link, Linux GPIOD, Lisa/L, LPC1768-Stick,
|
||||||
OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee, RLink, SheevaPlug
|
Mellanox rshim, MiniModule, NGX, Nuvoton Nu-Link, Nu-Link2, NXHX, NXP IMX GPIO,
|
||||||
devkit, Stellaris evkits, ST-LINK (SWO tracing supported),
|
OOCDLink, Opendous, OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee,
|
||||||
STM32-PerformanceStick, STR9-comStick, sysfsgpio, TUMPA, Turtelizer,
|
Remote Bitbang, RLink, SheevaPlug devkit, Stellaris evkits,
|
||||||
ULINK, USB-A9260, USB-Blaster, USB-JTAG, USBprog, VPACLink, VSLLink,
|
ST-LINK (SWO tracing supported), STM32-PerformanceStick, STR9-comStick,
|
||||||
Wiggler, XDS100v2, Xverve.
|
sysfsgpio, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
|
||||||
|
USB-JTAG, USBprog, VPACLink, VSLLink, Wiggler, XDS100v2, Xilinx XVC/PCIe,
|
||||||
|
Xverve.
|
||||||
|
|
||||||
Debug targets
|
Debug targets
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
ARM11, ARM7, ARM9, AVR32, Cortex-A, Cortex-R, Cortex-M, LS102x-SAP,
|
ARM: AArch64, ARM11, ARM7, ARM9, Cortex-A/R (v7-A/R), Cortex-M (ARMv{6/7/8}-M),
|
||||||
Feroceon/Dragonite, DSP563xx, DSP5680xx, EnSilica eSi-RISC, FA526, MIPS
|
FA526, Feroceon/Dragonite, XScale.
|
||||||
EJTAG, NDS32, RISC-V, XScale, Intel Quark.
|
ARCv2, AVR32, DSP563xx, DSP5680xx, EnSilica eSi-RISC, EJTAG (MIPS32, MIPS64),
|
||||||
|
Intel Quark, LS102x-SAP, NDS32, RISC-V, ST STM8.
|
||||||
|
|
||||||
Flash drivers
|
Flash drivers
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
ADUC702x, AT91SAM, ATH79, AVR, CFI, DSP5680xx, EFM32, EM357, eSi-TSMC, FM3,
|
ADUC702x, AT91SAM, AT91SAM9 (NAND), ATH79, ATmega128RFA1, Atmel SAM, AVR, CFI,
|
||||||
FM4, Freedom E SPI, GD32VF103, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx,
|
DSP5680xx, EFM32, EM357, eSi-RISC, eSi-TSMC, EZR32HG, FM3, FM4, Freedom E SPI,
|
||||||
LPC2900, LPCSPIFI, Marvell QSPI, Milandr, NIIET, NuMicro, PIC32mx, PSoC4,
|
i.MX31, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPC3180, LPC32xx,
|
||||||
PSoC5LP, SiM3x, Stellaris, STM32, STMSMI, STR7x, STR9x, nRF51; NAND controllers
|
LPCSPIFI, Marvell QSPI, MAX32, Milandr, MXC, NIIET, nRF51, nRF52 , NuMicro,
|
||||||
of AT91SAM9, LPC3180, LPC32xx, i.MX31, MXC, NUC910, Orion/Kirkwood, S3C24xx,
|
NUC910, Orion/Kirkwood, PIC32mx, PSoC4/5LP/6, Renesas RPC HF and SH QSPI,
|
||||||
S3C6400, XMC1xxx, XMC4xxx.
|
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
|
- autoconf >= 2.64
|
||||||
- automake >= 1.14
|
- automake >= 1.14
|
||||||
- texinfo
|
- texinfo >= 5.0
|
||||||
|
|
||||||
USB-based adapters depend on libusb-1.0 and some older drivers require
|
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
|
libusb-0.1 or libusb-compat-0.1. A compatible implementation, such as
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
Building OpenOCD for OSX
|
Building OpenOCD for macOS
|
||||||
------------------------
|
--------------------------
|
||||||
|
|
||||||
There are a few prerequisites you will need first:
|
There are a few prerequisites you will need first:
|
||||||
|
|
||||||
- Xcode 5 (install from the AppStore)
|
- Xcode (install from the AppStore)
|
||||||
- Command Line Tools (install from Xcode 5 -> Preferences -> Downloads)
|
- Command Line Tools (install from Xcode -> Preferences -> Downloads)
|
||||||
- Gentoo Prefix (http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap.xml)
|
- Gentoo Prefix (http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap.xml)
|
||||||
or
|
or
|
||||||
- Homebrew (http://mxcl.github.io/homebrew/)
|
- 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)
|
- 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
|
With Gentoo Prefix you can build the release version or the latest
|
||||||
devel version (-9999) the usual way described in the Gentoo
|
devel version (-9999) the usual way described in the Gentoo
|
||||||
documentation. Alternatively, install the prerequisites and build
|
documentation. Alternatively, install the prerequisites and build
|
52
configure.ac
52
configure.ac
|
@ -1,5 +1,5 @@
|
||||||
AC_PREREQ(2.64)
|
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>])
|
[OpenOCD Mailing List <openocd-devel@lists.sourceforge.net>])
|
||||||
AC_CONFIG_SRCDIR([src/openocd.c])
|
AC_CONFIG_SRCDIR([src/openocd.c])
|
||||||
AC_CONFIG_AUX_DIR([.])
|
AC_CONFIG_AUX_DIR([.])
|
||||||
|
@ -25,7 +25,8 @@ AH_BOTTOM([
|
||||||
|
|
||||||
AC_LANG([C])
|
AC_LANG([C])
|
||||||
AC_PROG_CC
|
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
|
AM_PROG_CC_C_O
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
PKG_PROG_PKG_CONFIG([0.23])
|
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_ASSERT
|
||||||
AC_HEADER_STDBOOL
|
AC_HEADER_STDBOOL
|
||||||
AC_HEADER_TIME
|
|
||||||
|
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
|
@ -139,8 +139,10 @@ m4_define([HIDAPI_USB1_ADAPTERS],
|
||||||
|
|
||||||
m4_define([LIBFTDI_ADAPTERS],
|
m4_define([LIBFTDI_ADAPTERS],
|
||||||
[[[usb_blaster], [Altera USB-Blaster Compatible], [USB_BLASTER]],
|
[[[usb_blaster], [Altera USB-Blaster Compatible], [USB_BLASTER]],
|
||||||
[[presto], [ASIX Presto Adapter], [PRESTO]],
|
[[presto], [ASIX Presto Adapter], [PRESTO]]])
|
||||||
[[openjtag], [OpenJTAG Adapter], [OPENJTAG]]])
|
|
||||||
|
m4_define([LIBFTDI_USB1_ADAPTERS],
|
||||||
|
[[[openjtag], [OpenJTAG Adapter], [OPENJTAG]]])
|
||||||
|
|
||||||
m4_define([LIBGPIOD_ADAPTERS],
|
m4_define([LIBGPIOD_ADAPTERS],
|
||||||
[[[linuxgpiod], [Linux GPIO bitbang through libgpiod], [LINUXGPIOD]]])
|
[[[linuxgpiod], [Linux GPIO bitbang through libgpiod], [LINUXGPIOD]]])
|
||||||
|
@ -151,6 +153,8 @@ m4_define([LIBJAYLINK_ADAPTERS],
|
||||||
m4_define([PCIE_ADAPTERS],
|
m4_define([PCIE_ADAPTERS],
|
||||||
[[[xlnx_pcie_xvc], [Xilinx XVC/PCIe], [XLNX_PCIE_XVC]]])
|
[[[xlnx_pcie_xvc], [Xilinx XVC/PCIe], [XLNX_PCIE_XVC]]])
|
||||||
|
|
||||||
|
m4_define([OPTIONAL_LIBRARIES],
|
||||||
|
[[[capstone], [Use Capstone disassembly framework], []]])
|
||||||
|
|
||||||
AC_ARG_ENABLE([doxygen-html],
|
AC_ARG_ENABLE([doxygen-html],
|
||||||
AS_HELP_STRING([--disable-doxygen-html],
|
AS_HELP_STRING([--disable-doxygen-html],
|
||||||
|
@ -249,6 +253,7 @@ AC_ARG_ADAPTERS([
|
||||||
HIDAPI_ADAPTERS,
|
HIDAPI_ADAPTERS,
|
||||||
HIDAPI_USB1_ADAPTERS,
|
HIDAPI_USB1_ADAPTERS,
|
||||||
LIBFTDI_ADAPTERS,
|
LIBFTDI_ADAPTERS,
|
||||||
|
LIBFTDI_USB1_ADAPTERS
|
||||||
LIBGPIOD_ADAPTERS,
|
LIBGPIOD_ADAPTERS,
|
||||||
LIBJAYLINK_ADAPTERS
|
LIBJAYLINK_ADAPTERS
|
||||||
],[auto])
|
],[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([LIBUSB0], [libusb], [use_libusb0=yes], [use_libusb0=no])
|
||||||
|
|
||||||
PKG_CHECK_MODULES([CAPSTONE], [capstone], [have_capstone=yes],
|
AC_ARG_WITH([capstone],
|
||||||
[have_capstone=no])
|
AS_HELP_STRING([--with-capstone], [Use Capstone disassembly library (default=auto)])
|
||||||
|
, [
|
||||||
|
enable_capstone=$withval
|
||||||
|
], [
|
||||||
|
enable_capstone=auto
|
||||||
|
])
|
||||||
|
|
||||||
AS_IF([test "x$have_capstone" = "xyes"], [
|
AS_IF([test "x$enable_capstone" != xno], [
|
||||||
AC_DEFINE([HAVE_CAPSTONE], [1], [1 if you have captone disassembly framework.])
|
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 captone 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
|
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_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([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_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([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [libgpiod])
|
||||||
PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2])
|
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"], [
|
AS_IF([test "x$enable_linuxgpiod" != "xno"], [
|
||||||
build_bitbang=yes
|
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_HIDAPI], [test "x$use_hidapi" = "xyes"])
|
||||||
AM_CONDITIONAL([USE_LIBJAYLINK], [test "x$use_libjaylink" = "xyes"])
|
AM_CONDITIONAL([USE_LIBJAYLINK], [test "x$use_libjaylink" = "xyes"])
|
||||||
AM_CONDITIONAL([RSHIM], [test "x$build_rshim" = "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], [test "x$build_minidriver" = "xyes"])
|
||||||
AM_CONDITIONAL([MINIDRIVER_DUMMY], [test "x$build_minidriver_dummy" = "xyes"])
|
AM_CONDITIONAL([MINIDRIVER_DUMMY], [test "x$build_minidriver_dummy" = "xyes"])
|
||||||
|
@ -856,8 +866,10 @@ echo OpenOCD configuration summary
|
||||||
echo --------------------------------------------------
|
echo --------------------------------------------------
|
||||||
m4_foreach([adapter], [USB1_ADAPTERS, USB0_ADAPTERS,
|
m4_foreach([adapter], [USB1_ADAPTERS, USB0_ADAPTERS,
|
||||||
HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS,
|
HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS,
|
||||||
|
LIBFTDI_USB1_ADAPTERS,
|
||||||
LIBGPIOD_ADAPTERS,
|
LIBGPIOD_ADAPTERS,
|
||||||
LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS],
|
LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS,
|
||||||
|
OPTIONAL_LIBRARIES],
|
||||||
[s=m4_format(["%-40s"], ADAPTER_DESC([adapter]))
|
[s=m4_format(["%-40s"], ADAPTER_DESC([adapter]))
|
||||||
AS_CASE([$ADAPTER_VAR([adapter])],
|
AS_CASE([$ADAPTER_VAR([adapter])],
|
||||||
[auto], [
|
[auto], [
|
||||||
|
|
|
@ -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}=="374f", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3753", 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
|
# Cypress KitProg in KitProg mode
|
||||||
ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="f139", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
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"
|
ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00ff", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||||
|
|
||||||
# Ambiq Micro EVK and Debug boards.
|
# Ambiq Micro EVK and Debug boards.
|
||||||
ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="6010", 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="664", GROUP="plugdev", TAG+="uaccess"
|
ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="6011", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||||
ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="1106", MODE="664", GROUP="plugdev", TAG+="uaccess"
|
ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="1106", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||||
|
|
||||||
# Marvell Sheevaplug
|
# Marvell Sheevaplug
|
||||||
ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||||
|
|
|
@ -16,13 +16,11 @@
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
import Prelude
|
import Prelude
|
||||||
import Control.Applicative
|
|
||||||
import Network.Socket
|
import Network.Socket
|
||||||
import System.IO.Streams.Core hiding (connect)
|
import System.IO.Streams.Core hiding (connect)
|
||||||
import System.IO.Streams.Network
|
import System.IO.Streams.Network
|
||||||
import System.IO.Streams.Attoparsec
|
import System.IO.Streams.Attoparsec
|
||||||
import Data.Attoparsec.ByteString.Char8
|
import Data.Attoparsec.ByteString.Char8
|
||||||
import Data.Attoparsec.Combinator
|
|
||||||
import Data.ByteString.Char8 hiding (putStrLn, concat, map)
|
import Data.ByteString.Char8 hiding (putStrLn, concat, map)
|
||||||
import Text.Printf
|
import Text.Printf
|
||||||
|
|
||||||
|
@ -38,15 +36,14 @@ mdwParser = (manyTill anyChar (string ": ") *>
|
||||||
`sepBy` string " \n"
|
`sepBy` string " \n"
|
||||||
|
|
||||||
ocdMdw :: (InputStream ByteString, OutputStream ByteString) -> Integer -> Integer -> IO [Integer]
|
ocdMdw :: (InputStream ByteString, OutputStream ByteString) -> Integer -> Integer -> IO [Integer]
|
||||||
ocdMdw s start count = do
|
ocdMdw s start qnt = do
|
||||||
s <- ocdExec s $ "mdw " ++ show start ++ " " ++ show count
|
res <- ocdExec s $ "mdw " ++ show start ++ " " ++ show qnt
|
||||||
case parseOnly mdwParser (pack s) of
|
case parseOnly mdwParser (pack res) of
|
||||||
Right r -> return $ concat r
|
Right r -> return $ concat r
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
osock <- socket AF_INET Stream defaultProtocol
|
osock <- socket AF_INET Stream defaultProtocol
|
||||||
haddr <- inet_addr "127.0.0.1"
|
connect osock (SockAddrInet 6666 $ tupleToHostAddress (127,0,0,1))
|
||||||
connect osock (SockAddrInet 6666 haddr)
|
|
||||||
ostreams <- socketToStreams osock
|
ostreams <- socketToStreams osock
|
||||||
putStrLn "Halting the target, full log output captured:"
|
putStrLn "Halting the target, full log output captured:"
|
||||||
ocdExec ostreams "capture \"halt\"" >>= putStrLn
|
ocdExec ostreams "capture \"halt\"" >>= putStrLn
|
||||||
|
|
|
@ -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
|
A single handler may be registered using multiple names, but any name
|
||||||
may have only one handler associated with it.
|
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
|
registration, while the @c unregister_command() and
|
||||||
@c unregister_all_commands() functions will remove existing commands.
|
@c unregister_all_commands() functions will remove existing commands.
|
||||||
These may be called at any time, allowing the command set to change in
|
These may be called at any time, allowing the command set to change in
|
||||||
|
|
|
@ -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
|
Developers that want to contribute to OpenOCD should read the following
|
||||||
sections before starting work:
|
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
|
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).
|
check the mailing list archives to find the status of your feature (or bug).
|
||||||
- The @subpage styleguide provides rules that developers should
|
- The @subpage styleguide provides rules that developers should
|
||||||
|
|
|
@ -15,9 +15,6 @@ autotools in the correct sequence.
|
||||||
|
|
||||||
When run after a fresh checkout, this script generates the build files
|
When run after a fresh checkout, this script generates the build files
|
||||||
required to compile the project, producing the project configure script.
|
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
|
@subsection primerbootstrapcures Problems Solved By Bootstrap
|
||||||
|
|
||||||
|
|
|
@ -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
|
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.
|
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
|
A separate primer contains information about @subpage primerjtagbs for
|
||||||
developers that want to extend OpenOCD for such purposes.
|
developers that want to extend OpenOCD for such purposes.
|
||||||
|
|
|
@ -186,9 +186,9 @@ comments.
|
||||||
"empty" lines should be removed from the block.
|
"empty" lines should be removed from the block.
|
||||||
-# Only single spaces should be used; do @b not add mid-line indentation.
|
-# 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
|
-# 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:
|
- 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
|
@section styledoxyall Doxygen Style Guide
|
||||||
|
|
||||||
|
|
100
doc/openocd.texi
100
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
|
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)
|
(such as a ribbon cable with a 10-pin or 20-pin IDC connector)
|
||||||
and a USB cable on the other.
|
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.
|
older ones may use a PC parallel port, or even a serial port.
|
||||||
|
|
||||||
@enumerate
|
@enumerate
|
||||||
|
@ -4547,8 +4547,10 @@ The current implementation supports three JTAG TAP cores:
|
||||||
@end itemize
|
@end itemize
|
||||||
And two debug interfaces cores:
|
And two debug interfaces cores:
|
||||||
@itemize @minus
|
@itemize @minus
|
||||||
@item @code{Advanced debug interface} (See: @url{http://opencores.org/project@comma{}adv_debug_sys})
|
@item @code{Advanced debug interface}
|
||||||
@item @code{SoC Debug Interface} (See: @url{http://opencores.org/project@comma{}dbg_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
|
@end itemize
|
||||||
@item @code{quark_d20xx} -- an Intel Quark D20xx core.
|
@item @code{quark_d20xx} -- an Intel Quark D20xx core.
|
||||||
@item @code{quark_x10xx} -- an Intel Quark X10xx 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).
|
required (see 'set' command).
|
||||||
|
|
||||||
@example
|
@example
|
||||||
flash bank $_FLASHNAME stmqspi 0x90000000 0 0 0 $_TARGETNAME 0xA0001000
|
flash bank $_FLASHNAME stmqspi 0x90000000 0 0 0 \
|
||||||
flash bank $_FLASHNAME stmqspi 0x70000000 0 0 0 $_TARGETNAME 0xA0001400
|
$_TARGETNAME 0xA0001000
|
||||||
|
flash bank $_FLASHNAME stmqspi 0x70000000 0 0 0 \
|
||||||
|
$_TARGETNAME 0xA0001400
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
There are three specific commands
|
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
|
To check basic communication settings, issue
|
||||||
@example
|
@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
|
@end example
|
||||||
for single flash mode or
|
for single flash mode or
|
||||||
@example
|
@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
|
@end example
|
||||||
for dual flash mode. This should return the status register contents.
|
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
|
@example
|
||||||
flash bank $_FLASHNAME ath79 0xbf000000 0 0 0 $_TARGETNAME
|
flash bank $_FLASHNAME ath79 0xbf000000 0 0 0 $_TARGETNAME
|
||||||
|
|
||||||
# When using multiple chipselects the base should be different for each,
|
# When using multiple chipselects the base should be different
|
||||||
# otherwise the write_image command is not able to distinguish the
|
# for each, otherwise the write_image command is not able to
|
||||||
# banks.
|
# distinguish the banks.
|
||||||
flash bank flash0 ath79 0xbf000000 0 0 0 $_TARGETNAME cs0
|
flash bank flash0 ath79 0xbf000000 0 0 0 $_TARGETNAME cs0
|
||||||
flash bank flash1 ath79 0x10000000 0 0 0 $_TARGETNAME cs1
|
flash bank flash1 ath79 0x10000000 0 0 0 $_TARGETNAME cs1
|
||||||
flash bank flash2 ath79 0x20000000 0 0 0 $_TARGETNAME cs2
|
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
|
NVMUSERROW: 0xFFFFFC5DD8E0C788
|
||||||
# Write 0xFFFFFC5DD8E0C788 to user row
|
# Write 0xFFFFFC5DD8E0C788 to user row
|
||||||
>at91samd nvmuserrow 0xFFFFFC5DD8E0C788
|
>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
|
>at91samd nvmuserrow 0x12345 0xFFF00
|
||||||
@end example
|
@end example
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -6028,8 +6035,9 @@ The reserved fields are always masked out and cannot be changed.
|
||||||
USER PAGE: 0xAEECFF80FE9A9239
|
USER PAGE: 0xAEECFF80FE9A9239
|
||||||
# Write
|
# Write
|
||||||
>atsame5 userpage 0xAEECFF80FE9A9239
|
>atsame5 userpage 0xAEECFF80FE9A9239
|
||||||
# Write 2 to SEESBLK and 4 to SEEPSZ fields but leave other bits unchanged
|
# Write 2 to SEESBLK and 4 to SEEPSZ fields but leave other
|
||||||
# (setup SmartEEPROM of virtual size 8192 bytes)
|
# bits unchanged (setup SmartEEPROM of virtual size 8192
|
||||||
|
# bytes)
|
||||||
>atsame5 userpage 0x4200000000 0x7f00000000
|
>atsame5 userpage 0x4200000000 0x7f00000000
|
||||||
@end example
|
@end example
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -6788,7 +6796,8 @@ The driver probes for a number of these chips and autoconfigures itself,
|
||||||
apart from the base address.
|
apart from the base address.
|
||||||
|
|
||||||
@example
|
@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 example
|
||||||
@end deffn
|
@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.
|
PSoC6 is equipped with NOR Flash so erased Flash reads as 0x00.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
flash bank main_flash_cm0 psoc6 0x10000000 0 0 0 $@{TARGET@}.cm0
|
flash bank main_flash_cm0 psoc6 0x10000000 0 0 0 \
|
||||||
flash bank work_flash_cm0 psoc6 0x14000000 0 0 0 $@{TARGET@}.cm0
|
$@{TARGET@}.cm0
|
||||||
flash bank super_flash_user_cm0 psoc6 0x16000800 0 0 0 $@{TARGET@}.cm0
|
flash bank work_flash_cm0 psoc6 0x14000000 0 0 0 \
|
||||||
flash bank super_flash_nar_cm0 psoc6 0x16001A00 0 0 0 $@{TARGET@}.cm0
|
$@{TARGET@}.cm0
|
||||||
flash bank super_flash_key_cm0 psoc6 0x16005A00 0 0 0 $@{TARGET@}.cm0
|
flash bank super_flash_user_cm0 psoc6 0x16000800 0 0 0 \
|
||||||
flash bank super_flash_toc2_cm0 psoc6 0x16007C00 0 0 0 $@{TARGET@}.cm0
|
$@{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 main_flash_cm4 psoc6 0x10000000 0 0 0 \
|
||||||
flash bank work_flash_cm4 psoc6 0x14000000 0 0 0 $@{TARGET@}.cm4
|
$@{TARGET@}.cm4
|
||||||
flash bank super_flash_user_cm4 psoc6 0x16000800 0 0 0 $@{TARGET@}.cm4
|
flash bank work_flash_cm4 psoc6 0x14000000 0 0 0 \
|
||||||
flash bank super_flash_nar_cm4 psoc6 0x16001A00 0 0 0 $@{TARGET@}.cm4
|
$@{TARGET@}.cm4
|
||||||
flash bank super_flash_key_cm4 psoc6 0x16005A00 0 0 0 $@{TARGET@}.cm4
|
flash bank super_flash_user_cm4 psoc6 0x16000800 0 0 0 \
|
||||||
flash bank super_flash_toc2_cm4 psoc6 0x16007C00 0 0 0 $@{TARGET@}.cm4
|
$@{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
|
@end example
|
||||||
|
|
||||||
psoc6-specific commands
|
psoc6-specific commands
|
||||||
|
@ -7110,7 +7131,8 @@ will be touched).
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
@example
|
@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
|
stm32h7x option_write 0 0x20 0x8000000 0x8000000
|
||||||
@end example
|
@end example
|
||||||
@end deffn
|
@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
|
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
|
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
|
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.
|
OpenOCD currently supports ARC EM processors.
|
||||||
There is a set ARC-specific OpenOCD commands that allow low-level
|
There is a set ARC-specific OpenOCD commands that allow low-level
|
||||||
access to the core and provide necessary support for ARC extensibility and
|
access to the core and provide necessary support for ARC extensibility and
|
||||||
|
@ -10776,7 +10798,8 @@ target remote localhost:3333
|
||||||
@item
|
@item
|
||||||
A pipe connection is typically started as follows:
|
A pipe connection is typically started as follows:
|
||||||
@example
|
@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
|
@end example
|
||||||
This would cause GDB to run OpenOCD and communicate using pipes (stdin/stdout).
|
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
|
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
|
@item ThreadX symbols
|
||||||
_tx_thread_current_ptr, _tx_thread_created_ptr, _tx_thread_created_count.
|
_tx_thread_current_ptr, _tx_thread_created_ptr, _tx_thread_created_count.
|
||||||
@item FreeRTOS symbols
|
@item FreeRTOS symbols
|
||||||
@c The following is taken from recent texinfo to provide compatibility
|
@raggedright
|
||||||
@c with ancient versions that do not support @raggedright
|
|
||||||
@tex
|
|
||||||
\begingroup
|
|
||||||
\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
|
|
||||||
pxCurrentTCB, pxReadyTasksLists, xDelayedTaskList1, xDelayedTaskList2,
|
pxCurrentTCB, pxReadyTasksLists, xDelayedTaskList1, xDelayedTaskList2,
|
||||||
pxDelayedTaskList, pxOverflowDelayedTaskList, xPendingReadyList,
|
pxDelayedTaskList, pxOverflowDelayedTaskList, xPendingReadyList,
|
||||||
uxCurrentNumberOfTasks, uxTopUsedPriority.
|
uxCurrentNumberOfTasks, uxTopUsedPriority.
|
||||||
\par
|
@end raggedright
|
||||||
\endgroup
|
|
||||||
@end tex
|
|
||||||
@item linux symbols
|
@item linux symbols
|
||||||
init_task.
|
init_task.
|
||||||
@item ChibiOS symbols
|
@item ChibiOS symbols
|
||||||
|
@ -11011,11 +11028,14 @@ Rtos::sListSuspended, Rtos::sMaxPriorities, Rtos::sCurrentTaskCount.
|
||||||
@item mqx symbols
|
@item mqx symbols
|
||||||
_mqx_kernel_data, MQX_init_struct.
|
_mqx_kernel_data, MQX_init_struct.
|
||||||
@item uC/OS-III symbols
|
@item uC/OS-III symbols
|
||||||
OSRunning, OSTCBCurPtr, OSTaskDbgListPtr, OSTaskQty
|
OSRunning, OSTCBCurPtr, OSTaskDbgListPtr, OSTaskQty.
|
||||||
@item nuttx symbols
|
@item nuttx symbols
|
||||||
g_readytorun, g_tasklisttable
|
g_readytorun, g_tasklisttable.
|
||||||
@item RIOT symbols
|
@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
|
@end table
|
||||||
|
|
||||||
For most RTOS supported the above symbols will be exported by default. However for
|
For most RTOS supported the above symbols will be exported by default. However for
|
||||||
|
|
|
@ -105,7 +105,7 @@ static int at91sam9_init(struct nand_device *nand)
|
||||||
/**
|
/**
|
||||||
* Enable NAND device attached to a controller.
|
* 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.
|
* @return Success or failure of the enabling.
|
||||||
*/
|
*/
|
||||||
static int at91sam9_enable(struct nand_device *nand)
|
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.
|
* 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.
|
* @return Success or failure of the disabling.
|
||||||
*/
|
*/
|
||||||
static int at91sam9_disable(struct nand_device *nand)
|
static int at91sam9_disable(struct nand_device *nand)
|
||||||
|
|
|
@ -1709,6 +1709,9 @@ static int FLASHD_EraseEntireBank(struct sam4_bank_private *pPrivate)
|
||||||
/**
|
/**
|
||||||
* Erases the entire flash.
|
* Erases the entire flash.
|
||||||
* @param pPrivate - the info about the bank.
|
* @param pPrivate - the info about the bank.
|
||||||
|
* @param firstPage
|
||||||
|
* @param numPages
|
||||||
|
* @param status
|
||||||
*/
|
*/
|
||||||
static int FLASHD_ErasePages(struct sam4_bank_private *pPrivate,
|
static int FLASHD_ErasePages(struct sam4_bank_private *pPrivate,
|
||||||
int firstPage,
|
int firstPage,
|
||||||
|
|
|
@ -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 target The target, presumed to contain one or more banks.
|
||||||
* @param addr An address that is within the range of the bank.
|
* @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
|
* @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,
|
int get_flash_bank_by_addr(struct target *target, target_addr_t addr, bool check,
|
||||||
struct flash_bank **result_bank);
|
struct flash_bank **result_bank);
|
||||||
|
|
|
@ -193,8 +193,8 @@ static int dsp5680xx_probe(struct flash_bank *bank)
|
||||||
/**
|
/**
|
||||||
* The flash module (FM) on the dsp5680xx supports both individual sector
|
* The flash module (FM) on the dsp5680xx supports both individual sector
|
||||||
* and mass erase of the flash memory.
|
* and mass erase of the flash memory.
|
||||||
* If this function is called with @first == @last == 0 or if @first is the
|
* If this function is called with @a first == @a last == 0 or if @a first is the
|
||||||
* first sector (#0) and @last is the last sector then the mass erase command
|
* first sector (#0) and @a last is the last sector then the mass erase command
|
||||||
* is executed (much faster than erasing each sector individually).
|
* is executed (much faster than erasing each sector individually).
|
||||||
*
|
*
|
||||||
* @param bank
|
* @param bank
|
||||||
|
|
|
@ -453,8 +453,8 @@ static int lpc2900_write_index_page(struct flash_bank *bank,
|
||||||
/**
|
/**
|
||||||
* Calculate FPTR.TR register value for desired program/erase time.
|
* Calculate FPTR.TR register value for desired program/erase time.
|
||||||
*
|
*
|
||||||
* @param clock System clock in Hz
|
* @param clock_var System clock in Hz
|
||||||
* @param time Program/erase time in µs
|
* @param time_var Program/erase time in µs
|
||||||
*/
|
*/
|
||||||
static uint32_t lpc2900_calc_tr(uint32_t clock_var, uint32_t time_var)
|
static uint32_t lpc2900_calc_tr(uint32_t clock_var, uint32_t time_var)
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,7 +82,7 @@ struct max32xxx_flash_bank {
|
||||||
|
|
||||||
/* see contrib/loaders/flash/max32xxx/max32xxx.s for src */
|
/* see contrib/loaders/flash/max32xxx/max32xxx.s for src */
|
||||||
static const uint8_t write_code[] = {
|
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]
|
/* Config Command: flash bank name driver base size chip_width bus_width target [driver_option]
|
||||||
|
|
|
@ -873,7 +873,6 @@ exit:
|
||||||
|
|
||||||
/** ***********************************************************************************************
|
/** ***********************************************************************************************
|
||||||
* @brief Performs Mass Erase operation
|
* @brief Performs Mass Erase operation
|
||||||
* @param bank flash bank index to erase
|
|
||||||
* @return ERROR_OK in case of success, ERROR_XXX code otherwise
|
* @return ERROR_OK in case of success, ERROR_XXX code otherwise
|
||||||
*************************************************************************************************/
|
*************************************************************************************************/
|
||||||
COMMAND_HANDLER(psoc6_handle_mass_erase_command)
|
COMMAND_HANDLER(psoc6_handle_mass_erase_command)
|
||||||
|
|
|
@ -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;
|
uint32_t io_base = stmqspi_info->io_base;
|
||||||
uint8_t byte;
|
uint8_t byte;
|
||||||
unsigned int type, count, len1, len2;
|
unsigned int type, count, len1, len2;
|
||||||
int retval;
|
int retval = ERROR_OK;
|
||||||
|
|
||||||
/* invalidate both ids */
|
/* invalidate both ids */
|
||||||
*id1 = 0;
|
*id1 = 0;
|
||||||
|
|
|
@ -36,8 +36,8 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bitmap_zero - Clears all the bits in memory
|
* bitmap_zero - Clears all the bits in memory
|
||||||
* @dst: the address of the bitmap
|
* @param dst the address of the bitmap
|
||||||
* @nbits: the number of bits to clear
|
* @param nbits the number of bits to clear
|
||||||
*/
|
*/
|
||||||
static inline void bitmap_zero(unsigned long *dst, unsigned int nbits)
|
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
|
* clear_bit - Clear a bit in memory
|
||||||
* @nr: the bit to set
|
* @param nr the bit to set
|
||||||
* @addr: the address to start counting from
|
* @param addr the address to start counting from
|
||||||
*/
|
*/
|
||||||
static inline void clear_bit(unsigned int nr, volatile unsigned long *addr)
|
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
|
* set_bit - Set a bit in memory
|
||||||
* @nr: the bit to set
|
* @param nr the bit to set
|
||||||
* @addr: the address to start counting from
|
* @param addr the address to start counting from
|
||||||
*/
|
*/
|
||||||
static inline void set_bit(unsigned int nr, volatile unsigned long *addr)
|
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
|
* test_bit - Determine whether a bit is set
|
||||||
* @nr: bit number to test
|
* @param nr bit number to test
|
||||||
* @addr: Address to start counting from
|
* @param addr Address to start counting from
|
||||||
*/
|
*/
|
||||||
static inline int test_bit(unsigned int nr, const volatile unsigned long *addr)
|
static inline int test_bit(unsigned int nr, const volatile unsigned long *addr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,8 +64,8 @@ extern void __list_add(struct list_head *new,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* list_add - add a new entry
|
* list_add - add a new entry
|
||||||
* @new: new entry to be added
|
* @param new new entry to be added
|
||||||
* @head: list head to add it after
|
* @param head list head to add it after
|
||||||
*
|
*
|
||||||
* Insert a new entry after the specified head.
|
* Insert a new entry after the specified head.
|
||||||
* This is good for implementing stacks.
|
* 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
|
* list_add_tail - add a new entry
|
||||||
* @new: new entry to be added
|
* @param new new entry to be added
|
||||||
* @head: list head to add it before
|
* @param head list head to add it before
|
||||||
*
|
*
|
||||||
* Insert a new entry before the specified head.
|
* Insert a new entry before the specified head.
|
||||||
* This is useful for implementing queues.
|
* 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.
|
* 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
|
* Note: list_empty() on entry does not return true after this, the entry is
|
||||||
* in an undefined state.
|
* in an undefined state.
|
||||||
*/
|
*/
|
||||||
|
@ -127,10 +127,10 @@ extern void list_del(struct list_head *entry);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* list_replace - replace old entry by new one
|
* list_replace - replace old entry by new one
|
||||||
* @old : the element to be replaced
|
* @param old the element to be replaced
|
||||||
* @new : the new element to insert
|
* @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,
|
static inline void list_replace(struct list_head *old,
|
||||||
struct list_head *new)
|
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.
|
* 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)
|
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_move - delete from one list and add as another's head
|
||||||
* @list: the entry to move
|
* @param list the entry to move
|
||||||
* @head: the head that will precede our entry
|
* @param head the head that will precede our entry
|
||||||
*/
|
*/
|
||||||
static inline void list_move(struct list_head *list, struct list_head *head)
|
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_move_tail - delete from one list and add as another's tail
|
||||||
* @list: the entry to move
|
* @param list the entry to move
|
||||||
* @head: the head that will follow our entry
|
* @param head the head that will follow our entry
|
||||||
*/
|
*/
|
||||||
static inline void list_move_tail(struct list_head *list,
|
static inline void list_move_tail(struct list_head *list,
|
||||||
struct list_head *head)
|
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_is_last - tests whether @a list is the last entry in list @a head
|
||||||
* @list: the entry to test
|
* @param list the entry to test
|
||||||
* @head: the head of the list
|
* @param head the head of the list
|
||||||
*/
|
*/
|
||||||
static inline int list_is_last(const struct list_head *list,
|
static inline int list_is_last(const struct list_head *list,
|
||||||
const struct list_head *head)
|
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
|
* 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)
|
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
|
* 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:
|
* Description:
|
||||||
* tests whether a list is empty _and_ checks that no other CPU might be
|
* 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
|
* 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)
|
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.
|
* 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)
|
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_cut_position - cut a list into two
|
||||||
* @list: a new list to add all removed entries
|
* @param list a new list to add all removed entries
|
||||||
* @head: a list with entries
|
* @param head a list with entries
|
||||||
* @entry: an entry within head, could be the head itself
|
* @param entry an entry within head, could be the head itself
|
||||||
* and if so we won't cut the list
|
* and if so we won't cut the list
|
||||||
*
|
*
|
||||||
* This helper moves the initial part of @head, up to and
|
* This helper moves the initial part of @a head, up to and
|
||||||
* including @entry, from @head to @list. You should
|
* including @a entry, from @a head to @a list. You should
|
||||||
* pass on @entry an element you know is on @head. @list
|
* 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
|
* should be an empty list or a list you do not care about
|
||||||
* losing its data.
|
* 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_splice - join two lists, this is designed for stacks
|
||||||
* @list: the new list to add.
|
* @param list the new list to add.
|
||||||
* @head: the place to add it in the first list.
|
* @param head the place to add it in the first list.
|
||||||
*/
|
*/
|
||||||
static inline void list_splice(const struct list_head *list,
|
static inline void list_splice(const struct list_head *list,
|
||||||
struct list_head *head)
|
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_splice_tail - join two lists, each list being a queue
|
||||||
* @list: the new list to add.
|
* @param list the new list to add.
|
||||||
* @head: the place to add it in the first list.
|
* @param head the place to add it in the first list.
|
||||||
*/
|
*/
|
||||||
static inline void list_splice_tail(struct list_head *list,
|
static inline void list_splice_tail(struct list_head *list,
|
||||||
struct list_head *head)
|
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_splice_init - join two lists and reinitialise the emptied list.
|
||||||
* @list: the new list to add.
|
* @param list the new list to add.
|
||||||
* @head: the place to add it in the first list.
|
* @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,
|
static inline void list_splice_init(struct list_head *list,
|
||||||
struct list_head *head)
|
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_splice_tail_init - join two lists and reinitialise the emptied list
|
||||||
* @list: the new list to add.
|
* @param list the new list to add.
|
||||||
* @head: the place to add it in the first list.
|
* @param head the place to add it in the first list.
|
||||||
*
|
*
|
||||||
* Each of the lists is a queue.
|
* 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,
|
static inline void list_splice_tail_init(struct list_head *list,
|
||||||
struct list_head *head)
|
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
|
* list_entry - get the struct for this entry
|
||||||
* @ptr: the &struct list_head pointer.
|
* @param ptr the &struct list_head pointer.
|
||||||
* @type: the type of the struct this is embedded in.
|
* @param type the type of the struct this is embedded in.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*/
|
*/
|
||||||
#define list_entry(ptr, type, member) \
|
#define list_entry(ptr, type, member) \
|
||||||
container_of(ptr, type, member)
|
container_of(ptr, type, member)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* list_first_entry - get the first element from a list
|
* list_first_entry - get the first element from a list
|
||||||
* @ptr: the list head to take the element from.
|
* @param ptr the list head to take the element from.
|
||||||
* @type: the type of the struct this is embedded in.
|
* @param type the type of the struct this is embedded in.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*
|
*
|
||||||
* Note, that list is expected to be not empty.
|
* 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
|
* list_for_each - iterate over a list
|
||||||
* @pos: the &struct list_head to use as a loop cursor.
|
* @param pos the &struct list_head to use as a loop cursor.
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
*/
|
*/
|
||||||
#define list_for_each(pos, head) \
|
#define list_for_each(pos, head) \
|
||||||
for (pos = (head)->next; prefetch(pos->next), 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
|
* __list_for_each - iterate over a list
|
||||||
* @pos: the &struct list_head to use as a loop cursor.
|
* @param pos the &struct list_head to use as a loop cursor.
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
*
|
*
|
||||||
* This variant differs from list_for_each() in that it's the
|
* This variant differs from list_for_each() in that it's the
|
||||||
* simplest possible list iteration code, no prefetching is done.
|
* 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
|
* list_for_each_prev - iterate over a list backwards
|
||||||
* @pos: the &struct list_head to use as a loop cursor.
|
* @param pos the &struct list_head to use as a loop cursor.
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
*/
|
*/
|
||||||
#define list_for_each_prev(pos, head) \
|
#define list_for_each_prev(pos, head) \
|
||||||
for (pos = (head)->prev; prefetch(pos->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
|
* 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.
|
* @param pos the &struct list_head to use as a loop cursor.
|
||||||
* @n: another &struct list_head to use as temporary storage
|
* @param n another &struct list_head to use as temporary storage
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
*/
|
*/
|
||||||
#define list_for_each_safe(pos, n, head) \
|
#define list_for_each_safe(pos, n, head) \
|
||||||
for (pos = (head)->next, n = pos->next; pos != (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
|
* 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.
|
* @param pos the &struct list_head to use as a loop cursor.
|
||||||
* @n: another &struct list_head to use as temporary storage
|
* @param n another &struct list_head to use as temporary storage
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
*/
|
*/
|
||||||
#define list_for_each_prev_safe(pos, n, head) \
|
#define list_for_each_prev_safe(pos, n, head) \
|
||||||
for (pos = (head)->prev, n = pos->prev; \
|
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
|
* list_for_each_entry - iterate over list of given type
|
||||||
* @pos: the type * to use as a loop cursor.
|
* @param pos the type * to use as a loop cursor.
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*/
|
*/
|
||||||
#define list_for_each_entry(pos, head, member) \
|
#define list_for_each_entry(pos, head, member) \
|
||||||
for (pos = list_entry((head)->next, typeof(*pos), 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.
|
* list_for_each_entry_reverse - iterate backwards over list of given type.
|
||||||
* @pos: the type * to use as a loop cursor.
|
* @param pos the type * to use as a loop cursor.
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*/
|
*/
|
||||||
#define list_for_each_entry_reverse(pos, head, member) \
|
#define list_for_each_entry_reverse(pos, head, member) \
|
||||||
for (pos = list_entry((head)->prev, typeof(*pos), 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()
|
* list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
|
||||||
* @pos: the type * to use as a start point
|
* @param pos the type * to use as a start point
|
||||||
* @head: the head of the list
|
* @param head the head of the list
|
||||||
* @member: the name of the list_struct within the struct.
|
* @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().
|
* 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
|
* list_for_each_entry_continue - continue iteration over list of given type
|
||||||
* @pos: the type * to use as a loop cursor.
|
* @param pos the type * to use as a loop cursor.
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*
|
*
|
||||||
* Continue to iterate over list of given type, continuing after
|
* Continue to iterate over list of given type, continuing after
|
||||||
* the current position.
|
* 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
|
* list_for_each_entry_continue_reverse - iterate backwards from the given point
|
||||||
* @pos: the type * to use as a loop cursor.
|
* @param pos the type * to use as a loop cursor.
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*
|
*
|
||||||
* Start to iterate over list of given type backwards, continuing after
|
* Start to iterate over list of given type backwards, continuing after
|
||||||
* the current position.
|
* 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
|
* list_for_each_entry_from - iterate over list of given type from the current point
|
||||||
* @pos: the type * to use as a loop cursor.
|
* @param pos the type * to use as a loop cursor.
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*
|
*
|
||||||
* Iterate over list of given type, continuing from current position.
|
* 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
|
* 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.
|
* @param pos the type * to use as a loop cursor.
|
||||||
* @n: another type * to use as temporary storage
|
* @param n another type * to use as temporary storage
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*/
|
*/
|
||||||
#define list_for_each_entry_safe(pos, n, head, member) \
|
#define list_for_each_entry_safe(pos, n, head, member) \
|
||||||
for (pos = list_entry((head)->next, typeof(*pos), 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
|
* list_for_each_entry_safe_continue - continue list iteration safe against removal
|
||||||
* @pos: the type * to use as a loop cursor.
|
* @param pos the type * to use as a loop cursor.
|
||||||
* @n: another type * to use as temporary storage
|
* @param n another type * to use as temporary storage
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*
|
*
|
||||||
* Iterate over list of given type, continuing after current point,
|
* Iterate over list of given type, continuing after current point,
|
||||||
* safe against removal of list entry.
|
* 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
|
* list_for_each_entry_safe_from - iterate over list from current point safe against removal
|
||||||
* @pos: the type * to use as a loop cursor.
|
* @param pos the type * to use as a loop cursor.
|
||||||
* @n: another type * to use as temporary storage
|
* @param n another type * to use as temporary storage
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*
|
*
|
||||||
* Iterate over list of given type from current point, safe against
|
* Iterate over list of given type from current point, safe against
|
||||||
* removal of list entry.
|
* 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
|
* list_for_each_entry_safe_reverse - iterate backwards over list safe against removal
|
||||||
* @pos: the type * to use as a loop cursor.
|
* @param pos the type * to use as a loop cursor.
|
||||||
* @n: another type * to use as temporary storage
|
* @param n another type * to use as temporary storage
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the list_struct within the struct.
|
* @param member the name of the list_struct within the struct.
|
||||||
*
|
*
|
||||||
* Iterate backwards over list of given type, safe against removal
|
* Iterate backwards over list of given type, safe against removal
|
||||||
* of list entry.
|
* 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
|
* 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
|
* @param pos the loop cursor used in the list_for_each_entry_safe loop
|
||||||
* @n: temporary storage used in list_for_each_entry_safe
|
* @param n temporary storage used in list_for_each_entry_safe
|
||||||
* @member: the name of the list_struct within the struct.
|
* @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
|
* 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
|
* 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
|
* hlist_for_each_entry - iterate over list of given type
|
||||||
* @tpos: the type * to use as a loop cursor.
|
* @param tpos the type * to use as a loop cursor.
|
||||||
* @pos: the &struct hlist_node to use as a loop cursor.
|
* @param pos the &struct hlist_node to use as a loop cursor.
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the hlist_node within the struct.
|
* @param member the name of the hlist_node within the struct.
|
||||||
*/
|
*/
|
||||||
#define hlist_for_each_entry(tpos, pos, head, member) \
|
#define hlist_for_each_entry(tpos, pos, head, member) \
|
||||||
for (pos = (head)->first; \
|
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
|
* hlist_for_each_entry_continue - iterate over a hlist continuing after current point
|
||||||
* @tpos: the type * to use as a loop cursor.
|
* @param tpos the type * to use as a loop cursor.
|
||||||
* @pos: the &struct hlist_node to use as a loop cursor.
|
* @param pos the &struct hlist_node to use as a loop cursor.
|
||||||
* @member: the name of the hlist_node within the struct.
|
* @param member the name of the hlist_node within the struct.
|
||||||
*/
|
*/
|
||||||
#define hlist_for_each_entry_continue(tpos, pos, member) \
|
#define hlist_for_each_entry_continue(tpos, pos, member) \
|
||||||
for (pos = (pos)->next; \
|
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
|
* hlist_for_each_entry_from - iterate over a hlist continuing from current point
|
||||||
* @tpos: the type * to use as a loop cursor.
|
* @param tpos the type * to use as a loop cursor.
|
||||||
* @pos: the &struct hlist_node to use as a loop cursor.
|
* @param pos the &struct hlist_node to use as a loop cursor.
|
||||||
* @member: the name of the hlist_node within the struct.
|
* @param member the name of the hlist_node within the struct.
|
||||||
*/
|
*/
|
||||||
#define hlist_for_each_entry_from(tpos, pos, member) \
|
#define hlist_for_each_entry_from(tpos, pos, member) \
|
||||||
for (; pos && ({ prefetch(pos->next); 1; }) && \
|
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
|
* 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.
|
* @param tpos the type * to use as a loop cursor.
|
||||||
* @pos: the &struct hlist_node to use as a loop cursor.
|
* @param pos the &struct hlist_node to use as a loop cursor.
|
||||||
* @n: another &struct hlist_node to use as temporary storage
|
* @param n another &struct hlist_node to use as temporary storage
|
||||||
* @head: the head for your list.
|
* @param head the head for your list.
|
||||||
* @member: the name of the hlist_node within the struct.
|
* @param member the name of the hlist_node within the struct.
|
||||||
*/
|
*/
|
||||||
#define hlist_for_each_entry_safe(tpos, pos, n, head, member) \
|
#define hlist_for_each_entry_safe(tpos, pos, n, head, member) \
|
||||||
for (pos = (head)->first; \
|
for (pos = (head)->first; \
|
||||||
|
|
|
@ -28,19 +28,11 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
/* +++ AC_HEADER_TIME +++ */
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#ifdef TIME_WITH_SYS_TIME
|
#include <sys/time.h>
|
||||||
# include <sys/time.h>
|
|
||||||
# include <time.h>
|
|
||||||
#else
|
|
||||||
# ifdef HAVE_SYS_TIME_H
|
|
||||||
# include <sys/time.h>
|
|
||||||
# else
|
|
||||||
# include <time.h>
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
/* --- AC_HEADER_TIME --- */
|
|
||||||
|
|
||||||
/* +++ platform specific headers +++ */
|
/* +++ platform specific headers +++ */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -25,15 +25,10 @@
|
||||||
#ifndef OPENOCD_HELPER_TIME_SUPPORT_H
|
#ifndef OPENOCD_HELPER_TIME_SUPPORT_H
|
||||||
#define OPENOCD_HELPER_TIME_SUPPORT_H
|
#define OPENOCD_HELPER_TIME_SUPPORT_H
|
||||||
|
|
||||||
#ifdef TIME_WITH_SYS_TIME
|
#include <time.h>
|
||||||
# include <sys/time.h>
|
|
||||||
# include <time.h>
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#else
|
#include <sys/time.h>
|
||||||
# ifdef HAVE_SYS_TIME_H
|
|
||||||
# include <sys/time.h>
|
|
||||||
# else
|
|
||||||
# include <time.h>
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y);
|
int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y);
|
||||||
|
|
|
@ -48,6 +48,7 @@ uint8_t delay_tms;
|
||||||
* Maximum achievable TCK frequency is 182 kHz for ULINK clocked at 24 MHz.
|
* Maximum achievable TCK frequency is 182 kHz for ULINK clocked at 24 MHz.
|
||||||
*
|
*
|
||||||
* @param out_offset offset in OUT2BUF where payload data starts
|
* @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)
|
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.
|
* Maximum achievable TCK frequency is 113 kHz for ULINK clocked at 24 MHz.
|
||||||
*
|
*
|
||||||
* @param out_offset offset in OUT2BUF where payload data starts
|
* @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)
|
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.
|
* Maximum achievable TCK frequency is 100 kHz for ULINK clocked at 24 MHz.
|
||||||
*
|
*
|
||||||
* @param out_offset offset in OUT2BUF where payload data starts
|
* @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)
|
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.
|
* Maximum achievable TCK frequency is 78 kHz for ULINK clocked at 24 MHz.
|
||||||
*
|
*
|
||||||
* @param out_offset offset in OUT2BUF where payload data starts
|
* @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)
|
void jtag_slow_scan_io(uint8_t out_offset, uint8_t in_offset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -589,6 +589,7 @@ static int ftdi_reset(int trst, int srst)
|
||||||
|
|
||||||
LOG_DEBUG_IO("reset trst: %i srst %i", trst, srst);
|
LOG_DEBUG_IO("reset trst: %i srst %i", trst, srst);
|
||||||
|
|
||||||
|
if (!swd_mode) {
|
||||||
if (trst == 1) {
|
if (trst == 1) {
|
||||||
if (sig_ntrst)
|
if (sig_ntrst)
|
||||||
ftdi_set_signal(sig_ntrst, '0');
|
ftdi_set_signal(sig_ntrst, '0');
|
||||||
|
@ -601,6 +602,7 @@ static int ftdi_reset(int trst, int srst)
|
||||||
else
|
else
|
||||||
ftdi_set_signal(sig_ntrst, '1');
|
ftdi_set_signal(sig_ntrst, '1');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (srst == 1) {
|
if (srst == 1) {
|
||||||
if (sig_nsrst)
|
if (sig_nsrst)
|
||||||
|
@ -1417,7 +1419,6 @@ static void ftdi_swd_swdio_en(bool enable)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flush the MPSSE queue and process the SWD transaction queue
|
* Flush the MPSSE queue and process the SWD transaction queue
|
||||||
* @param dap
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
static int ftdi_swd_run_queue(void)
|
static int ftdi_swd_run_queue(void)
|
||||||
|
|
|
@ -553,20 +553,96 @@ static bool jlink_usb_location_equal(struct jaylink_device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int jlink_open_device(uint32_t ifaces, bool *found_device)
|
||||||
|
{
|
||||||
|
int ret = jaylink_discovery_scan(jayctx, ifaces);
|
||||||
|
if (ret != JAYLINK_OK) {
|
||||||
|
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) {
|
||||||
|
LOG_ERROR("jaylink_get_devices() failed: %s.", jaylink_strerror(ret));
|
||||||
|
jaylink_exit(jayctx);
|
||||||
|
return ERROR_JTAG_INIT_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
use_usb_location = (jtag_usb_get_location() != NULL);
|
||||||
|
|
||||||
|
if (!use_serial_number && !use_usb_address && !use_usb_location && num_devices > 1) {
|
||||||
|
LOG_ERROR("Multiple devices found, specify the desired device.");
|
||||||
|
jaylink_free_devices(devs, true);
|
||||||
|
jaylink_exit(jayctx);
|
||||||
|
return ERROR_JTAG_INIT_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
*found_device = false;
|
||||||
|
|
||||||
|
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) {
|
||||||
|
continue;
|
||||||
|
} else if (ret != JAYLINK_OK) {
|
||||||
|
LOG_WARNING("jaylink_device_get_serial_number() failed: %s.",
|
||||||
|
jaylink_strerror(ret));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (serial_number != tmp)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (use_usb_address) {
|
||||||
|
enum jaylink_usb_address address;
|
||||||
|
ret = jaylink_device_get_usb_address(dev, &address);
|
||||||
|
|
||||||
|
if (ret == JAYLINK_ERR_NOT_SUPPORTED) {
|
||||||
|
continue;
|
||||||
|
} else if (ret != JAYLINK_OK) {
|
||||||
|
LOG_WARNING("jaylink_device_get_usb_address() failed: %s.",
|
||||||
|
jaylink_strerror(ret));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_address != address)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (use_usb_location && !jlink_usb_location_equal(dev))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
ret = jaylink_open(dev, &devh);
|
||||||
|
|
||||||
|
if (ret == JAYLINK_OK) {
|
||||||
|
*found_device = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_ERROR("Failed to open device: %s.", jaylink_strerror(ret));
|
||||||
|
}
|
||||||
|
|
||||||
|
jaylink_free_devices(devs, true);
|
||||||
|
return ERROR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int jlink_init(void)
|
static int jlink_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct jaylink_device **devs;
|
|
||||||
unsigned int i;
|
|
||||||
bool found_device;
|
|
||||||
uint32_t tmp;
|
|
||||||
char *firmware_version;
|
char *firmware_version;
|
||||||
struct jaylink_hardware_version hwver;
|
struct jaylink_hardware_version hwver;
|
||||||
struct jaylink_hardware_status hwstatus;
|
struct jaylink_hardware_status hwstatus;
|
||||||
enum jaylink_usb_address address;
|
|
||||||
size_t length;
|
size_t length;
|
||||||
size_t num_devices;
|
|
||||||
uint32_t host_interfaces;
|
|
||||||
|
|
||||||
LOG_DEBUG("Using libjaylink %s (compiled with %s).",
|
LOG_DEBUG("Using libjaylink %s (compiled with %s).",
|
||||||
jaylink_version_package_get_string(), JAYLINK_VERSION_PACKAGE_STRING);
|
jaylink_version_package_get_string(), JAYLINK_VERSION_PACKAGE_STRING);
|
||||||
|
@ -592,87 +668,17 @@ static int jlink_init(void)
|
||||||
return ERROR_JTAG_INIT_FAILED;
|
return ERROR_JTAG_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
host_interfaces = JAYLINK_HIF_USB;
|
bool found_device;
|
||||||
|
ret = jlink_open_device(JAYLINK_HIF_USB, &found_device);
|
||||||
|
if (ret != ERROR_OK)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (use_serial_number)
|
if (!found_device && use_serial_number) {
|
||||||
host_interfaces |= JAYLINK_HIF_TCP;
|
ret = jlink_open_device(JAYLINK_HIF_TCP, &found_device);
|
||||||
|
if (ret != ERROR_OK)
|
||||||
ret = jaylink_discovery_scan(jayctx, host_interfaces);
|
return ret;
|
||||||
|
|
||||||
if (ret != JAYLINK_OK) {
|
|
||||||
LOG_ERROR("jaylink_discovery_scan() failed: %s.",
|
|
||||||
jaylink_strerror(ret));
|
|
||||||
jaylink_exit(jayctx);
|
|
||||||
return ERROR_JTAG_INIT_FAILED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = jaylink_get_devices(jayctx, &devs, &num_devices);
|
|
||||||
|
|
||||||
if (ret != JAYLINK_OK) {
|
|
||||||
LOG_ERROR("jaylink_get_devices() failed: %s.", jaylink_strerror(ret));
|
|
||||||
jaylink_exit(jayctx);
|
|
||||||
return ERROR_JTAG_INIT_FAILED;
|
|
||||||
}
|
|
||||||
|
|
||||||
use_usb_location = (jtag_usb_get_location() != NULL);
|
|
||||||
|
|
||||||
if (!use_serial_number && !use_usb_address && !use_usb_location && num_devices > 1) {
|
|
||||||
LOG_ERROR("Multiple devices found, specify the desired device.");
|
|
||||||
jaylink_free_devices(devs, true);
|
|
||||||
jaylink_exit(jayctx);
|
|
||||||
return ERROR_JTAG_INIT_FAILED;
|
|
||||||
}
|
|
||||||
|
|
||||||
found_device = false;
|
|
||||||
|
|
||||||
for (i = 0; devs[i]; i++) {
|
|
||||||
struct jaylink_device *dev = devs[i];
|
|
||||||
|
|
||||||
if (use_serial_number) {
|
|
||||||
ret = jaylink_device_get_serial_number(dev, &tmp);
|
|
||||||
|
|
||||||
if (ret == JAYLINK_ERR_NOT_AVAILABLE) {
|
|
||||||
continue;
|
|
||||||
} else if (ret != JAYLINK_OK) {
|
|
||||||
LOG_WARNING("jaylink_device_get_serial_number() failed: %s.",
|
|
||||||
jaylink_strerror(ret));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (serial_number != tmp)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (use_usb_address) {
|
|
||||||
ret = jaylink_device_get_usb_address(dev, &address);
|
|
||||||
|
|
||||||
if (ret == JAYLINK_ERR_NOT_SUPPORTED) {
|
|
||||||
continue;
|
|
||||||
} else if (ret != JAYLINK_OK) {
|
|
||||||
LOG_WARNING("jaylink_device_get_usb_address() failed: %s.",
|
|
||||||
jaylink_strerror(ret));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_address != address)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (use_usb_location && !jlink_usb_location_equal(dev))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
ret = jaylink_open(dev, &devh);
|
|
||||||
|
|
||||||
if (ret == JAYLINK_OK) {
|
|
||||||
found_device = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG_ERROR("Failed to open device: %s.", jaylink_strerror(ret));
|
|
||||||
}
|
|
||||||
|
|
||||||
jaylink_free_devices(devs, true);
|
|
||||||
|
|
||||||
if (!found_device) {
|
if (!found_device) {
|
||||||
LOG_ERROR("No J-Link device found.");
|
LOG_ERROR("No J-Link device found.");
|
||||||
jaylink_exit(jayctx);
|
jaylink_exit(jayctx);
|
||||||
|
|
|
@ -79,8 +79,8 @@ static int read_sock(char *buf, size_t len)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* jtag_dpi_reset - ask to reset the JTAG device
|
* jtag_dpi_reset - ask to reset the JTAG device
|
||||||
* @trst: 1 if TRST is to be asserted
|
* @param trst 1 if TRST is to be asserted
|
||||||
* @srst: 1 if SRST is to be asserted
|
* @param srst 1 if SRST is to be asserted
|
||||||
*/
|
*/
|
||||||
static int jtag_dpi_reset(int trst, int srst)
|
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
|
* 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
|
* 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)
|
static int jtag_dpi_scan(struct scan_command *cmd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -208,8 +208,8 @@ static int jtag_vpi_receive_cmd(struct vpi_cmd *vpi)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* jtag_vpi_reset - ask to reset the JTAG device
|
* jtag_vpi_reset - ask to reset the JTAG device
|
||||||
* @trst: 1 if TRST is to be asserted
|
* @param trst 1 if TRST is to be asserted
|
||||||
* @srst: 1 if SRST is to be asserted
|
* @param srst 1 if SRST is to be asserted
|
||||||
*/
|
*/
|
||||||
static int jtag_vpi_reset(int trst, int srst)
|
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
|
* jtag_vpi_tms_seq - ask a TMS sequence transition to JTAG
|
||||||
* @bits: TMS bits to be written (bit0, bit1 .. bitN)
|
* @param bits TMS bits to be written (bit0, bit1 .. bitN)
|
||||||
* @nb_bits: number of TMS bits (between 1 and 8)
|
* @param nb_bits number of TMS bits (between 1 and 8)
|
||||||
*
|
*
|
||||||
* Write a series of TMS transitions, where each transition consists in :
|
* Write a series of TMS transitions, where each transition consists in :
|
||||||
* - writing out TCK=0, TMS=<new_state>, TDI=<???>
|
* - writing out TCK=0, TMS=\<new_state>, TDI=\<???>
|
||||||
* - writing out TCK=1, TMS=<new_state>, TDI=<???> which triggers the transition
|
* - 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
|
* The function ensures that at the end of the sequence, the clock (TCK) is put
|
||||||
* low.
|
* 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
|
* 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 :
|
* Write a series of TMS transitions, where each transition consists in :
|
||||||
* - writing out TCK=0, TMS=<new_state>, TDI=<???>
|
* - writing out TCK=0, TMS=\<new_state>, TDI=\<???>
|
||||||
* - writing out TCK=1, TMS=<new_state>, TDI=<???> which triggers the transition
|
* - 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
|
* The function ensures that at the end of the sequence, the clock (TCK) is put
|
||||||
* low.
|
* low.
|
||||||
*/
|
*/
|
||||||
|
@ -276,7 +276,7 @@ static int jtag_vpi_path_move(struct pathmove_command *cmd)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* jtag_vpi_tms - ask a tms command
|
* jtag_vpi_tms - ask a tms command
|
||||||
* @cmd: tms command
|
* @param cmd tms command
|
||||||
*/
|
*/
|
||||||
static int jtag_vpi_tms(struct tms_command *cmd)
|
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
|
* jtag_vpi_queue_tdi - short description
|
||||||
* @bits: bits to be queued on TDI (or NULL if 0 are to be queued)
|
* @param bits bits to be queued on TDI (or NULL if 0 are to be queued)
|
||||||
* @nb_bits: number of bits
|
* @param nb_bits number of bits
|
||||||
|
* @param tap_shift
|
||||||
*/
|
*/
|
||||||
static int jtag_vpi_queue_tdi(uint8_t *bits, int nb_bits, int 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
|
* 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).
|
* 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
|
* 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
|
* Launch a JTAG IR-scan or DR-scan
|
||||||
*
|
*
|
||||||
|
|
|
@ -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.
|
* Sends all queued OpenULINK commands to the ULINK for execution.
|
||||||
*
|
*
|
||||||
* @param device pointer to struct ulink identifying ULINK driver instance.
|
* @param device pointer to struct ulink identifying ULINK driver instance.
|
||||||
|
* @param timeout
|
||||||
* @return on success: ERROR_OK
|
* @return on success: ERROR_OK
|
||||||
* @return on failure: ERROR_FAIL
|
* @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
|
* Execute a JTAG_RESET command
|
||||||
*
|
*
|
||||||
|
* @param device
|
||||||
* @param cmd pointer to the command that shall be executed.
|
* @param cmd pointer to the command that shall be executed.
|
||||||
* @return on success: ERROR_OK
|
* @return on success: ERROR_OK
|
||||||
* @return on failure: ERROR_FAIL
|
* @return on failure: ERROR_FAIL
|
||||||
|
|
|
@ -253,7 +253,7 @@ static void ublast_flush_buffer(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ublast_queue_byte - queue one 'bitbang mode' byte for USB Blaster
|
* 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
|
* 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
|
* 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
|
* 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)
|
* 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
|
* 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
|
* 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
|
* ublast_reset - reset the JTAG device is possible
|
||||||
* @trst: 1 if TRST is to be asserted
|
* @param trst 1 if TRST is to be asserted
|
||||||
* @srst: 1 if SRST is to be asserted
|
* @param srst 1 if SRST is to be asserted
|
||||||
*/
|
*/
|
||||||
static void ublast_reset(int trst, int srst)
|
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
|
* 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).
|
* 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
|
* ublast_clock_tdi - Output a TDI with bitbang mode
|
||||||
* @tdi: the TDI bit to be shifted out
|
* @param tdi the TDI bit to be shifted out
|
||||||
* @type: scan type (ie. does a readback of TDO is required)
|
* @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 :
|
* 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=0, TMS=\<old_state>=0, TDI=\<tdi>
|
||||||
* - writing out TCK=1, TMS=<new_state>, TDI=<tdi> which triggers the JTAG
|
* - writing out TCK=1, TMS=\<new_state>, TDI=\<tdi> which triggers the JTAG
|
||||||
* device acquiring the data.
|
* device acquiring the data.
|
||||||
*
|
*
|
||||||
* If a TDO is to be read back, the required read is requested (bitbang mode),
|
* 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
|
* ublast_clock_tdi_flip_tms - Output a TDI with bitbang mode, change JTAG state
|
||||||
* @tdi: the TDI bit to be shifted out
|
* @param tdi the TDI bit to be shifted out
|
||||||
* @type: scan type (ie. does a readback of TDO is required)
|
* @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
|
* 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
|
* 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
|
* ublast_queue_bytes - queue bytes for the USB Blaster
|
||||||
* @bytes: byte array
|
* @param bytes byte array
|
||||||
* @nb_bytes: number of bytes
|
* @param nb_bytes number of bytes
|
||||||
*
|
*
|
||||||
* Queues bytes to be sent to the USB Blaster. The bytes are not
|
* 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
|
* 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
|
* ublast_tms_seq - write a TMS sequence transition to JTAG
|
||||||
* @bits: TMS bits to be written (bit0, bit1 .. bitN)
|
* @param bits TMS bits to be written (bit0, bit1 .. bitN)
|
||||||
* @nb_bits: number of TMS bits (between 1 and 8)
|
* @param nb_bits number of TMS bits (between 1 and 8)
|
||||||
* @skip: number of TMS bits to skip at the beginning of the series
|
* @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 :
|
* Write a series of TMS transitions, where each transition consists in :
|
||||||
* - writing out TCK=0, TMS=<new_state>, TDI=<???>
|
* - writing out TCK=0, TMS=\<new_state>, TDI=\<???>
|
||||||
* - writing out TCK=1, TMS=<new_state>, TDI=<???> which triggers the transition
|
* - 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
|
* The function ensures that at the end of the sequence, the clock (TCK) is put
|
||||||
* low.
|
* 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
|
* ublast_tms - write a tms command
|
||||||
* @cmd: tms command
|
* @param cmd tms command
|
||||||
*/
|
*/
|
||||||
static void ublast_tms(struct tms_command *cmd)
|
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
|
* 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 :
|
* Write a series of TMS transitions, where each transition consists in :
|
||||||
* - writing out TCK=0, TMS=<new_state>, TDI=<???>
|
* - writing out TCK=0, TMS=\<new_state>, TDI=\<???>
|
||||||
* - writing out TCK=1, TMS=<new_state>, TDI=<???> which triggers the transition
|
* - 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
|
* The function ensures that at the end of the sequence, the clock (TCK) is put
|
||||||
* low.
|
* low.
|
||||||
*/
|
*/
|
||||||
|
@ -501,8 +501,8 @@ static void ublast_path_move(struct pathmove_command *cmd)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ublast_state_move - move JTAG state to the target state
|
* ublast_state_move - move JTAG state to the target state
|
||||||
* @state: the target state
|
* @param state the target state
|
||||||
* @skip: number of bits to skip at the beginning of the path
|
* @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
|
* 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.
|
* 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
|
* ublast_read_byteshifted_tdos - read TDO of byteshift writes
|
||||||
* @buf: the buffer to store the bits
|
* @param buf the buffer to store the bits
|
||||||
* @nb_bits: the number of bits
|
* @param nb_bytes the number of bytes
|
||||||
*
|
*
|
||||||
* Reads back from USB Blaster TDO bits, triggered by a 'byteshift write', ie. eight
|
* 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.
|
* 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
|
* ublast_read_bitbang_tdos - read TDO of bitbang writes
|
||||||
* @buf: the buffer to store the bits
|
* @param buf the buffer to store the bits
|
||||||
* @nb_bits: the number of bits
|
* @param nb_bits the number of bits
|
||||||
*
|
*
|
||||||
* Reads back from USB Blaster TDO bits, triggered by a 'bitbang write', ie. one
|
* 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 :
|
* 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
|
* ublast_queue_tdi - short description
|
||||||
* @bits: bits to be queued on TDI (or NULL if 0 are to be queued)
|
* @param bits bits to be queued on TDI (or NULL if 0 are to be queued)
|
||||||
* @nb_bits: number of bits
|
* @param nb_bits number of bits
|
||||||
* @scan: scan type (ie. if TDO read back is required or not)
|
* @param scan scan type (ie. if TDO read back is required or not)
|
||||||
*
|
*
|
||||||
* Outputs a series of TDI bits on TDI.
|
* 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
|
* 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
|
* 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
|
* Launch a JTAG IR-scan or DR-scan
|
||||||
*
|
*
|
||||||
|
|
|
@ -237,7 +237,7 @@ const struct rtt_control *rtt_get_control(void);
|
||||||
* Read channel information.
|
* Read channel information.
|
||||||
*
|
*
|
||||||
* @param[in] channel_index Channel index.
|
* @param[in] channel_index Channel index.
|
||||||
* @param[in] channel_type Channel type.
|
* @param[in] type Channel type.
|
||||||
* @param[out] info Channel information.
|
* @param[out] info Channel information.
|
||||||
*
|
*
|
||||||
* @returns ERROR_OK on success, an error code on failure.
|
* @returns ERROR_OK on success, an error code on failure.
|
||||||
|
|
|
@ -924,6 +924,7 @@ exit:
|
||||||
* Finds an actionpoint that triggered last actionpoint event, as specified by
|
* Finds an actionpoint that triggered last actionpoint event, as specified by
|
||||||
* DEBUG.ASR.
|
* DEBUG.ASR.
|
||||||
*
|
*
|
||||||
|
* @param target
|
||||||
* @param actionpoint Pointer to be set to last active actionpoint. Pointer
|
* @param actionpoint Pointer to be set to last active actionpoint. Pointer
|
||||||
* will be set to NULL if DEBUG.AH is 0.
|
* will be set to NULL if DEBUG.AH is 0.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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 type Type of registers to write: core or aux.
|
||||||
* @param addr Array of registers numbers.
|
* @param addr Array of registers numbers.
|
||||||
* @param count Amount of registers in arrays.
|
* @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,
|
static int arc_jtag_write_registers(struct arc_jtag *jtag_info, uint32_t type,
|
||||||
uint32_t *addr, uint32_t count, const uint32_t *buffer)
|
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 type Type of registers to read: core or aux.
|
||||||
* @param addr Array of registers numbers.
|
* @param addr Array of registers numbers.
|
||||||
* @param count Amount of registers in arrays.
|
* @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,
|
static int arc_jtag_read_registers(struct arc_jtag *jtag_info, uint32_t type,
|
||||||
uint32_t *addr, uint32_t count, uint32_t *buffer)
|
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 jtag_info
|
||||||
* @param addr Array of registers numbers.
|
* @param addr Array of registers numbers.
|
||||||
* @param count Amount of registers in arrays.
|
* @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,
|
int arc_jtag_write_core_reg(struct arc_jtag *jtag_info, uint32_t *addr,
|
||||||
uint32_t count, const uint32_t *buffer)
|
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 jtag_info
|
||||||
* @param addr Array of core register numbers.
|
* @param addr Array of core register numbers.
|
||||||
* @param count Amount of registers in arrays.
|
* @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,
|
int arc_jtag_read_core_reg(struct arc_jtag *jtag_info, uint32_t *addr,
|
||||||
uint32_t count, uint32_t *buffer)
|
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 jtag_info
|
||||||
* @param addr Array of registers numbers.
|
* @param addr Array of registers numbers.
|
||||||
* @param count Amount of registers in arrays.
|
* @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,
|
int arc_jtag_write_aux_reg(struct arc_jtag *jtag_info, uint32_t *addr,
|
||||||
uint32_t count, const uint32_t *buffer)
|
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 jtag_info
|
||||||
* @param addr Array of AUX register numbers.
|
* @param addr Array of AUX register numbers.
|
||||||
* @param count Amount of registers in arrays.
|
* @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,
|
int arc_jtag_read_aux_reg(struct arc_jtag *jtag_info, uint32_t *addr,
|
||||||
uint32_t count, uint32_t *buffer)
|
uint32_t count, uint32_t *buffer)
|
||||||
|
|
|
@ -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 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 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 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
|
* @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.
|
* should normally be true, except when reading from e.g. a FIFO.
|
||||||
* @return ERROR_OK on success, otherwise an error code.
|
* @return ERROR_OK on success, otherwise an error code.
|
||||||
|
|
|
@ -2011,8 +2011,8 @@ int cortex_m_examine(struct target *target)
|
||||||
}
|
}
|
||||||
LOG_DEBUG("cpuid: 0x%8.8" PRIx32 "", cpuid);
|
LOG_DEBUG("cpuid: 0x%8.8" PRIx32 "", cpuid);
|
||||||
|
|
||||||
/* VECTRESET is not supported on Cortex-M0, M0+ and M1 */
|
/* VECTRESET is supported only on ARMv7-M cores */
|
||||||
cortex_m->vectreset_supported = i > 1;
|
cortex_m->vectreset_supported = !armv7m->arm.is_armv8m && !armv7m->arm.is_armv6m;
|
||||||
|
|
||||||
if (i == 4) {
|
if (i == 4) {
|
||||||
target_read_u32(target, MVFR0, &mvfr0);
|
target_read_u32(target, MVFR0, &mvfr0);
|
||||||
|
|
|
@ -117,7 +117,7 @@ static int dsp5680xx_drscan(struct target *target, uint8_t *d_in,
|
||||||
* @param target
|
* @param target
|
||||||
* @param d_in This is the data that will be shifted into the JTAG IR reg.
|
* @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.
|
* @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,
|
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.
|
* 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 @pmem = 0.
|
* 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
|
* The special case of 0xFFXXXX is not modified, since it allows to read out the
|
||||||
* memory mapped EOnCE registers.
|
* 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.
|
* Writes @a buffer to memory.
|
||||||
* The parameter @address determines whether @buffer should be written to
|
* The parameter @a address determines whether @a buffer should be written to
|
||||||
* P: (program) memory or X: (dat) memory.
|
* P: (program) memory or X: (dat) memory.
|
||||||
*
|
*
|
||||||
* @param target
|
* @param target
|
||||||
* @param address
|
* @param a address
|
||||||
* @param size Bytes (1), Half words (2), Words (4).
|
* @param size Bytes (1), Half words (2), Words (4).
|
||||||
* @param count In bytes.
|
* @param count In bytes.
|
||||||
* @param buffer
|
* @param b buffer
|
||||||
*
|
*
|
||||||
* @return
|
* @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)
|
const uint8_t *b)
|
||||||
{
|
{
|
||||||
/* TODO Cannot write 32bit to odd address, will write 0x12345678 as 0x5678 0x0012 */
|
/* TODO Cannot write 32bit to odd address, will write 0x12345678 as 0x5678 0x0012 */
|
||||||
struct target *target = t;
|
|
||||||
|
|
||||||
uint32_t address = a;
|
uint32_t address = a;
|
||||||
|
|
||||||
uint32_t count = c;
|
|
||||||
|
|
||||||
uint8_t const *buffer = b;
|
uint8_t const *buffer = b;
|
||||||
|
|
||||||
uint32_t size = s;
|
|
||||||
|
|
||||||
check_halt_and_debug(target);
|
check_halt_and_debug(target);
|
||||||
|
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
@ -1479,12 +1473,12 @@ static int dsp5680xx_write_buffer(struct target *t, target_addr_t a, uint32_t si
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
static int dsp5680xx_read_buffer(struct target *t, target_addr_t a, uint32_t size,
|
static int dsp5680xx_read_buffer(struct target *target, target_addr_t address, uint32_t size,
|
||||||
uint8_t *buf)
|
uint8_t *buffer)
|
||||||
{
|
{
|
||||||
check_halt_and_debug(t);
|
check_halt_and_debug(target);
|
||||||
/* The "/2" solves the byte/word addressing issue.*/
|
/* 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
|
* @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)
|
uint32_t *checksum)
|
||||||
{
|
{
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates a signature over @word_count words in the data from @buff16.
|
* 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 @return may be used to compare
|
* 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.
|
* 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.
|
* This algorithm is based on the perl script available from the Freescale website at FAQ 25630.
|
||||||
*
|
*
|
||||||
* @param buff16
|
* @param buff8
|
||||||
* @param word_count
|
* @param word_count
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
@ -1606,32 +1600,21 @@ int dsp5680xx_f_protect_check(struct target *target, uint16_t *protected)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes a command on the FM module.
|
* 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 target
|
||||||
* @param command Command to execute.
|
* @param c Command to execute.
|
||||||
* @param address Command parameter.
|
* @param address Command parameter.
|
||||||
* @param data Command parameter.
|
* @param data Command parameter.
|
||||||
* @param hfm_ustat FM status register.
|
* @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
|
* @return
|
||||||
*/
|
*/
|
||||||
static int dsp5680xx_f_ex(struct target *t, uint16_t c, uint32_t a, uint32_t d,
|
static int dsp5680xx_f_ex(struct target *target, uint16_t c, uint32_t address, uint32_t data,
|
||||||
uint16_t *h, int p)
|
uint16_t *hfm_ustat, int pmem)
|
||||||
{
|
{
|
||||||
struct target *target = t;
|
|
||||||
|
|
||||||
uint32_t command = c;
|
uint32_t command = c;
|
||||||
|
|
||||||
uint32_t address = a;
|
|
||||||
|
|
||||||
uint32_t data = d;
|
|
||||||
|
|
||||||
uint16_t *hfm_ustat = h;
|
|
||||||
|
|
||||||
int pmem = p;
|
|
||||||
|
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
retval = core_load_TX_RX_high_addr_to_r0(target);
|
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
|
* 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
|
* 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 @signature. The
|
* register, then read out by this function and returned in @a signature. The
|
||||||
* value @signature may be compared to the one returned by perl_crc to
|
* value @a signature may be compared to the one returned by perl_crc to
|
||||||
* verify the flash was written correctly.
|
* verify the flash was written correctly.
|
||||||
*
|
*
|
||||||
* @param target
|
* @param target
|
||||||
|
@ -1799,13 +1782,9 @@ static int set_fm_ck_div(struct target *target)
|
||||||
*
|
*
|
||||||
* @return
|
* @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)
|
uint16_t *signature)
|
||||||
{
|
{
|
||||||
struct target *target = t;
|
|
||||||
|
|
||||||
uint32_t address = a;
|
|
||||||
|
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
uint16_t hfm_ustat;
|
uint16_t hfm_ustat;
|
||||||
|
|
|
@ -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 data_in The data we received from the target.
|
||||||
* @param dmi_op The operation to perform (read/write/nop).
|
|
||||||
* @param dmi_busy_encountered
|
* @param dmi_busy_encountered
|
||||||
* If non-NULL, will be updated to reflect whether DMI busy was
|
* If non-NULL, will be updated to reflect whether DMI busy was
|
||||||
* encountered while executing this operation or not.
|
* 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 address The address argument to that operation.
|
||||||
* @param data_out The data to send to the target.
|
* @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
|
* @param exec When true, this scan will execute something, so extra RTI
|
||||||
* cycles may be added.
|
* cycles may be added.
|
||||||
* @param ensure_success
|
* @param ensure_success
|
||||||
|
|
|
@ -1511,7 +1511,7 @@ static int riscv_address_translate(struct target *target,
|
||||||
uint64_t ppn_value;
|
uint64_t ppn_value;
|
||||||
target_addr_t table_address;
|
target_addr_t table_address;
|
||||||
const virt2phys_info_t *info;
|
const virt2phys_info_t *info;
|
||||||
uint64_t pte;
|
uint64_t pte = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
int result = riscv_get_register(target, &satp_value, GDB_REGNO_SATP);
|
int result = riscv_get_register(target, &satp_value, GDB_REGNO_SATP);
|
||||||
|
|
|
@ -89,6 +89,8 @@ extern int gdb_actual_connections;
|
||||||
* Initialize common semihosting support.
|
* Initialize common semihosting support.
|
||||||
*
|
*
|
||||||
* @param target Pointer to the target to initialize.
|
* @param target Pointer to the target to initialize.
|
||||||
|
* @param setup
|
||||||
|
* @param post_result
|
||||||
* @return An error status if there is a problem during initialization.
|
* @return An error status if there is a problem during initialization.
|
||||||
*/
|
*/
|
||||||
int semihosting_common_init(struct target *target, void *setup,
|
int semihosting_common_init(struct target *target, void *setup,
|
||||||
|
|
|
@ -803,6 +803,13 @@ static int target_soft_reset_halt(struct target *target)
|
||||||
* algorithm.
|
* algorithm.
|
||||||
*
|
*
|
||||||
* @param target used to run the 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.
|
* @param arch_info target-specific description of the algorithm.
|
||||||
*/
|
*/
|
||||||
int target_run_algorithm(struct target *target,
|
int target_run_algorithm(struct target *target,
|
||||||
|
@ -838,6 +845,12 @@ done:
|
||||||
* Executes a target-specific native code algorithm and leaves it running.
|
* Executes a target-specific native code algorithm and leaves it running.
|
||||||
*
|
*
|
||||||
* @param target used to run the algorithm
|
* @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.
|
* @param arch_info target-specific description of the algorithm.
|
||||||
*/
|
*/
|
||||||
int target_start_algorithm(struct target *target,
|
int target_start_algorithm(struct target *target,
|
||||||
|
@ -876,6 +889,12 @@ done:
|
||||||
* Waits for an algorithm started with target_start_algorithm() to complete.
|
* Waits for an algorithm started with target_start_algorithm() to complete.
|
||||||
*
|
*
|
||||||
* @param target used to run the algorithm
|
* @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.
|
* @param arch_info target-specific description of the algorithm.
|
||||||
*/
|
*/
|
||||||
int target_wait_algorithm(struct target *target,
|
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 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
|
* @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
|
* 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,
|
int target_run_flash_async_algorithm(struct target *target,
|
||||||
|
@ -5155,6 +5175,7 @@ no_params:
|
||||||
e = Jim_GetOpt_String(goi, &s, NULL);
|
e = Jim_GetOpt_String(goi, &s, NULL);
|
||||||
if (e != JIM_OK)
|
if (e != JIM_OK)
|
||||||
return e;
|
return e;
|
||||||
|
free(target->gdb_port_override);
|
||||||
target->gdb_port_override = strdup(s);
|
target->gdb_port_override = strdup(s);
|
||||||
} else {
|
} else {
|
||||||
if (goi->argc != 0)
|
if (goi->argc != 0)
|
||||||
|
|
Loading…
Reference in New Issue