aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-03-10tcl/target: start using the new TPIU/SWO supportAntonio Borneo3-12/+54
Create the TPIU and SWO device in target config file. Replace the target event 'trace-config' with the TPIU/SWO event 'post-enable'. Extend the existing code in the event handler to properly set the gpio mode and speed to permit synchronous trace. This patch is not exhaustive of all the targets that have SWO, but has to be considered as an initial example. Change-Id: If4bbf364c0d2aef3ae49951e76507a3b1cfd58e7 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5859 Tested-by: jenkins Reviewed-by: Adrian M Negreanu <adrian.negreanu@nxp.com>
2021-03-10arm_tpiu_swo: add support for independent TPIU and SWOAntonio Borneo5-6/+1164
This is supposed to replace big part of armv7m_trace.[ch], since TPIU is not only the one implemented in Cortex-M3 and M4. Change-Id: I7588d16cbefe9cdb371c52fb0aa5cdfb48518804 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5858 Tested-by: jenkins
2021-03-10itm: rework itm commands before 'init'Antonio Borneo3-6/+11
If the command 'itm port[s]' is issued before 'init', the ITM can not be programmed because OpenOCD cannot access the target yet. The configuration is recorded and applied after target examine. The current test to trigger the ITM delayed-programming is based on the TPIU configuration. This is allowed because the only use of ITM it so send data through TPIU. In case of system TPIU, not belonging anymore to the target, there is no more association between target ITM and system TPIU. Add a flag to record the pending ITM configuration requested before 'init' and test the flag to trigger the delayed-programming of the ITM. Change-Id: I101eb97a116d7925cd2ff068f3e8813fc008b08e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6029 Tested-by: jenkins
2021-03-10stlink: fix execution order in stlink_config_trace()Antonio Borneo2-8/+17
The change [1] guarantees that the value pointed by 'prescaler' gets always set, even when the adapter does not support the specific mode requested (e.g. sync), or during trace disabling. This works fine with the code in armv7m_trace_tpiu_config(), but requires all the parameters to be valid also to disable the trace (with 'enable==false'), otherwise returns error on incorrect parameters or even causes segmentation fault if pointers 'trace_freq' or 'prescaler' are NULL. Another problem in stlink_config_trace(), not linked with [1], is caused by a tentative to change the settings on an already enabled trace; the trace is disabled before the new parameters are fully validated and in case of invalid parameters the trace is not re-enabled. It would be more logical to first check all the parameters, then disable the trace, change the settings and re-enable the trace. Practically revert [1] by checking 'enable==false' at function entry, then disable trace and exit without any further check on the other parameters. For the case 'enable==true', validate all the function parameters then disable the trace, update the trace settings and re-enable the trace. Modify the caller armv7m_trace_tpiu_config() to initialize the variable 'prescaler' to a safe value to avoid the issue targeted by [1]. [1] commit 38277fa75280 ("jtag/drivers/stlink_usb: fix SWO prescaler") Change-Id: Ia6530682162ca2c9f5ac64301f2456f70cc07ed2 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5934 Tested-by: jenkins Reviewed-by: Adrian M Negreanu <adrian.negreanu@nxp.com>
2021-03-10drivers/rlink: switch to libusb1Antonio Borneo2-85/+117
Convert the driver from libusb0 to libusb1. Change-Id: I17d14522db18b4050d462d23151ec97d3a315a7f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5991 Tested-by: jenkins Reviewed-by: Marc Schink <dev@zapb.de>
2021-03-10armv7m_trace_itm_config: wait for ITMBusy to be clearedAdrian Negreanu2-0/+30
pg315 of CoreSight Components: It is recommended that the ITMEn bit is cleared and waits for the ITMBusy bit to be cleared, before changing any fields in the Control Register, otherwise the behavior can be unpredictable. Change-Id: Ie9a2b842825c98ee5edc9a35776320c668047769 Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com> Reviewed-on: http://openocd.zylin.com/6043 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10cmsis_dap: remove DAP_MAX_CLOCKAdrian Negreanu1-7/+0
Discussed here: https://sourceforge.net/p/openocd/mailman/message/35466010/ Change-Id: Ic4d38a872f4b13b794ad0a8a2abdbe5bb21eced3 Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com> Reviewed-on: http://openocd.zylin.com/5964 Tested-by: jenkins Reviewed-by: Bohdan Tymkiv <bhdt@cypress.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10target: Remove redundant initialization of endiannessYasushi SHOJI1-3/+0
target->endianness is initialized to TARGET_ENDIAN_UNKNOWN at 34 lines below, before calling target_configure. This initialization is redundant and not needed. Change-Id: Iea2d5e17a13c1a8b0b209ba7c20043736b520ef6 Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com> Reviewed-on: http://openocd.zylin.com/6039 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10target/mips: Remove typedef'd structMarc Schink4-10/+10
The C style guide forbids typedef'd structs, see 'Naming Rules'. Change-Id: I449590251056c478c05105cdc18014ab4eb77ed8 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/6033 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10flash/nand/lpc32xx: Remove typedef'd structMarc Schink1-10/+10
The C style guide forbids typedef'd structs, see 'Naming Rules'. Change-Id: I983dd52307136d1b5adb58d8c44c0c14422d31e2 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/6032 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10rtos: Remove typedef'd structMarc Schink14-41/+41
The C style guide forbids typedef'd structs, see 'Naming Rules'. Change-Id: Ia7c8218fb61ff0c74b6dd0d10fb51a77cf059c14 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/6028 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10tcl/target: add Rockchip RK3399 targetJiri Kastner1-0/+79
Change-Id: I28f404b1e53fc9dbb04b3f939294ae248bbde183 Signed-off-by: Jiri Kastner <cz172638@gmail.com> Reviewed-on: http://openocd.zylin.com/5994 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10stlink: support of ST-LINK TCP server using stlink-dap and hlaTarek BOCHKATI4-19/+546
Quote: The ST-LINK TCP server is an application to share the debug interface of a single ST-LINK board among several host applications, typically a debugging tool and a monitoring tool. Note: ST-Link TCP server does not support the SWIM transport. ST-LINK TCP server allows several applications to connect to the same ST-Link through sockets (TCP). To use ST-LINK TCP server: - using stlink-dap : use 'st-link backend tcp [port]' - using hla : use 'hla_stlink_backend tcp [port]' the default port value is 7184 Change-Id: I9b79f65267f04b1e978709934892160e65bd2d6d Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5633 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10stlink: separate stlink core from USB functionsTarek BOCHKATI1-62/+141
the introduced stlink_backend_s struct provides an API to separate USB internals from stlink core. this separation aims to ease: - stlink-server integration [1] - stlink driver split into modules: - stlink_core - stlink_usb - stlink_tcp [1] [1] refer to http://openocd.zylin.com/#/c/5633/ Change-Id: Iff6790942612ce1769ec4c75990914534e5e9e24 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5632 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10eMAG: Add Ampere eMAG config filesAnthony Ferranti2-0/+150
Add board and target configuration files for Ampere eMAG8180 board and Ampere eMAG processor. Tested on an Ampere eMAG8180 development platform. Change-Id: I222653f0fc12d25202a7e469db3594076cbc38ed Signed-off-by: Anthony Ferranti <ferranti@os.amperecomputing.com> Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com> Reviewed-on: http://openocd.zylin.com/5569 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-03-10tcl/board: Add AM642 EVM basic supportNishanth Menon1-0/+24
Add basic connection details with AM642 EVM Change-Id: I95dcf6afadb61bfd8456b79274eae863b834167d Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-on: http://openocd.zylin.com/5952 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Vignesh Raghavendra Tested-by: jenkins
2021-03-10tcl/board: Add J7200 EVM basic supportNishanth Menon1-0/+24
Add basic connection details with J7200 EVM Change-Id: Ia8fa5033a693ac09849d33693c81b8cb206f17c1 Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-on: http://openocd.zylin.com/5951 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2021-03-10tcl/board: Add J721E EVM basic supportNishanth Menon1-0/+24
Add basic connection details with J721E EVM Change-Id: I0c2d25252432914d8e371e81761a59c05924bd8e Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-on: http://openocd.zylin.com/5185 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2021-03-10tcl/board: Add AM654 EVM basic supportNishanth Menon1-0/+24
Add basic connection details with AM654 evm Change-Id: Iea2240860e50ae42cf6f1617a10e24f63c6dd988 Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-on: http://openocd.zylin.com/5183 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2021-03-10tcl/target: Add K3 basic supportNishanth Menon1-0/+256
Add basic connection details for AM654 and J721E SoCs from TI. See AM65x Technical Reference Manual (SPRUID7, April 2018) for further details: https://www.ti.com/lit/pdf/spruid7 See J721E Technical Reference Manual (SPRUIL1, May 2019) for further details: https://www.ti.com/lit/pdf/spruil1 See J7200 Technical Reference Manual (SPRUIU1, June 2020) for further details: https://www.ti.com/lit/pdf/spruiu1 See AM64X Technical Reference Manual (SPRUIM2, Nov 2020) for further details: https://www.ti.com/lit/pdf/spruim2 Change-Id: Ie5108c6ad6f1304a6bf5b9f81aa9ebd33b8a559d Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-on: http://openocd.zylin.com/5182 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2021-03-07Restore normal development cyclePaul Fertser3-205/+240
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2021-03-07The openocd-0.11.0 releasePaul Fertser2-2/+2
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2021-03-04tcl/target/eos_s3: fix variable's expansion typoAntonio Borneo1-1/+1
TCL expands the variables only if preceded by a dollar sign. Add the missing dollar before the variable's name '_CPUTAPID'. Change-Id: Icc5d0dddf24f75d12ee63fee69e1b265e842ca43 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: Wes Cilldhaire <wes@sol1.com.au> Fixes: c3166b43e415 ("tcl/target: Add QuickLogic EOS S3 MCU configuration") Reviewed-on: http://openocd.zylin.com/6079 Tested-by: jenkins Reviewed-by: TM <tommy_murphy@hotmail.com>
2021-03-04target: avoid polling during 'resumed' event handlerAntonio Borneo2-0/+24
OpenOCD is based on a single main loop that schedules all the activities. At the execution of a TCL command, the timestamp is checked to eventually trigger the polling of the targets. This means that by executing a TCL command the polling can be triggered and detect a change of target's state. When openocd 'resumes' a target, the target can halt again by hitting a breakpoint. The 'resumed' event handler is started just after the target has been resumed, but it triggers a polling before the execution of its very first instruction. If the polling finds the target halted, it will run the 'halted' event handler, that will then be executed 'before' the pending 'resumed' handler. In case of gdb, a 'continue' command will restart the target but, polling (and halt detection) executed before the end of the resume process will hide the halt. As a consequence, the gdb will not be informed of the halt and will remains waiting as if the target is still running without showing the prompt. This can be verified by running on the target a firmware with a loop, run openocd with a dummy 'resumed' event, and let gdb to set a breakpoint in the loop. A 'continue' command will cause the target to halt again by hitting the breakpoint at the next loop iteration, but gdb will loose it and will not return the prompt. openocd -f board/st_nucleo_f4.cfg -c \ 'stm32f4x.cpu configure -event resumed {echo hello}' arm-none-eabi-gdb -ex 'target remote :3333' -ex 'b *$pc' -ex c Disable the polling while executing target's resume(). Document it and provide hints to developers to cope with future implementation. Change-Id: I3be830a8e7c2ef6278617cb4547a4d676b0ddeb5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: Габитов Александр Фаритович <gabitov@planarchel.ru> Reviewed-on: http://openocd.zylin.com/6074 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2021-02-13autotools: generate list of NEWS-xx file during configureAntonio Borneo2-1/+2
Commit 4fc0f3530c51 ("Makefile.am: fix non-POSIX warning from automake") uses the BSD make extension '!=' to generate the list of files NEWS-xx, but it's not POSIX (yet), it's not backward compatible with GNU make 3.82 (used in CentOS 7, EOL scheduled for 2024) and depending on automake evolution it could trigger again the warning 'apparently' just fixed. Move in configure the generation of the file list. The only drawback is that when a developer adds a new NEWS-xx file, he/she has to run configure again before 'make distcheck', otherwise will get failure. Change-Id: Ia97e7f4e612655a97702f95e8451040539659b85 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: Jan Matyáš <jmatyas@codasip.com> Reviewed-on: http://openocd.zylin.com/6054 Tested-by: jenkins Reviewed-by: Jan Matyas <matyas@codasip.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2021-02-13target: use proper macro for parsing watchpoint addressPeter Mamonov1-4/+4
Currently wp/rwp commands fail on 64-bit targets: > wp 0xffffffff80001400 4 addr option value ('0xffffffff80001400') is not valid Change-Id: I94d4af906b02b7bd463c8d79a6235a3646dfc434 Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Reviewed-on: http://openocd.zylin.com/6058 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-02-13Fix jtag_usb_location_equal for path members > 9Krzysztof Hockuba1-2/+2
In case an USB location path contains path members larger than 9. The string_length variable is regardless decremented by 2 with assumption that the member is one digit length. For exmaple 1-12.2 will fail. This patch uses strlen to calculate digits in a path member. Change-Id: I9c26a04d0c6af13fec65157f222599497294e2b2 Signed-off-by: Krzysztof Hockuba <krzysztof@hockuba.eu> Reviewed-on: http://openocd.zylin.com/6048 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-02-03doc/manual: Fix function name typoYasushi SHOJI1-1/+1
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
2021-02-03doc/manual: Fix @subpage handlingYasushi SHOJI1-1/+1
The subpage "thelist" used to have a title "Pending and Open Tasks" but the commit c41db358a0100ab 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>
2021-02-03doc: Fix type in Hooking up the JTAG AdapterYasushi SHOJI1-1/+1
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
2021-02-03github: fix github wokflow while pushing a tagTarek BOCHKATI1-5/+10
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>
2021-01-28steppenprobe: fix file permissionAntonio Borneo1-0/+0
Commit 895d4a599585 ("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>
2021-01-25Restore +dev suffixPaul Fertser1-1/+1
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2021-01-25The openocd-0.11.0-rc2 release candidatePaul Fertser2-2/+2
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2021-01-24README: add missing items for 0.11Tarek BOCHKATI1-20/+26
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>
2021-01-24jlink: fix device discovery when network is offBohdan Tymkiv1-50/+56
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>
2021-01-24README.macOS: explain how to install suitable TexinfoPaul Fertser2-5/+10
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>
2021-01-18configure: drop macro 'AC_HEADER_TIME'Antonio Borneo3-21/+7
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>
2021-01-18configure.ac: drop macro 'AC_PROG_CC_C99' from autoconf 2.70Antonio Borneo1-1/+2
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>
2021-01-18driver/ftdi: skip trst in swd modeAntonio Borneo1-11/+13
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
2021-01-18cortex_m: [FIX] ARMv8-M does not support VECTRESETTarek BOCHKATI1-2/+2
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>
2021-01-18target/riscv: fix build error with -Werror=maybe-uninitializedTarek BOCHKATI1-1/+1
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>
2021-01-18flash/stmqspi: fix build error with -Werror=maybe-uninitializedTarek BOCHKATI1-1/+1
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>
2021-01-13doc/manual/primer/autotools.txt: fix doxygen warningAntonio Borneo1-3/+0
Commit ab90b8777855 ("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: ab90b8777855 ("configure: remove AM_MAINTAINER_MODE, effectively always enabling all the rules") Reviewed-on: http://openocd.zylin.com/6003 Tested-by: jenkins
2021-01-13openocd: fix doxygen parameters of functionsAntonio Borneo18-62/+75
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
2021-01-13openocd: fix incorrect doxygen commentsAntonio Borneo7-169/+169
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
2021-01-13Doxyfile.in: exclude libjaylink from doxygenAntonio Borneo1-1/+1
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
2021-01-13doc/manual/primer/jtag.txt: remove duplicated section nameAntonio Borneo1-1/+1
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
2021-01-13Doxyfile.in: fix build out-of-treeAntonio Borneo1-1/+1
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
2021-01-13flash/nor/max32xxx: fix path of include fileAntonio Borneo1-1/+1
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