aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-07-26src/target/arm_adi_v5.c: add Cortex-A35 related entriesJiri Kastner1-0/+4
ROM Table registers: https://developer.arm.com/documentation/100236/0100/debug/rom-table/rom-table-peripheral-identification-registers Debug reisters: https://developer.arm.com/documentation/100236/0100/debug/memory-mapped-debug-registers/external-debug-peripheral-identification-registers PMU registers: https://developer.arm.com/documentation/100236/0100/debug/pmu-registers/performance-monitors-peripheral-identification-registers CTI registers: https://developer.arm.com/documentation/100236/0100/debug/cti-registers/cti-peripheral-identification-registers Change-Id: Ibd57d91fb9b66bc46929f4e93d0bf23c2a32f11a Signed-off-by: Jiri Kastner <cz172638@gmail.com> Reviewed-on: http://openocd.zylin.com/5773 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2020-07-26src/target/arm_adi_v5.c: resorted idsJiri Kastner1-4/+4
Change-Id: Ieeccf48254032244a86d6cd35793f8f6076527e9 Signed-off-by: Jiri Kastner <cz172638@gmail.com> Reviewed-on: http://openocd.zylin.com/5772 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-26src/flash/nor/stm32f2x: fix format stringsChristopher Head1-20/+20
* use proper type codes * add 0x in front of hex values * remove some concatenated empty strings Change-Id: I77e8dd161887f02ecf8019b43d3e8e7cc122ad0e Signed-off-by: Christopher Head <chead@zaber.com> Reviewed-on: http://openocd.zylin.com/5780 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-26doc/target/mips: fix grammarChristopher Head1-4/+4
Change-Id: Ib9012a1cfccbe4f69682d106688536c4d92392dd Signed-off-by: Christopher Head <chead@zaber.com> Reviewed-on: http://openocd.zylin.com/5777 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2020-07-26Introduce tcl config files for Synopsys HSDK boardEvgeniy Didin4-0/+180
With this commit we add tcl configure files for ARCv2 HS Development kit(HSDK). HSDK board has Quad-core ARC HS38 CPU with L1 and L2 caches. Change-Id: I372ef45428c7c7ca1421a6da3e5ed08b86f705e0 Signed-off-by: Evgeniy Didin <didin@synopsys.com> Reviewed-on: http://openocd.zylin.com/5784 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-26target/arc: Introduce Actionpoints supportEvgeniy Didin4-9/+418
Actionpoint mechanism allows to setup HW breakpoints and watchpoints on Synopsys ARC CPUs. This mechanism is controlled by DEBUG register and by a set of auxilary registers. Each actionpoint is controlled by 3 aux registers: Actionpoint(AP) match mask(AP_AMM), AP match value(AP_AMV) and AP control(AC). Note: some fields of actionpoint_t structure will be used in further support of watchpoints. Change-Id: I4efb24675f247cc19d9122501c9e63c3126fcab4 Signed-off-by: Evgeniy Didin <didin@synopsys.com> Reviewed-on: http://openocd.zylin.com/5763 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-21spi: add MX25U1635E flashHellosun Wu1-0/+1
* Macronix 16 MBit SPI flash * https://www.macronix.com/en-us/products/NOR-Flash/Serial-NOR-Flash/Pages/spec.aspx?p=MX25R1635F&m=Serial%20NOR%20Flash&n=PM2161 * used e.g. on Andestech ADP-XC7KFF676 Change-Id: Ida701cf3832e3302aa29b4dded1c390c5ff8c482 Signed-off-by: Hellosun Wu <wujiheng.tw@gmail.com> Reviewed-on: http://openocd.zylin.com/5428 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-14cmsis-dap: fix USB interface for NXP LPC-Link2Antonio Borneo1-0/+4
The adapter NXP LPC-Link2 is a USB composite device that provides five interfaces; among three of them that are of HID class, only one is cmsis-dap. Accordingly to ticket 255, OpenOCD code is not opening the right HID interface; then it fails to communicate with the cmsis-dap while checking the adapter's info. Unfortunately, hidapi does not provide any support for reading the string descriptor of the interface, otherwise it would have been trivial to look for the right cmsis-dap interface. In fact the cmsis-dap specification reports: The CMSIS-DAP Firmware can be also part of a USB composite device. If this case, the HID Interface String must contain the sub-string CMSIS-DAP. This requirement is satisfied by the USB device descriptor of the LPC-Link2 reported below, but cannot be used. Add a quirk to let OpenOCD only accept interface number zero on a LPC-Link2 device. Bus 001 Device 050: ID 1fc9:0090 NXP Semiconductors Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1fc9 NXP Semiconductors idProduct 0x0090 bcdDevice 1.00 iManufacturer 1 NXP Semiconductors iProduct 2 LPC-LINK2 CMSIS-DAP V5.224 iSerial 3 I3F4AABA bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x00ab bNumInterfaces 5 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 4 LPC-LINK2 CMSIS-DAP V5.224 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.00 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 35 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 4 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 7 LPC-LINK2 DATA PORT HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.00 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 35 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 1 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 1 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 0 iFunction 5 VCOM Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 0 iInterface 5 VCOM CDC Header: bcdCDC 1.10 CDC Call Management: bmCapabilities 0x01 call management bDataInterface 2 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Union: bMasterInterface 1 bSlaveInterface 2 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 5 VCOM Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 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 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 6 LPCSIO HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 33 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 2 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 2 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Change-Id: Ib3d46f87743a2d35a266842cb356035d898d466e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Suggested-by: Masatoshi Tateishi <tateishim3@gmail.com> Reported-by: Donald Bailey <donaldb@users.sourceforge.net> Fixes: https://sourceforge.net/p/openocd/tickets/255/ Reviewed-on: http://openocd.zylin.com/5732 Tested-by: jenkins
2020-07-14cmsis-dap: prevent hidapi to search again for the adapterAntonio Borneo1-14/+8
The code in cmsis_dap_usb_open() already searches for the right HID device that corresponds to the adapter. By calling hid_open() it asks hidapi to re-search the adapter again based on the VID:PID and the serial string of the adapter it has just found! Apart from being a run-time overhead, this has an additional drawback; there are USB adapters built as composite USB devices that, beside the cmsis-dap HID interface, have other HID interfaces for other purposes. A typical example is the NXP LPC-Link2, that over the 5 interfaces 0) cmsis-dap (HID) 1) VCOM-CDC 2) VCOM-CDC 3) LPCSIO (HID) 4) LPC-LINK2 DATA PORT (HID) has 3 of them of HID class. The code in cmsis_dap_usb_open() could select the right interface but then cannot propagate this information to hid_open(). Replace the call to hid_open() with hid_open_path(), passing as parameter the "unique" path of the HID device already found. Checking in hidapi source code, the implementation of hid_open() consists in enumerating the HID devices, scan for the first one matching VID:PID and serial number, and opening it by calling hid_open_path(). This analysis highlights that using directly hid_open_path() should not introduce any regression. While applying these changes, move hid_init() before enumerating the HID devices. This has no real consequences because the HID API is marked as optional but, logically, it should be called before any other HID API. Change-Id: I77ec01dca64223ec597f21f188f363366d0049c6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Suggested-by: Masatoshi Tateishi <tateishim3@gmail.com> Reviewed-on: http://openocd.zylin.com/5731 Tested-by: jenkins
2020-07-14jtag/drivers: replace perror() with LOG_ERROR()Antonio Borneo5-14/+14
The function perror() sends the output to stderr, but OpenOCD cannot intercept such output to send it to the log. Replace all occurrences of perror() with LOG_ERROR(), but keeping the same output format of perror(). The replacement is done automatically through: sed -i 's/perror("\([^":]*\)[: ]*")/LOG_ERROR("\1: %s", strerror(errno))/' src/jtag/drivers/*.c Change-Id: I4c140bdb09235d56cfd8bef75da9b56fbe7c2aec Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5728 Tested-by: jenkins
2020-07-14doc: remove duplicated wordsAntonio Borneo5-11/+11
Remove occurrences of duplicated words in the documentation. Change-Id: Ib6ef1607fc5e6387764be108b2b9c0c93ac10a62 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5754 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-07-14tcl/interface: add example of linuxgpiod through dln-2Antonio Borneo1-0/+25
The USB adapter DLN-2 provides 32 GPIO (beside I2C, SPI, ...). Use the first 6 GPIO for a SWD/JTAG bitbanging example through linuxgpiod driver. Change-Id: I229c2078142ec648fc6430b5d123539045dcfbda Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5561 Tested-by: jenkins
2020-07-14contrib/60-openocd.rules: add udev rules for Linux gpiodAntonio Borneo1-0/+3
Change-Id: I767776d3659adddefe81a63f351794318463fd50 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5560 Tested-by: jenkins
2020-07-14jtag/drivers: add linuxgpiod driverAntonio Borneo4-0/+626
New adapter driver for GPIO bitbanging over Linux GPIO descriptors through the library libgpiod. On Debian based distribution, the package libgpiod-dev is required for build. Change-Id: I1ce1a4f1ca79096d6d476b01b523c8c10f2cac07 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5559 Tested-by: jenkins
2020-07-14bcm2835gpio: enable only the transport specific gpioAntonio Borneo1-37/+53
Change-Id: Ice6744600079d5994d628bb3b782aa36e71f862e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5558 Tested-by: jenkins
2020-07-14imx_gpio: enable only the transport specific gpioAntonio Borneo1-21/+25
Change-Id: Idb1fabbc1e9385f8c23b643584bf7863ea91ffbf Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5557 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-07-14sysfsgpio: enable only the transport specific gpioAntonio Borneo1-42/+37
If the configuration file specifies both SWD and JTAG gpios, the current code request all of them. In case of overlap a warning is generated when the same gpio is released for the second time. Require and release only the gpio needed by the specified transport. Change-Id: I41a0970980ceeb559afa98ab34cfe93dffed2e1c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5556 Tested-by: jenkins
2020-07-14bitbang: split jtag and swd operationsAntonio Borneo5-42/+33
The split in OpenOCD between SWD and JTAG has been already fully implemented. The bitbang driver still keeps a single API write() to drive the output lines. Introduce a new SWD specific API swd_write(). Move the existing SWD bitbang drivers to the new API by extracting the available conditional implementation. Cleanup some function prototype. Remove the now unused global swd_mode, handled implicitly. Rename bitbang_exchange() as bitbang_swd_exchange() to track its scope for SWD only. Change-Id: Ie53080b941cb1ac7a34a1f80bad8bee4e304454d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5555 Tested-by: jenkins
2020-07-13bitbang: remove superfluous switch between jtag and swdAntonio Borneo5-18/+1
The SWD framework already takes care of switching between JTAG and SWD by calling driver's switch_seq() in swd_connect() and in swd_quit(); there is no need for the driver to force the switch again. Remove the extra switch between jtag and swd. Change-Id: I84de4bffb593374b96fce31951c6cc83f92d2578 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5554 Tested-by: jenkins
2020-07-13bitbang: document bitbang callbacksAntonio Borneo1-1/+9
Change-Id: I732c2eeb452f3ba8a2385d0e02fccbe86381812c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5553 Tested-by: jenkins
2020-07-13flash/nor/kinetis: fix FCF handlingTomas Vanek1-22/+34
Kinetis Flash Configuration Field needs special handling to prevent unwanted locking of the device. Warn user about any difference between generated FCF and FCF data in the programmed file. Inform user that re-programming of already programmed FCF may fail on devices with FTFE flash module. While on it remove useless setting of is_erased flag after erase. Change-Id: I3911f436674547fa12ef3886c7d5e8cd889f9e2b Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Fixes: https://sourceforge.net/p/openocd/tickets/270/ Reported-by: Noel Diviney <vk3avm@users.sourceforge.net> Reviewed-on: http://openocd.zylin.com/5753 Tested-by: jenkins
2020-07-13flash/nor/kinetis: use target_get_working_area_avail()Tomas Vanek1-14/+13
Since e22c6484eaedd56d71 the trial/error allocation shows "not enough working area available(requested 2048)" message on klx.cfg. The message is not clear if it means a problem or not. Replace with new style allocation using target_get_working_area_avail() Change-Id: I87fe1e38248fcac29982b72aaba12217a0552f38 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/5752 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2020-07-08gdb_server: suggest user to prefer GDB extended modeAntonio Borneo2-6/+26
In case of GDB connection not using extended mode, issue a warning message to suggest the user to switch using the extended mode. Issue the message only once at each run of OpenOCD, to avoid too much noise. Update the documentation to suggest using extended mode. Change-Id: I9326e84f748d5d7912d5a48f00f0fb541ca19221 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5311 Tested-by: jenkins Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2020-07-08coding style: add arguments to function prototypesAntonio Borneo6-27/+27
Issue identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types FUNCTION_ARGUMENTS -f {} \; This patch also fixes an incorrect function prototype in zy1000.c. ZY1000 minidriver implementation overrides the function arm11_run_instr_data_to_core_noack_inner(), but the prototype is not the same as in src/target/arm11_dbgtap.c and to avoid compile error it was changed also the prototype of the called function arm11_run_instr_data_to_core_noack_inner_default(). Change-Id: I476cda8cdb0e1e280795b3b43ca95c40d09e4a3d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5630 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2020-07-08coding style: fix space separationAntonio Borneo17-262/+262
The checkpatch script from Linux kernel v5.1 complains about using space before comma, before semicolon and between function name and open parenthesis. Fix them! Issue identified using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types SPACING -f {} \; The patch only changes amount and position of whitespace, thus the following commands show empty diff git diff -w git log -w -p git log -w --stat Change-Id: I1062051d7f97d59922847f5061c6d6811742d30e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5627 Tested-by: jenkins
2020-07-08coding style: fix print of hex values as decimalAntonio Borneo2-2/+2
It is an error to prefix with "0x" the print of values in decimal. Replace the incorrect decimal format specifier with PRIx32. Issue identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types PRINTF_0XDECIMAL -f {} \; Change-Id: I2eb867ef654527b2737ba573a405ec8f97c6a739 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5624 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-07-08target/arm926ejs: fix memory leaksAntonio Borneo7-0/+44
The memory leaks detected and fixed are: - arm register cache; - EmbeddedICE register cache; - arm_jtag_reset_callback internal data; - struct arm926ejs_common. Issue identified with valgrind. Tested on SPEAr320 based on arm926ejs. Change-Id: If2bed02c516051ce4d0eb29b204a3f3337fe5d6a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5698 Tested-by: jenkins
2020-07-08configure: split build of hla layoutsAntonio Borneo4-4/+13
Current hla driver supports two "layout": stlink and ti-icdi. The configure script allows to independently enable/disable the the two layout. But in reality by selecting only one of them the whole hla driver is built, including both "layouts". This is currently not a big issue because the dependencies of the two layout are the same (libusb), so we are sure that selecting one of them would permit to build both. This is going to change with the merge of a third "layout" for Nuvoton Nu-Link, because it would be based on hidapi. We need, at least, to decouple the build of libusb and hidapi "layouts". A full decouple of each "layout" is also welcome to match the selection done during configure. Introduce a new automake macro for each of the two "layout" and use them to conditionally build the "layout" files. Use the existing autoconf macros to conditionally compile the code that depends by the "layout". Change-Id: Ia20da7a260002a8d2af883425aa401b8920d3f36 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5719 Tested-by: jenkins
2020-07-08flash/nor/w600: Use 'bool' data typeMarc Schink1-4/+4
Change-Id: Ia71ffba82b23ed1860acc5daf6c66fa574a0d797 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5751 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/stmsmi: Use 'bool' data typeMarc Schink1-4/+4
Change-Id: I0b9d3eb6fa40cc9fed6491c8f583580fb471bcac Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5750 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/stm32h7x: Use 'bool' data typeMarc Schink1-1/+1
Change-Id: Ib9c567e2287f2a99172bd3bd35a81e3205cea421 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5749 Tested-by: jenkins Reviewed-by: Christopher Head <chead@zaber.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/sh_qspi: Use 'bool' data typeMarc Schink1-3/+3
Change-Id: Id5567102013648b1565078310abc27bee4446992 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5748 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/pic32mx: Use 'bool' data typeMarc Schink1-4/+4
Change-Id: I9a0b60bc07781401f26df31303b8c04822b7ddc2 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5747 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/mrvlqspi: Use 'bool' data typeMarc Schink1-4/+4
Change-Id: Icc64d9ba56841ff6eb96efcbdc9545938ebb7347 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5746 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/mdr: Use 'bool' data typeMarc Schink1-3/+3
Change-Id: I1eced61e5cb062445078e05507f6ad1a5a594c8d Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5745 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/max32xxx: Use 'bool' data typeMarc Schink1-8/+8
Change-Id: I828cdd6d97a59fd0692eb22ba8fc0a5759029432 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5744 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/lpcspifi: Use 'bool' data typeMarc Schink1-4/+4
Change-Id: I0485a7885fe154f983c7a7ce84cbedb0ba32ca31 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5743 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/jtagspi: Use 'bool' data typeMarc Schink1-4/+4
Change-Id: I0e81dd476c6b3ec7fee6c84ab1bfcf9bca90c532 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5742 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/fm3: Use 'bool' data typeMarc Schink1-4/+4
Change-Id: Ic90ab762488063f6958f5e775c1b2fe5f3f1718f Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5741 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/fespi: Use 'bool' data typeMarc Schink1-4/+4
Change-Id: I4583b4475b2fa2733db0861bfe8f52f0a514c472 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5740 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/em357: Use 'bool' data typeMarc Schink1-4/+4
Change-Id: I251b62275d204fdc315cd167685799c15d4e7cf4 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5739 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/cfi: Use 'bool' data typeMarc Schink3-17/+17
Change-Id: I25198223175c26aded9ad667b802da09883e94ee Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5738 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/atsamv: Use 'bool' data typeMarc Schink1-2/+2
Change-Id: Id4ceaf38dc5eba5b0eb62416fc357fdfc7ea21c0 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5737 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/ath79: Use 'bool' data typeMarc Schink1-3/+3
Change-Id: Iecd29dcfcc1ae983e4e0828025d2d174944c1e9d Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5736 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/at91sam4: Use 'bool' data typeMarc Schink1-132/+132
Change-Id: Iade91ac58a995676c412606a63e62b70337427f1 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5735 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/at91sam3: Use 'bool' data typeMarc Schink1-88/+88
Change-Id: Ibaf599a4ab88ea36a84b3389e2f704554d465434 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5734 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08flash/nor/ambiqmicro: Use 'bool' data typeMarc Schink1-9/+9
Change-Id: Ia8492905dc506d518266343d699c3245efbc1ab1 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5733 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-08jtag/tcl: fix a double free of jim objectMikhail Rasputin1-2/+4
The Jim_SetResultFormatted() frees jim object earlier and the Jim_FreeNewObj() does it second time. It breaks the memory heap. To avoid it the Jim_IncrRefCount() + Jim_DecrRefCount() should be used instead of the Jim_FreeNewObj() call. Change-Id: Ifa5f38009b2d617624b5f27e916720888a3dbad9 Signed-off-by: Mikhail Rasputin <mikhail.godlike.rasputin@yandex.ru> Reviewed-on: http://openocd.zylin.com/5724 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-07flash/nor: Use proper data types in driver APIMarc Schink70-755/+773
Use 'unsigned int' and 'bool' instead of 'int' where appropriate. While at it, fix some coding style issues. No new Clang analyzer warnings. Change-Id: I700802c9ee81c3c7ae73108f0f8f06b15a4345f8 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/4929 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-07-07flash/nor/atsame5: Fix a timeout when erasingMichael Hope1-6/+16
According to the datasheet, erasing a block can take up to 200 ms. When using a Segger J-Link with a 2 MHz clock the current loop finishes after < 50 ms, ignores the timeout, and then fails when erasing the next block. Switch to a time based check, add an explicit yield, and report an error on timeout. Change-Id: I8255401d1e59f427a08d2cccb8a66143dcdbb324 Signed-off-by: Michael Hope <mlhx@google.com> Reviewed-on: http://openocd.zylin.com/5706 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>