aboutsummaryrefslogtreecommitdiff
path: root/src/flash
AgeCommit message (Collapse)Author
2015-04-16flash: at91samd: add SAML21 support, fix part ID issueAndrey Yurovsky
This adds support for the new Atmel SAML21 family of low-power Cortex M0+ devices. Their Flash controller is essentially the SAMDxx one so the change consists of adding the new part IDs. Unfortunately the device ID logic had a couple of mistakes in it that did not affect anything on SAMD2x devices (due to 0 values expected there) but that is a problem on L21, it's therefore addressed here and things should now match the datasheets. Tested on Amtel SAML21 Xplained Pro development kit against the included SAML21J18A there. Also tested for regressions on a SAMD20 and SAMD21 using their dev kits. Change-Id: I768f75e064b8656c15148730dacaa4c3acfc4101 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/2690 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-16flash/nor/mdr: add docs, remove memory leak on probe()Paul Fertser
This adds the mandatory Info documentation for the driver as well as the usage field. As a clean up, this also includes freeing of the allocated memory which results in a memory leak if probe is invoked multiple times. Valgrind-tested. Reported by Dmitry Shpak. Change-Id: I2b1d9b9e8b069c6665b11d880b40ce19a1b26ce6 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2694 Tested-by: jenkins Reviewed-by: Дмитрий Шпак <disona@yandex.ru> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-16flash: efm32: Add support for EZR32LG and EZR32WG.Marc Schink
This patch was tested with an EZR32WG Starter Kit. Change-Id: I0f7c619e715fe30e88e6da3bead0806dd3bce819 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2700 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-16Fix several format specifiers errors exposed by arm-none-eabiPaul Fertser
Change-Id: I1fe5c5c0b22cc23deedcf13ad5183c957551a1b7 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2719 Tested-by: jenkins
2015-04-14AT91SAM4L: handle reset run/halt in SMAPTomas Vanek
This is a remake of http://openocd.zylin.com/1966 originally written by Angus Gratton <gus@projectgus.com> ATSAM4L has a "System Manager Access Port" (SMAP) that holds the CPU in reset if TCK is low when srst (RESET_N) is deasserted. Without this change any use of sysresetreq or srst locks the chip in reset state until power is cycled. A new function smap_reset_deassert is called as reset-deassert-post event handler. It optionally prepares reset vector catch and SMAP reset is released then. Change-Id: Iad736357b0f551725befa2b9e00f3bc54504f3d8 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/2604 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14flash/nor/lpc2000: free allocated working area when target_write failsPaul Fertser
In some circumstances (e.g. inappropriate jtag clock) target_write_memory in lpc2000_iap_working_area_init might fail. The allocated working area should be freed inside lpc2000_iap_working_area_init in this error case. This was leading to a weird segfault due to stack corruption later when reset was executed. Reported by quitte (Jonas Meyer). Change-Id: Ia2ed42a9970a4d771727fd516a6eea88e9b859e2 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2696 Tested-by: jenkins
2015-04-14flash/nor/lpc2000: properly free working area used in get_lpc2000_part_id()Paul Fertser
The IAP working area needs to be freed here, just like in all the other driver functions since an automatic local variable is used to store a pointer to it. This was reported by quitte (Jonas Meyer) on IRC as a strange totally unrelated segfault after doing certain operations (leading to target reset) from GDB. He has provided me with remote access to the specific machine and configuration that exposed the issue, and after some debugging it became apparent that a auto local variable (holding the gdb connection pointer) gets overwritten somehow. Placing an appropriate breakpoint just before the event and using a watchpoint made the cause apparent: reset lead to freeing of all working areas, and there was one holding a pointer to a variable that was auto local in get_lpc2000_part_id(). Change-Id: I7e634d890135ca0f3b4b311e09e8385a03982bd6 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2695 Tested-by: jenkins
2015-04-14Tcl exception codes cleanup, shutdown command amendmentsPaul Fertser
This patch might influence openocd Tcl commands behaviour in subtle ways, please give it a nice testing. The idea is that if an OpenOCD Tcl command returns an error, an exception is raised, and then the return code is propogated all the way up (or to the "catch" if present). This allows to detect "shutdown" which is not actually an error but has to raise an exception to stop execution of the commands that follow it in the script. openocd_thread special-cases shutdown because it should then terminate OpenOCD with a success error code, unless shutdown was called with an optional "error" argument which means terminate with a non-zero exit code. Change-Id: I7b6fa8a2e24c947dc45d8def0008b4b007c478b3 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2600 Tested-by: jenkins Reviewed-by: Juha Niskanen <juha.niskanen@haltian.com> Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2015-04-14lpc2000: Removed cmd51_can_xxxxb variables.Nemui Trinomius
Current flash driver can fail to write across the sector boundary. This patch fixes "thisrun_bytes" set to "cmd51_dst_boundary" value instead of "cmd51_can_xxxxb" Referred to SevenW's post and fix,thanks. http://sourceforge.net/p/openocd/mailman/openocd-devel/thread/fa32e7d6654df22470dc5f4a3dbc984a%40familiebenschop.nl/#msg33594152 Tested on below listed chips. LPC810,LPC811,LPC812,LPC824,LPC1115,LPC1343,LPC1347,LPC1227, LPC1769,LPC1788,LPC54102,LPC4088 and LPC2388. Change-Id: If1c6a1daa58ca27c405bd959a784e599a7a8f4d4 Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/2607 Tested-by: jenkins Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14Added Atmel SAM4SA16C chip (chip ID 0x28a70ce0).Patrick Noffke
Change-Id: I45e8e807a36c39940b910b3edb40698c7d8dabd6 Signed-off-by: Patrick Noffke <patrick@noffke.me> Reviewed-on: http://openocd.zylin.com/2625 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25flash/nor: mrvlqspi: fix printf formatting issuesMahavir Jain
Change-Id: I74cfce7bb8dbc13fbc3005b5a96213417f93a9f2 Signed-off-by: Mahavir Jain <mjain@marvell.com> Reviewed-on: http://openocd.zylin.com/2577 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Stian Skjelstad <stian@nixia.no>
2015-03-25flash/nor/kinetis: do not attempt mass-erase in place of a bank erasePaul Fertser
Many kinetis parts come in multi-bank configuration, so this optimisation here can't be performed safely. Investigated and fixed by Richard Braun. Change-Id: I2b56614b47951595c403a1a8edd3afe11b85679b Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2594 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09flash/nor/stellaris: allow to recover a locked device that can't be examinedPaul Fertser
Change-Id: I28536184053e2d1ba906620e728f7fad6ba39f0a Reported-by: Ed Beroset <beroset@mindspring.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2552 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Ed Beroset <beroset@ieee.org>
2015-03-09flash/nor/stellaris: remove dead assignmentPaul Fertser
Found by clang static checker. Change-Id: Ifa58ba383092341c7343916e5cc8ec3c72ab2f60 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2560 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09flash/nor/sim3x: remove dead assignmentPaul Fertser
Found by clang static code checker. Change-Id: Ic1370f8d7a48f08da6514afec5aacde38af7dfb6 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2559 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09lpc2000: Add LPC407x/8x flash size auto detectionNemui Trinomius
This patch adds auto flash size detection for LPC407x/8x series. Tested on below listed chips. LPC4088 LPC1788(regression test) Change-Id: I82f62678a04eac9b84658bd6d1cfdf45be64c931 Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/2555 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Jens Bauer <jens@gpio.dk>
2015-03-09atmega: add support for the at90usb128 flashOlivier Esver
Add support for the at90usb128 flash (tested on the RZUSBstick) Change-Id: Ic042d7c403b20a5cc533da00c30ae6e2139bbd10 Signed-off-by: Olivier Esver <olg.esver@gmail.com> Reviewed-on: http://openocd.zylin.com/2557 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-28psoc4 flash driver: cleaned printf PRI... formatsTomas Vanek
Failed build on Mac OS X 10.10.2 was reported in OpenOCD-devel. Cleaning types and printf formats. uint32_t prefered for flash/sector sizes. 2 minor changes in comments. Removed redundant bracket. Change-Id: Ia06b77af59c2c0ffd10869a4b263a760ca8b0a7a Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/2558 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Xiaofan <xiaofanc@gmail.com>
2015-02-24nrf51: Update known devices table.Theodore A. Roth
Added new entries to the nrf51_known_devices_table array. New entries are documented in the "nRF51 Series Compatability Matrix V1.0" found on the Nordic Semi web site. Reordered entries to match the order found in the document. Also added an entry for an undocumented hwid discovered while flashing the PCA10031 and PCA10028 dev boards. Change-Id: Icca7da103d437dc28e651f27ab937fe953b9aac9 Signed-off-by: Theodore A. Roth <troth@openavr.org> Reviewed-on: http://openocd.zylin.com/2514 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-24flash/nor/spi: add GigaDevice SPI flashdmitry pervushin
Signed-off-by: dmitry pervushin <dpervushin@gmail.com> Change-Id: I5a239dc67754ef4be1d9ec36186f434b09aa1e25 Reviewed-on: http://openocd.zylin.com/2530 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-12flash/nor/stm32lx: add all the IDs and revisions from current RMPaul Fertser
RM0038 Rev.12 lists these new parts and introduces the category naming scheme. RM0367 Rev.2 (STM32L0x3 RM) doesn't add any new codes. Change-Id: Id95dd48dda64d5f108dac57d265d29a7db3a1bd1 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2495 Tested-by: jenkins
2015-02-11flash/nor/at91samd: add small delay before checking nvm statusAndrej Kazmin
OpenOCD's SWD subsystem doesn't currently have a consistent WAIT handling (i.e. it doesn't ever retry, just returns an error), so right after a row write a small delay is needed as AHB access is stalled during the flashing operation. The issue was exposed with a samd20 using ftdi SWD transport. Change-Id: I07d99d3a96845cc689c3904a41f4d41344f200aa Signed-off-by: Andrej Kazmin <funnyfish@funnyfish.botik.ru> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2268 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-02-11flash/startup: extend "program" command to accept "exit"Paul Fertser
This optional argument tells OpenOCD to exit after finishing (either succesfully, or with an error) the programming sequence. Without it OpenOCD stays running. Change-Id: I6ecaf33ff985eea9a9cd02ff644a74403ae3e1e5 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2492 Tested-by: jenkins Reviewed-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-02-11sim3x: new flash driver for Silabs SiM3 microcontroller familyAndreas Bomholtz
This is a new driver for Silicon Laboratories SiM3 microcontroller family, based on the work of Ladislav Bábel. The driver will try to detect the type of MCU from the device id register, and if this fails it will use the flash size from the flash bank command. Driver added to the documentation and to the README. TCL script added. Tests: * Hardware: SiM3C166 (pre-production) and SiM3U167 * Binary: 4kb, 197kb, 256kb * Flash protect not tested Change-Id: I701e0cf505ca8ad99be7f83543fe5055b2f65dcc Signed-off-by: Andreas Bomholtz <andreas@seluxit.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2078 Tested-by: jenkins
2015-02-11nrf51 - Add async loader. Performance on nrf51822QAA/stlink-v2 from ↵Angus Gratton
~3.5KiB/s to ~19.5KiB/s. Change-Id: Ib0bf41a0cec85f0bd5728551f8ad7f6255e4ea04 Signed-off-by: Angus Gratton <gus@projectgus.com> [spamjunkeater@gmail.com: Cleanup buffer allocation, detect -1 for unknown pages] Signed-off-by: Erdem U. Altunyurt <spamjunkeater@gmail.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2204 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-02-11mini51: support for Nuvoton NuMicro M051 series flash memoryPawel Si
adds flash support for Nuvoton M052, M054, M058, M0516 microcontrollers into the mini51 driver, patch also adds support for programing LDROM, flash data and flash config. I've tested it on a M0516LBN microcontroller using an ST-LINK/V2: 1. removing security lock: openocd -f interface/stlink-v2.cfg -f target/m051.cfg -c "init ; halt ; mini51 chip_erase; exit" 2. flashing: openocd -f interface/stlink-v2.cfg -f target/m051.cfg -c "program file.hex" Change-Id: I918bfbb42461279c216fb9c22272d77501a2f202 Signed-off-by: Pawel Si <stawel+openocd@gmail.com> Reviewed-on: http://openocd.zylin.com/2426 Tested-by: jenkins Reviewed-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-11lpc2000: add chip IDs for LPC11U6x/LPC11E6xMichael Brown
Change-Id: I53568674951ec8a5db5e191c7b50c60b5a84d0b6 Signed-off-by: Michael Brown <fractalmbrown@gmail.com> Reviewed-on: http://openocd.zylin.com/2463 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-11psoc4: support for Cypress PSoC 41xx/42xx familyTomas Vanek
New NOR flash driver was derived from stm32lx. Procedure ocd_process_reset_inner is overriden in psoc4.cfg to handle reset halt and system ROM peculiarities. Change-Id: Ib835324412d106ad749e1351a8e18e6be34ca500 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/2282 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-04stm32lx: do not attempt mass-erase in-place of first bank eraseJussi Kivilinna
Commit 832f0a5bfb439 'stm32: add mass erase support for STM32L' added use of mass-erase in-place of bank-erase. This is triggered if first bank is requested to be fully erased. This erroneous action completely fails on STM32L162VEY (has 512 KiB flash in two 256 KiB banks) and also unintently destroying contents of EEPROM and second flash bank. Change-Id: I0f13f7b0346747a09c755d72b5b95775ceff5a6f Signed-off-by: Jussi Kivilinna <jussi.kivilinna@haltian.com> Reviewed-on: http://openocd.zylin.com/2441 Reviewed-by: Paul Fertser <fercerpav@gmail.com> Tested-by: jenkins
2015-02-04flash/nor/stm32lx: use 0 base to autodetect second bank locationPaul Fertser
Change-Id: I3c296b3e276fcd4d92e4180fc0d2133eebfcc240 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2503 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-02-04flash/nor/stm32l: unify waiting for busy flag functionsPaul Fertser
Change-Id: I5e6daff8232bb4807dd13a1951fbf335529661d4 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2491 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-02-04flash/nor/stm32l: fix mass erasePaul Fertser
Topaz reports on http://sourceforge.net/p/openocd/tickets/87/ that protection level constants are mixed up. This leads to device ending up in protection level 1 after mass erase. Additional work is required to actually put the device in RDP Level 1 and then back to Level 0, as Option bootloader launch is a special kind of full target reset. To be able to flash properly after mass_erase a "reset init" is needed (it's anyway recommended to always perform it before any flash operation). Change-Id: I9a838909458039bb0114d3019723bf134fa4d7c9 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2490 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-02-04flash/nor/stm32f2x: add new revisions of STM32F4x partsPaul Fertser
Change-Id: I7585ccbe12fe079e960ce9e33d9a143672a6a08c Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2493 Tested-by: jenkins Reviewed-by: Rémi PRUD'HOMME <prudhomme.remi@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-02-04Subject: [PATCH] update src/flash/nor/stm32f2x.cRémi PRUD’HOMME
Add the new STM32F446 mcu with 512 Ko Tested with a eval board Change-Id: I0c16ce7d32d249c7634d697815207c20e7f778c4 Signed-off-by: prudhomme.remi@gmail.com Reviewed-on: http://openocd.zylin.com/2484 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-02-02Add more STM32F3 IDs in target/stm32f3.cfg.Uwe Bonnes
Change-Id: I4c4462aa025639c4d20e6fa23c8845a69e60afc5 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2435 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-01-30stm32f2x: Fix byte order bug.Jens Bauer
Do not use buf_set_u32 on integers; they're not buffers. If using buf_set_u32 on integers, bytes will be exchanged on Big Endian targets. In this particular case, FLASH_OPTCR was incorrectly written, causing it to often contain one of these values: 0x00aaaae1, 0x00aaffef, 0x00ffabe1 or 0x00abffe1. This write-protected the device before flash-programming, causing this command... flash write_image erase unlock myfile.elf ... to fail, complaining about write-protection. Repeating the above command would change the OPTCR register each time. After applying this patch, the OPTCR remains "unchanged". Change-Id: I73d510fcc2e81a01973ad5c6e1aa22715ebd2743 Signed-off-by: Jens Bauer <jens@gpio.dk> Reviewed-on: http://openocd.zylin.com/2466 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-01-30flash/nor/kinetis: pull SRST low during mass erasePaul Fertser
Mass erase operation might be impacted by different factors, apparently the most reliable way is to do it while asserting the chip reset line. Change-Id: Id6ab57eaec86e402ffdf4f5c8843e7735640f03e Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2424 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-01-26stm32f07/9: Both devices have 256 kByte Flash Maximum.Uwe Bonnes
See RM0091, Rev.7. page 56. Change-Id: I9a98094d49739686f93e26a5112eb0a2a8a7c883 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2458 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-01-26stm32f0x: Remove duplicate code for revision string.Uwe Bonnes
As of RM0091, Rev. 7, all F0 have the same revisioning scheme. Change-Id: I0b344a1d3ca3f61f48fa151e83c549ca5333ae47 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2457 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-01-26stm32f09x: Print info in get_stm32x_info.Uwe Bonnes
Change-Id: I5f9b765fe04906e124e2c95ff6bf7193be9d4ce2 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2456 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-01-26flash/nor/stm32f1: Add handling of stm32f09, nearly same as stm32f07.Uwe Bonnes
Change-Id: I9cb2aa75decca0e8a065fe7f5353de44d6877274 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2394 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-01-15flash: add AT91SAM4SD16C deviceJörg Wunsch
Change-Id: I12f740a1a2d10637b0e5b1e8d054dd912576d190 Signed-off-by: Jörg Wunsch <openocd@uriah.heep.sax.de> Reviewed-on: http://openocd.zylin.com/2455 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-01-15lpc2000: Improve lpc2000 flash driver.Nemui Trinomius
This patch adds flash programming support for LPC5410x and LPC82x. And adds auto flash size detection for LPC800 series. Tested on below listed boards/chips. LPC54102(LPCLPC54102Xpresso) LPC824(LPCXpresso824-MAX) LPC812(LPC812MAX) LPC811,LPC810 Change-Id: Ie68b6d425b17ccfa83814607ee61056e99800c1c Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/2442 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-01-09flash: fix kinetis driver typosSpencer Oliver
Change-Id: I0a4557f08507c61cb8ab33b38d2b6b069c344c09 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2385 Tested-by: jenkins
2014-11-24lpc2000: ignore status of part ID IAP commandGrigori Goronzy
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-24flash: at91samd: fix use of is_erased in checkAndrey Yurovsky
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-24at91sam4: Adding support for the AT91SAM4S4A.Thomas Schmid
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 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-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>