aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-11-04cortex_a/r/m: fix handling of un-examined coresMatthias Welwarsky
On multi-core systems, with some cores in power-down state, examination will fail for these cores. Make sure assert- and deassert_reset functions don't crash due to uninitialized variables. Change-Id: I472f8d19af2cd3c770c05f3e57a31b35a863b687 Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3552 Tested-by: jenkins Reviewed-by: Jiri Kastner <cz172638@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-11-04semihosting armv7a: Add support for ARMv7-AAndrey Smirnov
Add semihosting support for ARMv7-A based processors. Tested with custom Vybrid VF610 based board and Pandaboard ES (Rev. B1) board (Cortex-A9). Change-Id: I6b896a61c1c6a1c5dcf89de834486f82dd6c80a2 Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Tsung-Han Lin <tsunghan.tw@gmail.com> Reviewed-on: http://openocd.zylin.com/2908 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-11-04Tcl commands: Fix improper return status in flash commands and load_image.HarishKumar
Nand write command : nand_fileio_cleanup() always returns ERROR_OK. Due to this, handle_nand_write_command() retuns ERROR_OK in the case of nand failure. ERROR_FAIL should be returned. Flash erase_sector command : handle_flash_erase_command() always returns ERROR_OK even if the erase functionality of actual driver implementation fails. retval value should be returned. Flash write_bank command : handle_flash_write_bank_command() returns ERROR_OK even if fileio_open() and fileio_read fails. ERROR_FAIL should be returned. Load_image command : handle_load_image_command() retuns ERROR_OK even if image_open() fails. ERROR_FAIL should be returned. When the buffer is null, breaking the loop without setting retval = ERROR_FAIL would cause load_image to return ERROR_OK. Change-Id: Ice32f6036971ab5e8e4dd65edf54b394b001c80c Signed-off-by: HarishKumar <harishpresent@gmail.com> Reviewed-on: http://openocd.zylin.com/2431 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-11-04Make OpenOCD build using -Og.Tim Newsome
With -Og gcc doesn't perform as many optimizations, and as a result warns about some code that it wouldn't otherwise warn about. These fixes all assign values to otherwise uninitialized variables. Change-Id: I9a6ea5eadd73673891ecfec568b8b00d78b596a5 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/3779 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-11-04nrf51: show proper part numberJiří Pinkava
Change-Id: I3e8169eb577888ee54541a1e864a8ad5a9a7cfd1 Signed-off-by: Jiří Pinkava <j-pi@seznam.cz> Reviewed-on: http://openocd.zylin.com/3733 Tested-by: jenkins Reviewed-by: Fredrik Hederstierna <fredrik@hederstierna.com> Reviewed-by: Michael Dietz <mjdietzx@gmail.com> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-10-30Perform small writes before sending OK.Tim Newsome
To speed up downloads, OpenOCD sends gdb OK when a write is received, even before the write has actually occurred. The failure is then returned for the next write. That leads to the following confusing behavior: ``` (gdb) p/x *((int*)0xdeadbeef)=8675309 $2 = 0x845fed (gdb) p/x *((int*)0x80000000)=6874742 Cannot access memory at address 0x80000000 ``` While it's actually the first write that failed. This change hacks around this problem by not sending OK for small writes (len<8) until the write has actually occurred. This does not impact download speed, since during downloads (almost) all writes will have much larger length. Change-Id: I1f8b9bb19b0707487f840df6871e372e4ba228dd Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/3803 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-30flash: nor: lpc2000: handle lpc11xx parts with more than 96k memoryPaul Fertser
Known big flash parts such as LPC11u68/e68 have a non-uniform memory organisation, the first 24 sectors are 4k, the rest are 32k. Change-Id: Icf515152dfc54ec0ca187561d2d63088b9640f14 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3802 Tested-by: jenkins Reviewed-by: akaWolf Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-10-30flash/nor: Add erased_value to drivers and pass it to targetsAndreas Färber
struct flash_driver has a default_padded_value field that is similar, but it can be changed by the user for the specific purpose of padding. Add a new erased_value field and initialize it for all targets, particularly stm32lx, xmc4xxx and virtual. Use this value in core.c:default_flash_mem_blank_check(), the slow path. Extend the target API to pass erased_value down to target code. Adding an argument ensures that we catch all callers. This allows us to merge xmc4xxx.c:xmc4xxx_blank_check_memory() into armv7m:armv7m_blank_check_memory(). It further allows us to use default_flash_blank_check() in place of xmc4xxx.c:xmc4xxx_flash_blank_check(), adding a potential slow path fallback, as well as stm32lx:stm32lx_erase_check(), adding the potential armv7m fast path with fallback to default_flash_mem_blank_check(). Fix a mips32 code comment while at it (zeroed -> erased). The armv4_5 and mips32 target implementations will now error out if an erase value other than 0xff is used, causing default_flash_blank_check() to fall back to the default_flank_mem_blank_check() slow path. Change-Id: I39323fbbc4b71c256cd567e439896d0245d4745f Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3497 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-30atsamv: Support for ATSAMS70N19 Memory ConfigurationGabrielle Trotter
Change-Id: I3c17fcb7ee053f92aa583149bea7b8e33b3b86f7 Signed-off-by: gtrotter@bulogics.com Reviewed-on: http://openocd.zylin.com/3834 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-17helper: Make unhexify() robust on invalid dataMarc Schink
The current implementation is not suitable for user provided data because it does not detect invalid inputs in many cases. For example, the string "aa0xbb" is successfully converted to the 3 bytes: 0xaa, 0x00 and 0xbb. An other example is "aabi" which is successfully converted to the 2 bytes: 0xaa and 0x0b. Both are obviously incorrect. Make unhexify() robust on invalid data and use more appropriate data types for its parameters. Also, add a small documentation for the function. Change-Id: Idb799beb86fc608b066c8a76365021ed44c7f890 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3792 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-17target: Clean up format stringsAndreas Färber
Clean up some type casts and misuses of format specifiers in preparation for target address type changes. Change-Id: Idf08286f41bca636e35a09e8ddc1d71af3d6e151 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3717 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-17target: Add missing spaces in error messagesAndreas Färber
Insert a space before parenthesis in logs that we will need to touch for 64-bit target addresses. While at it, do a couple more surrounding whitespace fixes. Change-Id: I1080c0470aab51cf7bd56e67e934344d0bf4c5c1 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3716 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-10-17breakpoints: Add missing space in error messageAndreas Färber
A space after the format specifier was missing. Change-Id: Ib67eb0fb0d6e05d765206d30d5e4a74cb41bb47b Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3715 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-17target: Fix working_area_phys_spec commentAndreas Färber
working_area_phys_spec clearly refers to the physical, not virtual address. Change-Id: I639ea00bb5d05e845b8a56815a571375849f1225 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3714 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-10-17jtag: drivers: mpsse: ignore error to detach kernel driverPaul Fertser
This makes it possible to run OpenOCD as unprivileged user on FreeBSD. Change-Id: If1182d09ad2d51f370ae7e6da02f19c7a21c66c9 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3800 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-17jtag: drivers: cmsis-dap: add TRST handlingPaul Fertser
Even when TRST and SRST are not present in reset_config we still should set them appropriately (to 1) as we can't tristate them anyhow. Change-Id: Iec5bcf09340136f5e6ccfb05fa2697c53fa6609f Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3798 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-17flash Kinetis: fix mdm check_security regression in JTAG modeTomas Vanek
Commit 6d5b4d709cb05e8daf0350ac507b928da95d0abb causes failed assert when JTAG transport is selected: src/target/arm_adi_v5.h:346: dap_queue_ap_read: Assertion `ap->dap->ops != ((void *)0)' failed. As check_security runs early in examine-start event, dap->ops must be checked. Change-Id: Ibd8312a3c668fbce834eed9790eabeed794117aa Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3712 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-10-17gdb server: Add back support to disable the gdb server via the gdb_port configSandeep Mistry
As per the documentation, used "disabled" as the value to disable, as this is the same value to disable the telnet and tcl server. Change-Id: Idc4a8580098ec1107dcc6e1f59e817ecdebc38ac Signed-off-by: Sandeep Mistry <s.mistry@arduino.cc> Reviewed-on: http://openocd.zylin.com/3175 Tested-by: jenkins Reviewed-by: Cristian Maglie Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-10-07libjaylink: Update for API changesMarc Schink
Update to latest libjaylink version and incorporate API changes. The major change in libjaylink is a rework of the device discovery. Please test device discovery extensively, especially with multiple devices connected. All other changes in libjaylink are of minor importance for OpenOCD. Change-Id: I9a50e83f59557505ce29809c7762c5df1cec10eb Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3735 Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Steven Stallion <stallion@squareup.com> Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-10-07jlink: Adjust log verbosity of libjaylinkMarc Schink
Currently, the log verbosity of libjaylink is not accessible from the user interface. Therefore, changing the log verbosity of libjaylink is only possible from within the J-Link driver source code which is not acceptable for end users. Output the libjaylink log messages through the logging module of OpenOCD rather than directly to stderr. Change-Id: I6bf7bf8f4c8a12fb9e955eeced68224545fa0b5c Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3701 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-10-07helper/log: Add log_vprintf_lf()Marc Schink
Add log_vprintf_lf() to enable the possibility to output log messages with a variable argument list. Change-Id: I7fd6e93db63a7d98f662df2881a42e4d923c3848 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3709 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-10-04cortex_m: fix autoincrement range of Cortex-M7Tomas Vanek
Cortex-M7 has autoincrement range only 1024 bytes, surprisingly smaller than M3, M4. Change-Id: I35ff1f0e093aac4af79f98eb3b8058d4295942d1 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3737 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-10-04stm32f2x: Increase options write timeoutAndreas Fritiofson
Large flash parts time out when unlocking. Mass erase time is specified as 32 seconds worst case for some parts. Automatic mass erase is probably not using x8 parallelism, though, but a too large timeout shouldn't hurt. Also, use the new define instead of hardcoded timeout when mass erasing. Change-Id: Ib5af60d52ed7d53277bfe7176c4c44f79d3a26bc Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3738 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-10-04nRF51: Fix bug in Code memory size.Michael Dietz
The code memory size was a bug and seemed to be working by accident since there happened to be 256 pages in the device that was tested on which corresponded to 256kb. Also don't fail if memory size != expected memory size based on hwid as this hwid is unstable and should be used only for debug/diagnostics. Change-Id: I4e98f7498a36c53fc51783eddfdaba704d30e3ca Signed-off-by: Michael Dietz <mjdietzx@gmail.com> Reviewed-on: http://openocd.zylin.com/3510 Tested-by: jenkins Reviewed-by: Jiří Pinkava <j-pi@seznam.cz> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-04ftdi: don't wait forever if we failAndreas Fritiofson
Currently if ftdi device is removed, OpenOCD will stall forever. Only kill -9 will help in this case. This patch makes use of libusb timeout functions and trying to break out of while loop if some error is detected. [andreas.fritiofson@gmail.com]: Add missing retval check Change-Id: I97506190e376026705f14ef9fe37dc811b99b3ac Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3419 Reviewed-by: Andreas Färber <afaerber@suse.de> Tested-by: jenkins
2016-10-04nds32: Fix typo in debug logAndreas Färber
wathcpoint -> watchpoint Change-Id: If84cfb5097ed17ef97491667c622ba7d870ac9c2 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3673 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-10-04x86_32_common: Fix typo in function nameAndreas Färber
pyhs -> phys Change-Id: Ie7edc74f1693b42f26e1e8475a93a7a6b9255cdd Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3672 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-10-04mips: Added #define for scan_delay legacy mode default valueKent Brinkley
Believe in using defines to make maintenance easier. Change-Id: I8edf151352131bbf2b884dfcd67ca5764b11b13c Signed-off-by: Kent Brinkley <jkbrinkley.imgtec@gmail.com> Reviewed-on: http://openocd.zylin.com/2350 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-10-04STM32L433 Flash supportPeter Kuhar
Added new chip id based flash size. Change-Id: I5b5e71074af0e50352443f66f88adfc6e14280bf Signed-off-by: Peter Kuhar <peter@pkuhar.com> Reviewed-on: http://openocd.zylin.com/3732 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-10-04stm32l4x: fix incorrect device id maskSpencer Oliver
Change-Id: I37cf9cbdd07dc3764d2c719b7c6ed5852aea3943 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/3799 Tested-by: jenkins
2016-08-14flash Kinetis: Implement flash protection settingTomas Vanek
Kinetis family employs strange concept of Flash Configuration Field at address 0x400 of program flash. Writing incorrect data to FCF may permanently lock the device. The change introduces 'kinetis fcf_source protection' mode. In this mode write of flash image data to FCF is prevented. FCF data build from protection (set by 'flash protect' command) are written instead. FCF data are written also just after erase of relevant sector. It protects device from locking security by reset or power cycle after erase. prot_blocks array is used as protection blocks have bigger size than sectors. Alignment and padding programming sections is rewritten to fix writing with not section boundary aligned begin. Change-Id: I9fc8bd37d6f627fb8ed7abb7f7560e78a740b195 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3562 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-08-14pic32mx: add new device ID, 17x/27x Flash supportSASANO Takayoshi
- add new device ID: 170F256B, 170F256D, 270F256B, 270F256D, 330F064H, 330F064L, 430F064H, 430F064L, 350F128H, 350F128L, 450F128H, 450F128L, 350F256H, 350F256L, 450F256H, 450F256L, 370F512H, 370F512L, 470F512H, 470F512L - add support for PIC32MX17x/27x 256kB Flash Change-Id: I65a304d2114fff80de3a24c1f6d0b5e955b22531 Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk> Reviewed-on: http://openocd.zylin.com/3186 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-08-14flash Kinetis: refactoring ftfx commands and numerous minor changesTomas Vanek
Add kinetis_ftfx_decode_error() to show flash error type in human readable message. Add kinetis_ftfx_prepare() to prepare flash module just once in command (not each time kinetis_ftfx_command() is called). Change target_read/write_memory() to target_read/write_u8/32(). Make ftfx_fstat parameter of kinetis_ftfx_command() optional. Longword flash write: Fix huge memory leak after write of unaligned block. Check flash address alignment properly. Do not fill whole padding buffer but its end after original data. Remove duplicite padding. Change-Id: Ia5e312909f68d3cc724c8cbffe1cd903b9102124 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3561 Tested-by: jenkins Reviewed-by: Steven Stallion <stallion@squareup.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14flash/nor: implement protection blocks of different size than erase sectorTomas Vanek
Originally flash/nor infrastructure assumed protection blocks identical to erase sectors. This assumption is not valid for many flash types. Driver code fixed the problem either by increasing sector size to size of protection block or by defining more protection block than really existed in device. Both cases had drawbacks. The change retains compatibility with the old driver. Updated driver can set protection blocks table independent of sector table. Change-Id: I27f6d267528ad9ed9fe0a85f05436a8ec17603a4 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3545 Tested-by: jenkins Reviewed-by: Steven Stallion <stallion@squareup.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14flash Kinetis: dynamic status detection before starting mass_eraseTomas Vanek
The change prevents starting mass_erase in unstable state of MCU (RESET/WDOG loop). mass_erase of secured MCU using manual reset button is supported. Timeouts are measured by timeval_ms() instead of iteration count. mass_erase timeout prolonged to 16 seconds because aborting mass_erase in progress (deasserting reset) leaves the device in security locked state. Change-Id: I6605532df56080a54c2a1dfe49094e3db4ce534a Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3551 Tested-by: jenkins Reviewed-by: Steven Stallion <stallion@squareup.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14flash Kinetis: Detect RESET/WDOG loop, fix detection of secured MCUTomas Vanek
Kinetis driver checks MDM STAT register to detect secured state of MCU. Original version often reported a blank device as secured one. Change #3010 has not fixed all false reports. After changes in arm_adi_v5 infrastructure secured devices was not detected at all. New algorithm uses multiple MDM STAT reads and counts MDM_STAT_SYSSEC and MDM_STAT_FREADY bits. Both secured MCU and MCU locked-up in RESET/WDOG loop are detected reliably. Detection is run in both kx.cfg and klx.cfg from examine-start event, not examine-end as before. Event is configured only for non hla adapter. Minor fix in klx.cfg: commented out adapter_khz 24000 in reset-init. Such frequency is not supported in VLPR CPU mode and with JTAG. Change-Id: I2ec2b68c45bde9898159cd15fbdcbcfa538c41d9 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3547 Tested-by: jenkins Reviewed-by: Steven Stallion <stallion@squareup.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14kinetis: support mass erase on boards without SRSTSteven Stallion
NXP (nee Freescale) documents the mass erase procedure using the MDM-AP block in AN4835. Existing support for this feature did not properly handle boards without SRST. This patch updates the mass_erase command such that it works correctly on these boards. Additionally, the core is left in a halted state once complete to prevent reset loops due to the watchdog as reported by some users. Since the MDM-AP provides an additional method of halting and resetting the core that is disconnected from the DAP, additional commands are provided to manage this state. These commands are particularly helpful when connecting to a target with an unknown state. Change-Id: I40f006d5d964befb12b019c5d509988decdd3f91 Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/3540 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-08-14at91sam7: do not touch flash banks which belong to other targetsAndreas Fritiofson
at91sam7_read_part_info() walks throw all flash banks following current one. I don't know why it has to do it at all (possibly for multi-bank devices like SAM7S512), but if there is more than one target in JTAG chain, this lookup can touch flash bank of another (possibly not halted) target, which cause probe error and current command execution abort. [andreas.fritiofson@gmail.com]: Change to for-loop and reduce indentation Change-Id: Ide50e93578786e1250f7a0fd0e3d296247924814 Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2610 Tested-by: jenkins
2016-08-14ftdi: Added a method to read the signal valuesStephen Tridgell
Change-Id: Ie32a372bbc57249b4802d900234a0e8e7d1d1830 Signed-off-by: Stephen Tridgell <stephen.tridgell@exablaze.com> Reviewed-on: http://openocd.zylin.com/2556 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-08-14cmsis-dap: add JTAG pass-through modeMatthias Welwarsky
This change adds JTAG transport in pass-through mode to the cmsis-dap driver. The patch is originally from Phillip Pearson <pp@myelin.co.nz>, with additions by Maksym Hilliaka <oter@frozen-team.com> Change-Id: I88d918d6576e9d875c3b611f29f255581e6a5424 Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3568 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-08-14gdb_server: support disabling serverPeter A. Bigot
Although the documentation suggested this worked, and it is implemented for tcl_port and telnet_port, the directive was not recognized for gdb_port. Change-Id: I38d95ee879ec3f6d551603b7313749a21e0e498e Signed-off-by: Peter A. Bigot <pab@pabigot.com> Reviewed-on: http://openocd.zylin.com/3637 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14Flash handling for STM32F76x/77x and F446 addedAndreas Bolsch
- added ids for various parts - rewrite of sector allocation to deal with dual-bank F76x/77x - single- / dual-bank mode for F76x/77x - sector protection adapted for F76x/77x in dual-bank mode - handling of additional option bits (28-31) in FLASH_OPTCR in options_read and options_write for F42x/43x/469/479/7xx, options bits 0-1 masked out - check for sensible value of user_options in options_write - some #defines clarified, non-needed ones removed - docs updated (options read, options write) Change-Id: Ie4db80e60baa7d2663e024ab1f278640b1ce901b Signed-off-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-on: http://openocd.zylin.com/3526 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14rtos: remove display_str memberSteven Stallion
This patch removes the display_str member in the thread_detail struct. This member was not being used and provides no additional benefit over the thread_name_str and extra_info_str members. This change is made in preparation of support for the qXfer:threads:read packet, which will modernize how thread information is shared with GDB. Change-Id: I1f8bc6325e6aa790e02ea6caee9d6f44c5fedf36 Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/3558 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-08-14flash/nor/tcl.c: Less verbose output of flash erase_check.Uwe Bonnes
Only report non-erased or unknown sectors or if bank is fully erased. Change-Id: I94f0bc2a0d6529d1ea5f66b284cefd6a2c61fe39 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/3501 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
2016-08-14stm32l4: Handle failing flash_size read like on other devices.Uwe Bonnes
Change-Id: I54d7cd3a8c80d0e4663c3c09457a4ff338a6f1a0 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/3503 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-08-13jlink: fix jlink regression introduced by ae8cdc commitSergey A. Borshch
1) wrong last bit was shifted out in the end of IRSHIFT/DRSHIFT in jlink_execute_scan() 2) TDI buffer was not cleared in jlink_tap_init(), results in wrong data shifted out to the TDI and "Bad value '00000000' captured during DR or IR scan" error message. 3) sizeof(tdi_buffer) was used in memset() to clean tms buffer. It is the same as sizeof(tms_buffer), but shoud be fixed to make source code consistent Change-Id: I13f26d1c3e88eefc3856fe2b8542fb0ccea6acb1 Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Reviewed-on: http://openocd.zylin.com/3394 Tested-by: jenkins Reviewed-by: Harry Zhurov <harry.zhurov@gmail.com> Reviewed-by: Anton Gusev Reviewed-by: Михаил Цивинский <mtsivinsky@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-13psoc4: Corrected Silicon IDsGeorge Ioakimedes
Corrected 2 Silicon IDs that were swapped. I've tested with a CY8C4125AXI-483 and confirmed that the device is recognized correctly now. Change-Id: I6fcbee33558d8feec9abf6052df3f15523379c48 Signed-off-by: George Ioakimedes <georgeioak@gmail.com> Reviewed-on: http://openocd.zylin.com/3619 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-08-13target: check late abort from target in async_algorithmTomas Vanek
target_run_flash_async_algorithm() ignored abort from target (rp set to 0) when raised after all data have been written in fifo. I could result e.g. in not reported error during flash write. The change adds rp test after target algorithm has finished. Change-Id: Iadd93371e4a4602737be10079479285d81ae41b2 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3560 Tested-by: jenkins Reviewed-by: Steven Stallion <stallion@squareup.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-13at91samd: Add Atmel SAMD09 family supportOlaf Lüke
Change-Id: I0ee3bb92aa168ed070863ac09e3c457a4b2e2220 Signed-off-by: Olaf Lüke <olaf@tinkerforge.com> Reviewed-on: http://openocd.zylin.com/3428 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins Reviewed-by: Liviu Dudau <liviu@dudau.co.uk>
2016-08-13rtos: removed chSysInit from detection of ChibiOS (#121)Andy Pomfret
Using the presence of the 'chSysInit' symbol for detection of ChibiOS is dangerous because this symbol may not be available if link-time optimisation is used. This patch removes this reliance, so the symbols 'ch' and 'ch_debug' are the only things required for ChibiOS detection. If 'ch' is present but 'ch_debug' is not, an info message suggests that Chibios might be present without its registry being enabled. This message has been reworded a little to make it slightly more equivocal because the chances of a false positive message are increased. Addresses bug #121, "ChibiOS rtos detection fails with LTO enabled". Change-Id: I5ef224735c06446751adee010ce75be4f30f0403 Signed-off-by: Andy Pomfret <cooperised@gmail.com> Reviewed-on: http://openocd.zylin.com/3381 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>