aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-11-24lpc2000: ignore status of part ID IAP commandGrigori Goronzy1-4/+8
The IAP firmware won't return a proper status with some versions. This happens on my CCC r0ket board and others have seen it as well [1]. So just ignore the status code and do a (weak) consistency check instead. [1] http://www.lpcware.com/content/forum/lpc1343-iap-read-part-identification-command Change-Id: I0daa779d520a540629677c56857bbc20d6db422d Signed-off-by: Grigori Goronzy <greg@chown.ath.cx> Reviewed-on: http://openocd.zylin.com/2364 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-11-24or1k: remove address of the Free Software FoundationAntony Pavlov8-40/+0
The FSF address has changed; The FSF site says that address is Free Software Foundation 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA (see http://www.fsf.org/about/contact/) Instead of updating it each time the address changes, just drop it completely treewide. Change-Id: I27199f7625901f677d8105d1e8876cff00147b71 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Reviewed-on: http://openocd.zylin.com/2340 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24mips32: fix typosAntony Pavlov2-2/+2
Change-Id: Ibb98fe3da68bf670a5bb83600bb49647db8a4163 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Reviewed-on: http://openocd.zylin.com/2338 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24Added FPU support for ChibiOS/RTChristian Gudrian3-5/+32
When an enabled FPU is detected we now use an appropriate stacking. Change-Id: I1b0f43ec22e1c55c4f10e2ffa97d4aaa77bca5ee Signed-off-by: Christian Gudrian <christian.gudrian@gmx.de> Reviewed-on: http://openocd.zylin.com/2354 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24rtos: add support for ChibiOS/RT 3.0Christian Gudrian1-16/+24
In ChibiOS/RT 3.0 the ready list pointer "rlist" is now part of the system data structure. Since the ready list is the first element in that structure it can be accessed via the structure's symbol "ch". Change-Id: Idc7eaa87cb7bbad0afa0ff1dafd54283bf429766 Signed-off-by: Christian Gudrian <christian.gudrian@gmx.de> Reviewed-on: http://openocd.zylin.com/2352 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24rtos: allow symbols to be optional for a particular RTOSPaul Fertser8-20/+33
Default to non-optional. Change-Id: Ifc9ddb1ab701a19c3760f95da47da6f7d412ff2e Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2355 Tested-by: jenkins Reviewed-by: Christian Gudrian <christian.gudrian@gmx.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24flash: at91samd: fix use of is_erased in checkAndrey Yurovsky1-1/+1
is_erased can be one of -1, 0, or 1 so it must not be checked like a boolean value. In this case we want to erase a page unless we know it's already erased so we just check for is_erased != 1. Thanks to Jim Paris for pointing this out on another driver. Change-Id: I4591186228153b64e5a9608a2aac18745e578d4a Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/2368 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24jtag/drivers/jlink: implement register command to fix SWDPaul Fertser1-0/+44
Some J-Link fw versions require registration to be performed before SWD operation is possible. It doesn't harm anyway, vendor's utilities do it unconditionally. Thanks go to Segger for providing the necessary information. Change-Id: Iabd76c743eca86e2c817a97cb93c969fec3f7ac6 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2331 Tested-by: jenkins
2014-11-24at91sam4: Adding support for the AT91SAM4S4A.Thomas Schmid1-0/+34
Added the chip definition for the Atmel AT91SAM4S4A. This chip is a 48-pin package with 256k flash and 64k ram. Change-Id: I8ada7d5735e31e0ce086f96f5906c7358464245c Signed-off-by: Thomas Schmid <thomas@rfranging.com> Reviewed-on: http://openocd.zylin.com/2254 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24flash/nor/lpcspifi.c: fix bug that prevented clean reset after flash writeAnders1-1/+2
After SPI flash was written by the assembly language stub, the last SPI command was not terminated by raising CS. This left the SPI device in a hung state that prevented the flash from being read by the M4 SPIFI controller, even after the M4 was fully reset. To access the flash via SPIFI, it was necessary to completely power cycle the board. This fix adds the missing instructions to raise CS and terminate the SPI command after the last byte. This allows the M4 to be resumed or reset cleanly after flashing. The SPIFI memory is now immediately accessable at address 0x1400 0000 after flashing is complete. Change-Id: I4d5e03bded0fa00c430c2991f182dc18611d5f48 Signed-off-by: Anders <anders@openpuma.org> Reviewed-on: http://openocd.zylin.com/2359 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24lpc2000: Added LPC1500 series flash programming support.Nemui Trinomius1-6/+54
This patch adds flash programming support for LPC1547/8/9 and LPC1517/8/9. Tested on LPC1549(LPC1549 LPCXpresso Board with CMSIS-DAP firmware). Change-Id: Ic95b4d62055bb9fdc2ca484696a38ccaf49ad951 Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/2304 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Grigori G <greg@chown.ath.cx>
2014-11-24nrf51: fix checks for is_erasedJim Paris1-2/+2
is_erased can take the value 0 (no), 1 (yes), or -1 (unknown). Checks like (!is_erased) don't do the right thing if it's -1. Change-Id: I10ba32c99494ca803e0a7a1ba56fdd78184b96bb Signed-off-by: Jim Paris <jim@jtan.com> Reviewed-on: http://openocd.zylin.com/2366 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24nrf51: verify that UICR needs erasing before triggering an error about itJim Paris1-0/+6
If the UICR is already empty, there's no reason to return an error just because it can't be erased again. This happens, for example, when flashing UICR from GDB after a "monitor nrf51 mass_erase". Change-Id: Ia6d28c43189205fb5a7120b1c7312e45eb32edb7 Signed-off-by: Jim Paris <jim@jtan.com> Reviewed-on: http://openocd.zylin.com/2363 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24nrf51: fix UICR eraseJim Paris1-5/+7
nrf51_erase_page() checks for (sector->offset == NRF51_UICR_BASE) to determine if the UICR should be erased. However, sector->offset for the UICR bank is set to 0 in nrf51_probe, so this code is never hit. Attempting to erase UICR ends up erasing the first flash sector. Use bank->base instead to determine if UICR is being erased. Change-Id: Ie5df0f9732f23662085ae2b713d64968cd801472 Signed-off-by: Jim Paris <jim@jtan.com> Reviewed-on: http://openocd.zylin.com/2362 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24nrf51: fix UICR region sizeJim Paris1-1/+1
The UICR region is actually 0x100 bytes in size. Besides making the full region accessible, having the right value is important because GDB rounds flash addresses to the nearest multiple of the block size when determing which flash blocks to erase. Change-Id: I416c391cbfc7be41a03a9b9c6e42326c87391f38 Signed-off-by: Jim Paris <jim@jtan.com> Reviewed-on: http://openocd.zylin.com/2361 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2014-11-03arm_adi_v5: added two CoreSight peripheral IDsPeter Lawrence1-0/+8
added "Single Wire Output" and "Trace Memory Controller" peripheral IDs to dap_rom_display(), which is invoked by the "dap info" command Change-Id: Iea3201007bb98e6376fbb50be40a4a2e031b0a03 Signed-off-by: Peter Lawrence <majbthrd@gmail.com> Reviewed-on: http://openocd.zylin.com/2369 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-10-16cmsis-dap: add serial number supportSpencer Oliver1-1/+40
Change-Id: I66926d1013e2b3a43ce0d18d3599771428706b6a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2329 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-10-16cmsis-dap: refactor HID PID/VID check loopSpencer Oliver1-15/+21
In preparation for adding serial number support. Change-Id: I3c9fb411b79d54a4d2de067039255436ba6708c7 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2328 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-10-06stm32: add mass erase support for STM32LRémi PRUD'HOMME1-4/+177
The mass erase for STM32L was lack because the procedure is more complex than the procedure for the STM32F4xx. The reference manual RM0038 (L100 subfamily) page 79 is more accurate than the reference manual for the STM32L0xx. On the L0, the mass-erase erase also the EEPROM. This is a limit to mass erase on L0. The mass erase procedure is a command of telnet interface. Tested on Discovery L053 and Discovery L100. Change-Id: I6a1d7a3669789aea89c59a006ab2d883f3d827ca Signed-off-by: Rémi PRUD'HOMME <prudhomme.remi@gmail.com> Reviewed-on: http://openocd.zylin.com/2319 Tested-by: jenkins Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06flash/nor/stellaris: implement protection statuses and proceduresPaul Fertser1-109/+89
This should make protection work as expected on all stellaris families, including the latest Tiva C Snowflake. Run-time tested on TM4C123x (Blizzard). Change-Id: Ia017edb119bec32382b08fc037b5bbc02dd9000c Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2267 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06libusb: introduce jtag_libusb_choose_interface() and use it for JLinkPaul Fertser6-49/+79
This introduces a new common function that allows auto-discovery of a suitable USB interface based on class, subclass and protocol matching. It claims the interface and returns the corresponding endpoints number to the caller. The need for this arised due to nRF51822 USB dongle which comes with an "on-board Segger J-link debugger" having 3 interfaces, so the current code can't work at all with it (in this particular case the last interface needs to be choosen). This also removes special handling of JLink-OB endpoint numbers as it's now possible to autodetect them as well as the standard JLink endpoints. Change-Id: I4d990a7a3b373efdd2949a394b32d855a168e138 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2327 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06flash/nor/stellaris: actually enable protection and unprotection with ICDIPaul Fertser1-8/+15
This is still limited to pre-Snowflake parts and the first 64K of flash. Change-Id: I9ca872ada3d1a87dba6261464b2a72a15eda5ecf Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2264 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06hla: add a way to pass arbitrary commands from user to layout and use for ICDIPaul Fertser3-0/+25
TI's ICDI adapter supports some additional commands which a user might want to run for debugging or other purposes, the most useful of them being "debug unlock" that fully mass-erases the device and unprotects the flash. Change-Id: I26990e736094367f92106fa891e9bb8fb0382efb Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2263 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06jtag/drivers/jlink.c: fix for LPC Link-2 running JLink firmware on LinuxAnders1-10/+12
Change 2288 fixed the extraneous reset caused by set_configuration that crashed the LPC Link-2 running JLink firmware and works on windows platforms. On Linux however, conditional code was still calling USB reset and caused the adapter to crash on any non-windows platforms. Change-Id: Ibf2a02d0dcdd91ccb71d86231cd8311dcadfee1e Signed-off-by: anders@openpuma.org Reviewed-on: http://openocd.zylin.com/2297 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06jtag/drivers/libusb1_common: avoid device reset when reselecting configurationAnders1-2/+14
According to [1], we shouldn't reselect an already active configuration to avoid needless device reset. This is known to cause issues with e.g. LPC Link2 with JLink firmware. [1] http://libusb.sourceforge.net/api-1.0/caveats.html#configsel Change-Id: I3568ada77780a521548c450090db7173f8d0b2dd Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Anders Oleson <anders@openpuma.org> Reviewed-on: http://openocd.zylin.com/2288 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06helper: constify log_stringsSpencer Oliver2-2/+2
Change-Id: I5bdd8958e79b754d56bb7aee2892856e557eed76 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2296 Tested-by: jenkins
2014-10-06target: constify structuresSpencer Oliver16-27/+27
Change-Id: I875cfab8dec4ade72ed9c9cd7d52baaca182a1ef Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2295 Tested-by: jenkins
2014-10-06jtag: constify driver arraysSpencer Oliver11-24/+24
Change-Id: I81574fa8ca3cc748526dc61b75a2c75d6335ef04 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2294 Tested-by: jenkins
2014-10-06flash: constify driver data structuresSpencer Oliver3-6/+7
Change-Id: Ia5c3de48119f036e1d7a41be62a672a6fb37e59b Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2293 Tested-by: jenkins
2014-10-06rtos: constify symbol names and listsSpencer Oliver8-29/+28
Change-Id: I72f3cd50fc6a33a178e72e169c9660e707751524 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2292 Tested-by: jenkins
2014-10-06nuc1x: fix typosSpencer Oliver1-5/+5
Change-Id: Ia67b55ccb2bea71a99daa176def82960f487ca9f Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2291 Tested-by: jenkins
2014-10-06at91samd: fix protect, add EEPROM and boot commandsAndrey Yurovsky1-38/+313
There were two problems with the _protect() feature: 1. The address written was off by a factor of two because the address register takes 16-bit rather than 8-bit addresses. As a result the wrong sectors were (un)protected with the protect command. This has been fixed. 2. The protection settings issued via the lock or unlock region commands don't persist after reset. Making them persist requires modifying the LOCK bits in the User Row using the infrastructure described below. The Atmel SAMD2x MCUs provide a User Row (the size of which is one page). This contains a few settings that users may wish to modify from the debugger, especially during production. This change adds commands to inspect and set: - EEPROM size, the size in bytes of the emulated EEPROM region of the Flash. - Bootloader size, the size in bytes of the protected "boot" section of the Flash. This is done by a careful read-modify-write of the special User Row page, avoiding erasing when possible and disallowing the changing of documented reserved bits. The Atmel SAMD20 datasheet was used for bit positions and descriptions, size tables, etc. and testing was done on a SAMD20 Xplained Pro board. It's technically possible to store arbitrary user data (ex: serial numbers, MAC addresses, etc) in the remaining portion of the User Row page (that is, beyond the first 64 bits of it). The infrastructure used by the eeprom and bootloader commands can be used to access this as well, and this seems safer than exposing the User Row as a normal Flash sector that openocd understands due to the delicate nature of some of the data stored there. Change-Id: I29ca1bdbdc7884bc0ba0ad18af1b6bab78c7ad38 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/2326 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06at91samd: add erase/secure commands, minor fixAndrey Yurovsky1-48/+139
Reference code for the SAMD2x disables caching in the NVM controller when issuing NVM commands. Let's do this as well to be consistent and safer. Add a "chip-erase" for the Atmel SAMD targets that issues a complete Chip Erase via the Device Service Unit (DSU). This can be used to "unlock" or otherwise unbrick a chip that can't be halted or inspected, allowing the user to reflash with new firmware. Add a "set-security" command which issues an SSB. Once that's done and the device is power-cycled, the flash cannot be written to until a "chip-erase" is issued. The chip-erase cannot be issued by openocd at this time because the device will not respond to a request for the DAP IDCODE. Change-Id: I80122f0bbf7e3aedffe052c1e77d69dc2dba25ed Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/2239 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06arm_adi_v5: make dap_lookup_cs_component() traverse subtables and handle ↵Paul Fertser3-8/+35
multicore When looking for a debug base address of a core, one should search through all the ROM tables, not just the top-level one. This code also assumes that the first found entry (in a depth-first search) will correspond to core 0, the second to core 1 etc. The patch is supposed to be an alternative implementation of http://openocd.zylin.com/#/c/1313/. Change-Id: Ifc88971a02fe3d9c00d9bf72a822ade5804d4e09 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1920 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-29gdb_server: Include current RTOS thread in signal packetsJon Burgess1-4/+12
This allows GDB to automatically switch to the thread that has been interrupted and show you where it has stopped. Change-Id: Icb9500dc42a61eb977e9fac55ce9503c9926bf5d Signed-off-by: Jon Burgess <jburgess777@gmail.com> Reviewed-on: http://openocd.zylin.com/2303 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-29cortex_m.c: Use two byte breakpoint for 32bit Thumb-2 requestJon Burgess1-0/+5
When GDB requests a breakpoint on a 32bit Thumb-2 instruction it sends a length of 3 which the current code rejects. Using the existing two byte breakpoint for this case appears to work fine. The use of length==3 for this case is mentioned in a few places: https://sourceware.org/gdb/onlinedocs/gdb/ARM-Breakpoint-Kinds.html http://sourceforge.net/p/openocd/mailman/message/30012280/ Change-Id: I59cd69ba4d1bc9a37b86569738c6bb2a67c3eb7a Signed-off-by: Jon Burgess <jburgess777@gmail.com> Reviewed-on: http://openocd.zylin.com/2312 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-29vsllink: improve the performance when using swdSimon Qian1-50/+4
Versaloon firmware has been updated for reporting errors if fail on swd transactions. Change-Id: I49ac0ad034cc9ad83cc4e43953579811d1243063 Signed-off-by: Simon Qian <openocd@versaloon.com> Reviewed-on: http://openocd.zylin.com/2302 Reviewed-by: Fatih Aşıcı <fatih.asici@gmail.com> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22command: Fix confusing syntax error messageAndreas Fritiofson2-2/+4
If the user executes a command with an invalid subcommand, the error message is extremely unhelpful: > flash write test.elf flash write test.elf: command requires more arguments This is because any command line that starts with a valid command group is classified as a group, triggering ocd_bouncer to print the confusing message. Fix by requiring that to be a command group, the command line must not contain any unknown tokens after the last valid (sub-)command group. That is OK because command groups don't have handlers defined and thus can't take any parameters. Also fix the error message for "unknown" type to be similar to the error message that is printed (by Jim) for non-existent primary commands. Change-Id: I26950349f0909fd3961c4f9ab9b198c221cea9fc Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2285 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22target: Remove "-variant" argumentAndreas Fritiofson3-59/+3
Remove this underutilized feature. Despite the fact that a lot of configs specifies a arbitrary "variant", only the xscale target actually defines any. In the case of xscale, the use of -variant is dubious since 1) it's used as a redundant irlen specifier, 2) it carries a comment that it doesn't really need it and 3) only two xscale configs even specify it. If there's a future target that needs a variant set, a target specific option could be added when needed. Change-Id: I1ba25a946f0d80872cbd96ddcc48f92695c4ae20 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2283 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22mpsse: Display libusb error names instead of numbersJoakim Gebart1-15/+15
Added calls to libusb_error_name() where applicable in order to easier understand the error messages. Change-Id: I3fe3d4b5624ae0de37c36e54a371eba5535ccaa1 Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se> Reviewed-on: http://openocd.zylin.com/2289 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22flash/nor/tcl.c: Do not double probe banksAndrey Smirnov1-5/+25
Previous to this version the code of handle_flash_probe_command would probe a bank twice: first time by auto-probe through a call to flash_command_get_bank and second time by calling the probe function directly. This change adds a flash_command_get_bank_maybe_probe wich is a more generic version of the flash_command_get_bank, that would allow commands to decide whether auto-probing should be performed or not. Change-Id: If150ca9c169ffe05e8c7eba36338d333360811e3 Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-on: http://openocd.zylin.com/2093 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22target/arm_dpm: prevent endless loop in arm_dpm_full_context()Paul Fertser1-6/+7
The code treats registers that are shadowed in FIQ mode in a special way: to read them out the target is first switches to USR mode. But since USR != ANY the current implementation later skips register read, and the loop becomes endless in case any !valid ARM_MODE_ANY is present at the moment arm_dpm_full_context() is called. This was reported in https://sourceforge.net/p/openocd/tickets/76/. The issue surfaced because 2efb1f14f611f2ff8a380b703f3e8bcb8a95d1ad added two ARM_MODE_ANY registers ("sp" and "lr") which were not normally read, so at the time a user was calling "arm reg" they were not valid. Fix this by changing the mode appropriately while keeping the "mode" variable state intact so it would later match register's mode. Compile-tested only. Change-Id: I01840e8fa20ec392220138a3f1497ac25deb080a Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2278 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22flash/nor: add mrvlqspi flash controller driverMahavir Jain3-1/+964
This patch adds support for QSPI flash controller driver for Marvell's Wireless Microcontroller platform. For more information please refer, https://origin-www.marvell.com/microcontrollers/wi-fi-microcontroller-platform/ Following things have been tested on 88MC200 (Winbond W25Q80BV flash chip): 1. Flash sector level erase 2. Flash chip erase 3. Flash write in normal SPI mode 4. Flash fill (write and verify) in normal SPI mode Change-Id: If4414ae3f77ff170b84e426a35b66c44590c5e06 Signed-off-by: Mahavir Jain <mjain@marvell.com> Reviewed-on: http://openocd.zylin.com/2280 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22flash/nor/spi: Add Winbond w25q32fv flash supportMahavir Jain1-0/+1
Change-Id: I2919d462e04b489cc793b82ec347838a08cb8c48 Signed-off-by: Mahavir Jain <mjain@marvell.com> Reviewed-on: http://openocd.zylin.com/2273 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22Support hla_serial command for ST-LINK adapters.Austin Phillips10-31/+120
The hla_serial command allows for a programming device serial number to be specified in addition to USB VID/PID. This allows for multiple ST-LINK/V2 programmers to be attached to a single machine and operated using openocd. Change-Id: I350654bf676eb26ba3a90450acfa55d2a5d2d791 Signed-off-by: Austin Phillips <austin_phillips@hotmail.com> Reviewed-on: http://openocd.zylin.com/2198 Tested-by: jenkins Reviewed-by: Martin Glunz <mg@wunderkis.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-15jtag: drivers: stlink: remove unnecessary '\n' in LOG_* entriesAndrey Skvortsov1-5/+5
Change-Id: Ia2dc3efc27b53334af4d85f9807abba0463c291b Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Reviewed-on: http://openocd.zylin.com/2220 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-09-15flash: added new Spansion S25FL116K, S25FL132K, and S25FL164K devicesAnders1-0/+3
The new FL1-K family is replacing the FL-K family. The data from all three was based on the datasheet. In addition the 8MB S25FL164K was tested successfully with OpenOCD on a custom board. Change-Id: Idafeed86da12a481c0db92cc0de7ba28f50c2252 Signed-off-by: Anders <anders@openpuma.org> Reviewed-on: http://openocd.zylin.com/2281 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-09-15stm32lx: don't allow part_info to be uninitializedAndrey Yurovsky1-1/+2
It's possible for us to fail to read the part ID code so make sure that part_info is initialized to NULL before attempting to do so, otherwise we could proceed and use it uninitialized and then segfault. Change-Id: I0a3f3d3947690b66f0981b5046340449521e0b33 Signed-off-by: Jack Peel <jack.peel@synapse.com> Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/2276 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-15cortex_m: Check return value from cortex_m_dcc_read.Andreas Fritiofson1-8/+13
Caught by clang. Change-Id: I26d2b845aca431612862ef432b217ca397d9b893 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2279 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-08stm32f2x: added STM32F411xx series support.Nemui Trinomius1-0/+2
Added STM32F411xx series to flash driver. Tested on NUCLEO-F411RE board(STM32F411RET6). Change-Id: Id7d1f2858c09815a013e0590e65ad193fb039157 Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/2258 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>