aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor
AgeCommit message (Collapse)Author
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-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>
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-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-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-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-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-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-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-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-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-08stm32f2x: added STM32F411xx series support.Nemui Trinomius
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>
2014-09-08flash/nor/stellaris: add all Tiva C parts IDsPaul Fertser
Luckily, TI's website has predictable URLs for the datasheets, so it was trivial to download all the pdfs corresponding to the currently available 71 TivaC devices. Then they were processed with pdftotext and parsed by this script: BEGIN { capture = -1 } /^Device Identification 0 \(DID0\)$/ { state = "waitingclass0" } /^Device Identification 1 \(DID1\)$/ { state = "waitingpartno0" } /^CLASS$/ { if (state == "waitingclass0") state = "waitingclass" else if (state == "waitingclass") capture = 4 } /^PARTNO$/ { if (state == "waitingpartno0") state = "waitingpartno" else if (state == "waitingpartno") capture = 4 } (FNR == 3) { family = $2 } { if (capture >= 0) { if (capture == 0) { if (state == "waitingclass") class = $0 else if (state == "waitingpartno") partno = $0 } capture-- } } END { print "{" class ", " partno ", \"" family "\"}," } Change-Id: I6820c409fe535f08394c203276b5af4406fe8b92 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2262 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>