aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-24flash/nor/lpcspifi.c: fix bug that prevented clean reset after flash writeAnders
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-24Hacking: Some note how to review.Uwe Bonnes
Change-Id: Ied682884abdba27da265f1ce3632417f54a80fe2 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2380 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24lpc2000: Added LPC1500 series flash programming support.Nemui Trinomius
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 Paris
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 Paris
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 Paris
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 Paris
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 Lawrence
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-11-02tcl/interface/ftdi/swd-resistor-hack: clarify and add schematic diagramPaul Fertser
Change-Id: I8600ee983de85e4225430ae508a50cd938122d89 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2357 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-10-16cmsis-dap: add serial number supportSpencer Oliver
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 Oliver
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-16build: make makeinfo optionalSpencer Oliver
This means the user does not have to install texinfo to build OpenOCD. Change-Id: Id9f42da798d3c2b79e95214c9e2559cf32802251 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2325 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-10-06cfg: remove incorrect execute permissionsSpencer Oliver
Change-Id: I0ba9dfdf876bc99df4e2d1f1f3bc0c9ccc6c98c2 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2333
2014-10-06stm32: add mass erase support for STM32LRémi PRUD'HOMME
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-06stm32: Add config file for a new board STM32L052 dsicoveryRémi PRUD'HOMME
this board use STLink-V2-1, the STM32L1xx use the STLink-V2. Change-Id: Ie58f45affcb1e9a6fed711b48c3c03b5035ab2b2 Signed-off-by: Rémi PRUD'HOMME <prudhomme.remi@gmail.com> Reviewed-on: http://openocd.zylin.com/2317 Tested-by: jenkins Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06stm32: add L0xx CPUTAPIDRémi PRUD'HOMME
Add CPUTAPID for stm32 L0xx mcu devices. Using -expected-id to add the new id with the id for L1xx devices. This for reduce the duplicated code. Change-Id: I48bd230884ecf38fa200c620b547bdf3b5f59132 Signed-off-by: Rémi PRUD'HOMME <prudhomme.remi@gmail.com> Reviewed-on: http://openocd.zylin.com/2315 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 Fertser
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 Fertser
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 Fertser
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 Fertser
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-06interface/ftdi/olimex-arm-usb-ocd-h: fix nTRST control definitionPaul Fertser
According to my inspection of an Olimex ARM-USB-OCD-H adapter ACBUS0 is connected directly to an SN74LVC2T45 buffer input B2, and the corresponding output A2 is connected directly to the JTAG connector. It seems the information in the Olimex flyer is incorrect for the -H version and TRST can't be tri-stated, ACBUS2 is unused. The older ARM-USB-OCD device has SN74AC244 for an output buffer and ACBUS2 controls its !2OE, ACBUS0 connected to 2A1 (2Y1 is nTRST), in accordance with the information flyer. Change-Id: I22828b7b959b6f62c3f51367feb8fab9705641e5 Reported-by: Tim Sander <tim@krieglstein.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2286 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Tim Sander <tim@krieglstein.org>
2014-10-06jtag/drivers/jlink.c: fix for LPC Link-2 running JLink firmware on LinuxAnders
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 configurationAnders
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 Oliver
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 Oliver
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 Oliver
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 Oliver
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 Oliver
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 Oliver
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 Yurovsky
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 Yurovsky
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 Fertser
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-29doc/openocd.texi: add SWD to the transports supported by jlinkPaul Fertser
Since 67332532194b16b99f0535a41b4179ca5df349b0 jlink adapter driver supports SWD in addition to JTAG. Change-Id: I9376aa02d9281f3e2734d8f127cd42162633d95b Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2324 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-29gdb_server: Include current RTOS thread in signal packetsJon Burgess
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 Burgess
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 Qian
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-29tcl/board: add TI Tiva C ek-tm4c1294xl configKarl Palsson
Change-Id: Iab070fe4c0f03ecc0db035b16dfb64105b0841be Signed-off-by: Karl Palsson <karlp@tweak.net.au> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2063 Tested-by: jenkins
2014-09-22command: Fix confusing syntax error messageAndreas Fritiofson
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 Fritiofson
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 Gebart
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 Smirnov
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 Fertser
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 Jain
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 Jain
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 Phillips
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 Skvortsov
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 devicesAnders
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 Yurovsky
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 Fritiofson
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-15cfg: Added Nucleo-F411RE board config.Nemui Trinomius
It supports STLink/V2-1 debug adapter. Change-Id: Ifbc610cd68ec929608369e69d0b1395fe04956cd Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/2259 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>