aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor
AgeCommit message (Collapse)Author
2013-03-13Kinetis: Symbolic names for Addresses and CommandsAlex Austin
Change-Id: I2165b66c37bd1608139b5dd00f48124161e13ef0 Signed-off-by: Alex Austin <alex.austin@spectrumdsi.com> Reviewed-on: http://openocd.zylin.com/1191 Tested-by: jenkins Reviewed-by: Christopher Kilgour <techie@whiterocker.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-03-06flash: fix stm32 failed probe using incorrect flash sizeSpencer Oliver
This fixes an issue if the device is manually probed after the initial probe fails due to being unable to read flash size register. In this situation the driver assumes the user has overridden the flash size when infact this may not be the case. It also seems on the older stm32f1 devices the flash register is not readable when locked, this does not seem to apply to the newer parts - f0, f3, f4. Change-Id: I125f872fcb2d962ca6705f97b62d957e2b31303b Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1187 Tested-by: jenkins Reviewed-by: Johan Almquist <johan.almquist@assaabloy.com> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-03-06stm32: update stm32f1x driver for f0x and f3x option bytesSpencer Oliver
The stm32f0 and stm32f3 share the same option byte location, but the format differs. Adding an option_offset fixes the broken options_read cmd and incorrectly setting Hardware Watchdog when unlocking a f3x device. Change-Id: I82d66b6198294ea9eedb44ca8b2fb368c0cb15e8 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1184 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-02-25stm32: add support for stm32l1x 256k high density single bank devicesJohan Almquist
Added support for new ST devices in the stm32lx portfolio, with device id 0x427. These have 256k flash, but in a single bank compared to device id 0x436 which is a dual bank flash. Change-Id: Iafdfe990f24bd04b0d6e00385ee70690f3bf8d5f Signed-off-by: Johan Almquist <johan.almquist@assaabloy.com> Reviewed-on: http://openocd.zylin.com/1140 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-02-25stm32: add support for the STM32Lx 384kb dual bank flashJohan Almquist
This update adds support for the STM32Lx 384kb dual bank flash. Previously there was a problem when writing an image that was larger than 192Kb. That lead to openocd printing out two error messages like "Error: access denied / write protected" and "Error: invalid program address". The reason was that the stm32lx driver tried to write half pages which overlapped into the next flash bank. A new configuration file stm32lx_dual_bank.cfg can be used for stm32lx chips with dual bank flash (256kb or 384kb devices). A sanity check was added for probed flash size values to fix the issue seen on some ST samples that answered incorrectly. Change-Id: I69e25131983d88613be8606b438f98870c5f1e52 Signed-off-by: Johan Almquist <johan.almquist@assaabloy.com> Reviewed-on: http://openocd.zylin.com/1125 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-02-25stm32: enable flash bank size overrideSpencer Oliver
It has been seen on some stm32 targets that the flash size register that is probed by the driver may contain an invalid size. This change enables the user to override the probed value. Change-Id: I09359e59a96f9133d3d939670957d32a830a944e Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1132 Tested-by: jenkins Reviewed-by: Johan Almquist <johan.almquist@assaabloy.com>
2013-02-02armv7m: use ARM_MODE_THREAD core mode for algoorithm'sSpencer Oliver
This makes sure we are using privileged mode when executing any loaders. Change-Id: I18bf32ec92e1c76a66ab25e3712652bc3650b332 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1108 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-02-02armv7m: use generic arm::core_modeSpencer Oliver
To simplify things change over to using the generic core_mode struct rather than maintaining a armv7m specific one. Change-Id: Ibf32b785d896fef4f33307fabe0d8eb266f7086f Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/966 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-01-21flash: add stm32lx loader Hard Fault workaroundSpencer Oliver
An issue has been seen with the stm32lx flash driver that if a power cycle/reset is applied after a erase, any ram loader will Hard Fault on execution. A similar issue is mentioned in the errata for the device. Two solution's seem to workaround this issue: 1, Handle the exception, this means adding exception vectors to the loader and changing the exception address using nvic vtor register. 2. falling back to using slower direct page writes - approx 50% slower. Using solution 1 would mean restrictions are placed on the loader location. Solution 2 was chosen mainly as it was simpler too implement. Change-Id: I429f06b5a3e3b1d8de90071a88a7df11fc9b46a7 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1010 Tested-by: jenkins
2013-01-21flash: reduce stm32lx loader timeoutSpencer Oliver
Waiting 20secs is a bit much excessive, we could probably reduce to 5. Change-Id: Iffb97adb99c2541a075fe78dbc88a53ddf340214 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1009 Tested-by: jenkins
2013-01-21flash: cleanup stm32lx driverSpencer Oliver
Handle any leading bytes upto the next 128 byte page, enabling us to safely use the faster page write. Rather than use a separate word/byte write to program any trailing bytes we use a combined write function. Use memcpy for byte writes and change loader to using bytes. Change-Id: Ie0164a30388f018dd00e752cf5ff87d4f96ced97 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1008 Tested-by: jenkins
2013-01-21flash: stm32f2x support write protectionSpencer Oliver
Change-Id: I42662681104bb06e28148229464ae144c4a54538 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/989 Tested-by: jenkins
2013-01-21flash: add stm32f2x flash lock/unlock cmdsSpencer Oliver
Change-Id: I35344cc47fa4f0a49c034455c5abf479faa0344a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/988 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-01-18flash: EFM32 GG/LG page size detection fixRoman D
Fixed flash page size detection according to EFM32 GG/LG errata. MEM_INFO_PAGE_SIZE register containts invalid value in devices with revision number lower than 18 and should not be used. Change-Id: Idb2832246efcbbec2fd98a5c458f72a36df386fb Signed-off-by: Roman D <me@iamroman.org> Reviewed-on: http://openocd.zylin.com/1116 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-01-14flash: EFM32 flash implementationRoman D
Limited (no page unprotect, no block writes) implementation of EFM32 flash support. Verified with EFM32 development kit and STLink V2 adapter using SWD. Change-Id: I3db2054d9aa628a1fe4814430425db3c9959c71c Signed-off-by: Roman D <me@iamroman.org> Reviewed-on: http://openocd.zylin.com/1106 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-12-31flash: allow stm32f1x options_write args in any orderSpencer Oliver
Currently we have to supply the arg's to this cmd in a set order, this change fixes that issue. Change-Id: I14a15732e1917a91009e1ac14fba39ca1523c739 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/992 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-31flash: use correct stm32f1x option read maskSpencer Oliver
Make sure we do not mask out the BFB2 boot bank bit, as this is used on the larger XL devices. Change-Id: Iacfdf874140e409e0c4ca9b9aee8f5c2f90dc9be Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/991 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-31stm32f1x: fix stm32f0/f3 broken unlockSpencer Oliver
The STM32F0 and F3 devices use a different default RDP to configure a unlocked device, make sure we use that. Change-Id: I170779461412c4c202c2cfc8d90baedb7e388150 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/984 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-31stm32f1x: preserve user option byte dataSpencer Oliver
The user is able to use 2bytes of the options byte data for whatever purpose they wish. Make sure we preserve this during an option erase/write. Change-Id: Ibf951b11c59a148e671b1eb47fdc9b4f49ccae15 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/983 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-31flash: stm32f1x: write option bytes using the loaderSzymon Modzelewski
Some debuggers (stlink) can't issue 16 bit writes and have to use a loader to write flash memory. Currently the loader is not used for option bytes, causing stm32x_write_options to fail silently on such hardware. Fix this by using stm32x_write_block to write option bytes as well. Change-Id: I49c29d53ab5e162463cb349d4c89bef96467e587 Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com> Reviewed-on: http://openocd.zylin.com/480 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-30flash: stm32lx fallback to slow memory writes when no working areaSpencer Oliver
The current stm32lx driver will fail if no working area is provided - fallback to using slow writes if this is the case. Change-Id: I92b1535fec4aebc855c63ce2c54b10f168f3c07e Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1007 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-30flash: add new stm32l HD variantSpencer Oliver
Updated as per latest RM0038 Rev 6. Change-Id: Ia11309a1cdc3b8986f808b33a5c565bdc0ba58b0 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1003 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-30flash: format stm32f2x driver definesSpencer Oliver
Change-Id: Ie903996368a8d4313df87839d5ba3f2a102796a3 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/987 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-24flash: add stm32f2x rev XSpencer Oliver
Updated as per ST RM0033 rev 5 Change-Id: I627fdab69b440b75b8e4f7c474216538fa5273a4 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1001 Tested-by: jenkins
2012-12-14flash: fm3 mb9bfxx7 mb9bfxx8 supportMuranaka Masaki
Patch submitted by Trac #55 Change-Id: I08b0d79d24fe9108ca0bbfbc9b45c60359b6d180 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/981 Tested-by: jenkins
2012-11-19flash: add stm32f42x/stm32f43x supportSpencer Oliver
Other than a larger memory layout these new devices also have an extra MER1 bit to perform the mass erase. Change-Id: I7110a05bac95c1707160d1f5622181664291eb4a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/985 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
2012-11-06Added support for SPI Flash Winbond W25Q64CVGianluca Renzi
Added in spi device table SPI Flash Winbond W25Q64CV 64Mbit Its Device ID 0x001740ef is the same as Spansion S25FL064K (may be a clone?) Change-Id: I3cdbd182a0ccde75c78684cb9d54c76059bf34e0 Signed-off-by: Gianluca Renzi <gianlucarenzi@eurekelettronica.it> Reviewed-on: http://openocd.zylin.com/928 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-10-28flash: update stm32 flash driver versionsSpencer Oliver
Seems ST have changed the ref manual (RM0313 rev1) and reverted to using letters rather than numbers for the stm32f3x family. Change-Id: I3a87ec9b0b2447d57dfef98603d30e28fe9ac927 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/926 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Peter Stuge <peter@stuge.se>
2012-10-17flash: fix at91sam3/4 driver typosSpencer Oliver
Change-Id: I06efdfcc48279b06035e9e173945304310054864 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/896 Tested-by: jenkins Reviewed-by: Olivier Schonken <olivier.schonken@gmail.com>
2012-10-17Fix serious bug in LPC2xxx/LPC17xx flash algorithm.Freddie Chopin
Flash algorithm for LPC17xx/LPC2xxx was trying to "reuse" previously allocated working area on next flashing which is not possible - working areas are freed automatically on reset. This caused all but first flashing attempts to fail. As there is no point in storing pointer to working area, it was converted to local variable. Change-Id: I939946325ff9eecc4861c0f51ab0f73871a3d7b9 Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-on: http://openocd.zylin.com/860 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-10-17Cleanup lpc2000.cFreddie Chopin
Do some cleanup in lpc2000.c - concatenate short lines into single longer lines, move variable declarations to "just before" they are used, etc. Change-Id: Ia7b9f0307dd4857ee8e15c8a6d4d7b5c4392fd80 Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-on: http://openocd.zylin.com/861 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-10-12cfi: remove typos and code cleanupSpencer Oliver
No change to code, just fix some formatting issues. Change-Id: I177430a99bfecbf90a1ddf623321c29d4db516b0 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/906 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-10-12flash: update stellaris flash data to latest dev package 9453Spencer Oliver
Change-Id: I16107a093d4ed7342583f5c32ad16aa98f81d122 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/856 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-10-08dsp5680xx_flash: Remove unused flash bank structureAndreas Fritiofson
Change-Id: I947b6730b3741a71303e440daefa4fcf583cb9cf Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/867 Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-10-08stm32f1x: Increase options erase timeoutAndreas Fritiofson
The erase time for the option byte page is not directly specified but is assumed to be the same as the other pages (or mass erase) which is 20 to 40 ms. The current timeout value is 10 which means 10 ms plus the time to poll the status flag that many times. With faster interfaces or drivers (such as when using the ftdi driver instead of the ft2232 driver) the adapter delay is not enough in some cases, unless the jtag freq is reduced as a workaround. The result is a "timed out waiting for flash" error when trying to write the options. Increase the timeout to a minimum of 100 ms, which is in line with the other erase timeouts. Also make defines of both the erase and the program timeouts. Change-Id: Ia86e71505033c52b60ef30092000689fbb547a18 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/902 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-10-08flash/nor/stellaris: Remove unnecessary write_algorithm checkAndreas Fritiofson
The pointer must be non-null here since we returned if allocation failed. Change-Id: I9b75099ed3b3870c815d1df5760ed1f3fe1d20d6 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/866 Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-10-08flash/nor: make all working area pointers localAndreas Fritiofson
Working area pointers shouldn't be re-used, so there's no point in storing them in the flash bank struct. Make all such pointers local. Change-Id: Iab65b4e8b475fed7fc72fb8928f54590fa69d260 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/865 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-10-04Modified Sector Erase for AT91SAM4SOlivier Schonken
In FLASHD_ErasePages AT91C_EFC_FCMD_EPA is used to erase sectors. According to the datasheet FARG[15:2] defines the page from which the erase will start.This page must be modulo 4, 8, 16 or 32 according to the number of pages to erase. FARG[1:0] defines the number of pages to be erased. Previously (firstpage << 2) was used to conform to this, seems it should not be shifted... Changed it to (firstPage) | erasePages. Change-Id: I791cc7fc4faf056623ad5a6c7e860315306098a1 Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com> Reviewed-on: http://openocd.zylin.com/830 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-10-02flash: add stm32f3 rev 2 flash supportSpencer Oliver
Change-Id: Ibab5112f5f70a609136d01ebc50530a334640d03 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/809 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-09-26Added SPIFI flash driver, algorithms, and docsGeorge Harris
Added a flash driver designed to allow program/erase of memory-mapped SPI flash chips for LPC43xx/LPC18xx family micros. This driver includes three algorithms - erase, write, and SPIFI peripheral initialization (to allow memory-mapped access after a reset). The driver has been added to the flash driver table (drivers.c), and the OpenOCD documentation has been updated to include the flash driver configuration command. Change-Id: I79f4ff8f1f07de4e5f2fe4f8c23aeb903f868514 Signed-off-by: George Harris <george@luminairecoffee.com> Reviewed-on: http://openocd.zylin.com/783 Tested-by: jenkins Reviewed-by: Aurelien Jacobs <aurel@gnuage.org> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-09-26SPI nor drivers refactorGeorge Harris
Moved common SPI flash driver code (device table, common commands) into flash/nor/spi.c and spi.h. Updated flash/nor/stmsmi.c to reflect this refactor. Change-Id: I141644b0af71d3835f29f06dd15b505a00e5b6ec Signed-off-by: George Harris <george@luminairecoffee.com> Reviewed-on: http://openocd.zylin.com/782 Tested-by: jenkins Reviewed-by: Aurelien Jacobs <aurel@gnuage.org> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-09-07stlink: issue error for stm32 option writingSpencer Oliver
The stlink interface currently does not support 16bit read/writes. Until a fix is included we issue a error that this is unsupported. Change-Id: I4552cf2bd3b29e90ecc905325b743c08e2b92d67 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/808 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-09-07flash: fix sam3 page read/write address computation errorChuen Chou
In at91sam3.c for Atmel SAM3 flash support, there are arithmetic errors in the functions sam3_page_read() and sam3_page_write(). Address locations are computed incorrectly due to an extra addition operation. This leads to memory locations being skipped during flash writes and reads. Smaller programs are written successfully into flash, with memory gaps, while larger programs of legitimate size fail because the skipped memory is not utilized and therefore unavailable. The changes address this condition, and have been tested with an Atmel SAM3X-EK evaluation board. Change-Id: I9ea3b9ed0130b71cbc32b2294e31a6a2bc71b47a Signed-off-by: Chuen Chou <zhouquan27@gmail.com> Reviewed-on: http://openocd.zylin.com/806 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-08-29Pic32mx: make row programming work with any offsetSalvador Arroyo
In function pic32mx_write_block() if the parameter offset is not a multiple of row size the row offset (offset % row_size) will be ignored by the flash controller, shifting the code to the beginning of the row. Word programming gets it right. Change-Id: I134913e3d533688f791bbcb0c6e8983524197f3c Signed-off-by: Salvador Arroyo <sarroyofdez@yahoo.es> Reviewed-on: http://openocd.zylin.com/796 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-08-29kinetis: bugfix in kinetis_write() fallback pathAndreas Fritiofson
Offset calculation into buffer was wrong and code would read outside buffer if count was not a multiple of four. Change-Id: Ied625b10221423d5a5f25d27ce1edd8c2c3eca8a Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/749 Reviewed-by: Peter Stuge <peter@stuge.se> Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-08-29kinetis: ensure flash writes are not truncatedChristopher Kilgour
The number if longwords or "sections" (Freescale term) written for a Kinetis flash write (4, 8, or 16 bytes depending on the part density/granularity) are now rounded up to ensure there are no truncations when the desired write is not a multiple of the minimum write size. Change-Id: I8db40a8769d8ac5393a46cbf4e5ff0df82faf916 Signed-off-by: Christopher Kilgour <techie@whiterocker.com> Reviewed-on: http://openocd.zylin.com/738 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-08-29Patch: Make pic32mx unlock work at higher scan frequenciesSalvador Arroyo
For example in a pic32mx220, pic32mx unlock don't work if adapter_khz is set to 5000 or more. A short delay after asserting reset fix the problem. Change-Id: I62e493edfcea585c36c8de77a969cebac7227b96 Signed-off-by: Salvador Arroyo <sarroyofdez@yahoo.es> Reviewed-on: http://openocd.zylin.com/790 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-08-24cfi: fix type-punning warnings in cfi_spansion_write_blockAndreas Fritiofson
Retest the condition when needed, instead of abusing the common_magic field as a flag. There are only two options here. Either it's an armv7m or it's another arm. is_arm(...) will return true even for armv7m, so it's imperative to check in the right order. Change-Id: Ic227f19f7babf1b0b0fe075f9a3abc4eabc7d5f1 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/779 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-08-24flash: remove lpc2000 clang warningsSpencer Oliver
By Initialising the param_table we remove the clang warning's. We are also make sure we are not passing any rogue values to lpc2000_iap_call. Change-Id: Idb3b0077d1dae5f03dedab1d46d01140fe9ffb10 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/777 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-08-24tcl: fix potential memory leaksSpencer Oliver
Reorder to allocate all memory after COMMAND_PARSE_NUMBER call. This removes a clang warning about un-released memory Change-Id: I8dbeb664a6467077157015bd879bc0aefc5e8614 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/776 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>