aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor
AgeCommit message (Collapse)Author
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>
2014-09-08flash/nor/stellaris: improve support for Tiva C (Blizzard and Snowflake)Paul Fertser
This should make current Tiva C parts usable apart from the protection. Runtime tested on TM4C123GXL (Blizzard) and TM4C1294XL (Snowflake). Change-Id: Ia64e9d39fbd2b7049578bbfade72435e5203ddf5 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2257 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-08-19stm32lx: refactor and add support for STM32L0xxAndrey Yurovsky
This adds initial support for the STM32L0 family, specifically the ID code 417 variant. The 'L0 has 128B rather than 256B pages as well as a different number of pages per sector. It also has several key registers and register sets in different locations from the STM32L1xx parts. This change therefore takes the opportunity to reorganize part information into a const table (it was previously determined by a set of control statements) and abstracts away some of the low-level details to make them generic for L1 and L0 parts. We also include the first bank's size (for dual bank parts) in the new device information table (and correct that size for the 0x437 variant which is 256 rather than 192KB). The 'L0 parts will not use the built-in loader/helper for Flash writing. Tested on STM32L053 (dicovery board and Nucleo board) and STM32L152 (discovery board). Change-Id: I57f7a8ab02caee266de71b31ae82a50d85728a0b Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/2200 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-08-19flash: samd: add missing ID for SAMD20E18AAndrey Yurovsky
This was somehow missed in the chip ID table and of course that's exactly the one on my board (as such, tested on hardware). Change-Id: I212d7c729d979e0357f1d4635f40935e25fe6ff3 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/2260 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-08-19flash/nor/stm32f1x: add STM32F302x6/8 IDs, clarify STM32F302xB/CPaul Fertser
Change-Id: I22afbe30f32b0ea9b59c3de8d15ce14bdc4763cc Reported-by: Luis Rodrigues <lfrodrigues@gmail.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2249 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-07-10Adding support for the Atmel SAMR21.Thomas Schmid
The Atmel SAMR21 is a Atmel SAMD21 with an Atmel RF233 in one package (two dies). Tested with the SAMR21 Xplained Pro eval kit. Change-Id: I1d79ea05834b925d7ec810527206fe86854e684b Signed-off-by: Thomas Schmid <thomas@rfranging.com> Reviewed-on: http://openocd.zylin.com/2194 Tested-by: jenkins Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-07-04kinetis : Added Kinetis-K Series MDM-AP ID.Nemui Trinomius
Kinetis-K series has ID:0x001C0000 on MDM-AP IDR register. Other Kinetis(L/M/V/E) series have ID:0x001C0020. Change-Id: Iada37038cd239f7331ba80a3673b36bf7e18c555 Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/2195 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-22flash: samd: add SAMD10 and SAMD11 part IDsAndrey Yurovsky
Add part IDs for the new SAMD10 and SAMD11 parts within the Atmel SAMD family, they have the same Flash controller as the other samd parts and should be supported by the at91samd driver. Compile-tested only. Change-Id: I493ae96a7d7e8d19e607fd9a4b6544a982be42b3 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/2170 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-06-22flash/nor/tcl.c: fix formatting in "rejected" error messagePaul Fertser
The error message (with the usage field unpopulated) looks like this, obviously missing at least a space before Usage: Error: 'fm3' driver rejected flash bank at 0x00000000Usage (null) Change-Id: I2a625676e784d02942823f972a201f7f4f810c68 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2161 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-06-22efm32 : Added ZeroGecko family support.Nemui Trinomius
Added Cortex-M0plus "ZeroGecko" Family to flash driver. Tested on EFM32ZG222F32. Change-Id: I1660b34ef6ee04837e97581504fff0faf84d1c6d Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/1994 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-06-19stm32f1x: add STM32F33x support.Nemui Trinomius
Added STM32F33x series to flash driver. Tested on NUCLEO-F334R8 board(STM32F334R8T6). Change-Id: I2fe70d40eb7613a7a3cfa63d25fa83f7bc055fb4 Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/2174 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-06-18flash/nor/kinetis: prevent segfaulting with an HLAPaul Fertser
HLAs do not provide direct DAP access, so the best we can do about it is skipping it. Change-Id: I877ef8fd2d86e40e7442a637cdba182cfd60e05a Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2173 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-18flash/nor/at91sam4: add SAM4E16 supportMarco Cruz
Change-Id: I7ab4750073c9d34812b690996eef76fccf70c627 Signed-off-by: Marco Cruz <marco.caratuva@gmail.com> Reviewed-on: http://openocd.zylin.com/2157 Reviewed-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-01Flash/LPC2000: Add support for auto-probing flash sizeCosmin Gorgovan
Adds support for auto-probing on devices which support the IAP Read Part ID command. Includes IDs for all LPC17XX, LPC13XX, LPC11XX and LPC11XXX devices with publicly available user manuals. To use auto-probing, select the 'auto' lpc2000 variant. Change-Id: Ic617c32925c9ebe0e9d9192ed8ddbfa08e9f0aaa Signed-off-by: Cosmin Gorgovan <cosmin@linux-geek.org> Reviewed-on: http://openocd.zylin.com/2075 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-01Flash/LPC2000: Add support for LPC11(x)xx, LPC13xxCosmin Gorgovan
LPC11(x)xx and LPC13xx devices are mostly compatible with the lpc1700 variant of the LPC2000 driver, but use a fixed flash sector size of 4KB. Change-Id: I033515f4ff6bc61d3b9babd27096f78c99cea927 Signed-off-by: Cosmin Gorgovan <cosmin@linux-geek.org> Reviewed-on: http://openocd.zylin.com/2071 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-01STM32F2x: Don't clear FLASH_OPTCR bits when locking registerElliott Partridge
stm32x_write_options is locking the FLASH_OPTCR register by writing 0x00000001 to it, which clears the other bits. This causes problems with subsequent flash operations; the hardware is probably seeing the write protection bits in the register set to '0' (protect), causing a WRPERR. This patch ORs the value of the register with 0x00000001, so that the only change is the lock bit itself. Change-Id: I0e3ca9aa6563ce1b57a01fc0faf7563b6b85f620 Signed-off-by: Elliott Partridge <elliott.partridge@gmail.com> Reviewed-on: http://openocd.zylin.com/2155 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-05-31flash/nor/stm32f1x: add support for F04x partsPaul Fertser
Ref. RM0091 Rev.6. Change-Id: I13bcdb1741edc59712e4fa1849fff38d17709fa7 Reported-by: efuentes@irc.freenode.net Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2150 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>