aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/stm32x.c
AgeCommit message (Collapse)AuthorFilesLines
2010-12-23stm32x : always use valid flash base addressSpencer Oliver1-0/+3
This change matches the previous behaviour of using the known flash address. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-12-23stm32: fix reversed option byte writeSpencer Oliver1-4/+4
This has been a long standing bug that has never been spotted. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-12-23stm32: update option bytes for stm32xl familySpencer Oliver1-8/+79
add supoort for xl family boot bank option. The option byte handling will be cleaned up in a later patch. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-12-23stm32: add stm32 xl family flash supportSpencer Oliver1-1/+45
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-12-23stm32: add dual flash bank supportSpencer Oliver1-26/+37
This patch adds the initial dual flash bank support for devices such as the stm32xl family. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-12-15stm32: fix unprotectØyvind Harboe1-4/+11
the unprotect fn in stm32 needs to unprotect more sectors than was requested aligned to some boundary. Print warning when this happens. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-17FLASH/NOR: Remove useless file stm32x.hAntonio Borneo1-1/+74
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-11-15Add comments and tiny improvements to STM32 flash loader algorithmFreddie Chopin1-16/+17
Add comments to assembly flash loader for STM32. Add tiny improvement in size of the algorithm (40 vs 48 bytes) and tiny speed improvement (~1.5%, as time is wasted on waiting for end of operation anyway). Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
2010-11-09stm32: return early upon block write failureØyvind Harboe1-0/+3
only if we do not have enough ram do we continue. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-09stm32: return error when failing to readØyvind Harboe1-9/+25
add missing error handling. Output warning when assuming maximum flash size in the family when failing to read. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-09stm32: add error propagation on writesØyvind Harboe1-42/+111
catch problems earlier. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-09stm32: sharpen error handling for timeoutsØyvind Harboe1-108/+69
delete lots of crud by handling this all in one spot. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-10-28src: add loader src descriptionSpencer Oliver1-0/+3
- add comment where to find the various loaders src files. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-20flash: remove algorithm exit_point address for supported targetsSpencer Oliver1-1/+1
For the above targets the exit_point is optional when used with run_algorithm, so remove it. This makes updating the algorithm less error prone. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-06-16stm32x: -Wshadow warning fixesØyvind Harboe1-2/+2
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-03stm32 : change returned value of mass_erase functiongcembed1-4/+5
Hello, "stm32x mass_erase" return ERROR_OK even if something goes wrong. Here is a summary of changes : * in stm32x_mass_erase : return ERROR_FLASH_OPERATION_FAILED when error detected in FLASH_SR register; * in COMMAND_HANDLER(stm32x_handle_mass_erase_command) : return the returned value of stm32x_mass_erase(). I don't know if there is reason to always return ERROR_OK ? Gaëtan
2010-05-29nor: fix memory leaks during probeSpencer Oliver1-0/+6
Fix similar memory leaks as per commit: ef72484b785ec7462a0415afea679d08b864c7fb Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-05-16NOR: add read() callback to struct flash_driverAntonio Borneo1-0/+1
Final target is to force bus_width size during CFI flash read. In this first step I need to replace default flash read with flash specific implementation. This patch introduces: - flash_driver_read() layer; - default_flash_read(), backward compatible; - read() callback in struct flash_driver; - proper initialization in every flash_driver instance. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-05-04flash: less bogus errorsØyvind Harboe1-1/+1
Removed bogus errors when trying to allocate a large a target memory buffer as possible. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-03STM32 flash erase timeout fixTobias Ringström1-2/+2
The current timeout for STM32 flash block erase and flash mass erase is 10 (ms), which is too tight, and fails around 50% of the time for me. The data sheet for STM32F107VC specifies a maximum erase time of 40 ms (for both operations). I'd also consider it a bug that the code does not detect a timeout, but just assumes that the operation has completed. The attached patch does not address this bug. The attached patch increases the timeouts from 10 to 100 ms. Please apply. /Tobias
2010-04-20stm32x: allow flash probe on a running targetAndreas Fritiofson1-6/+0
If the flash has not yet been probed and GDB connects while the target is running, the flash probe triggered by GDB's memory map read will fail. In that case the returned memory map will be empty, causing a subsequent load from within GDB to fail. There's not much you can do from GDB to recover, other than a restart; a 'mon reset init' and manual 'mon flash probe' won't help since GDB has already made up its mind about the memory map. It seems there's no reason to require the target to be halted when probing the flash. Remove the check to let a valid memory map be provided to GDB even when connecting to a running target. Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2010-03-10STM32: flash loader cleanupSpencer Oliver1-12/+25
- make algorithm array static const. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-03-03STM32: Add Value Line Flash Programming SupportSpencer Oliver1-0/+36
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-02-28ARMv7M: use software breakpoints for algorithmsSpencer Oliver1-2/+1
- armv7m_run_algorithm now requires all algorithms to use a software breakpoint at their exit address - updated all algorithms to support this Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-02-12STM32x: issue warning when unlocking device (bug #16)Spencer Oliver1-2/+6
Issue warning to user when unlocking or writing the option bytes. The new settings will not take effect until a target reset. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-01-29NOR: cleanup driver declsDavid Brownell1-17/+17
Fix goofy struct indents. Function names *are* their addresses. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09src/flash/nor: usage/help/doc updatesDavid Brownell1-13/+22
Make "usage" messages use the same EBNF as the User's Guide; no angle brackets. Improve and correct various helptexts. Don't use "&function"; a function's name is its address. Remove a couple instances of pointless whitespace; shrink a few overlong lines; fix some bad indents. Add TODO list entry re full support for NAND/NOR bank names. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-28stm32x commands get "usage"Freddie Chopin1-0/+5
Add .usage fields to stm32x command_registration, so that "help stm32x" shows required parameters. Signed-off-by: Freddie Chopin <freddie_chopin@op.pl> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04remove target.h from flash.hZachary T Welch1-1/+2
The flash.h header does not require the target.h header file, but its implementation source files do. Move it to flash/nor/imp.h.
2009-12-03change #include "armv7m.h" to <target/armv7m.h>Zachary T Welch1-1/+1
Changes from the flat namespace to heirarchical one. Instead of writing: #include "armv7m.h" the following form should be used. #include <target/armv7m.h> The exception is from .c files in the same directory.
2009-12-03change #include "algorithm.h" to <target/algorithm.h>Zachary T Welch1-1/+1
Changes from the flat namespace to heirarchical one. Instead of writing: #include "algorithm.h" the following form should be used. #include <target/algorithm.h> The exception is from .c files in the same directory.
2009-12-03change #include "binarybuffer.h" to <helper/binarybuffer.h>Zachary T Welch1-1/+1
Changes from the flat namespace to heirarchical one. Instead of writing: #include "binarybuffer.h" the following form should be used. #include <helper/binarybuffer.h> The exception is from .c files in the same directory.
2009-12-02move nor drivers to src/flash/norZachary T Welch1-0/+1240
Moves NOR flash drivers to 'src/flash/nor/'. Adds 'src/flash/nor/Makefile.am'. Builds 'libocdflashnor.la'.