aboutsummaryrefslogtreecommitdiff
path: root/src/flash
AgeCommit message (Collapse)Author
2009-11-11add const keyword to some APIsZachary T Welch
Add 'const' keyword to 'char *' parameters to allow command handlers to pass constant string arguments. These changes allow the 'args' command handler to be changed to 'const' in a subsequent patch.
2009-11-11change argv to args in command handlersZachary T Welch
Subsequent patches expect all command handlers to use a uniform parameter naming scheme. In the entire tree, these two files used standard 'argv' instead of our non-standard 'args'. This patch opts to reduces the noise required to unify the command handlers, using dominant 'args' form. A future patch may be used to convert us back to the standard argv, but that requires coordination with all developers to minimize disruptions.
2009-11-11makefiles: improve build orderZachary T Welch
Separates various groups of files to be built in logical succession. In each layer, the core module (target.c, nand.c, etc.) is built _after_ their helper modules (e.g. image.c, nand_ecc.c) but _before_ any of their drivers (e.g. arm966e.c, mx3_nand.c). This allows problems introduced at the bottom of the stack to result in build failures as soon as possible, as the helpers and core should wrap portions of them.
2009-11-09{pic32m,stm32}x.c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves command registrations to end of files. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09str{7,9}x*.c: remove useless forward declarationsZachary T Welch
Remove useless forward declarations. Moves command registrations to end of files. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/<various>.c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/<assorted>.c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves command registrations to end of files. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/at91sam[37].c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves command registration to end of file. Moves flash structure definitions to end of files. Changes a few references to global flash structure to local refs. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/lpc2???.c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves command registrations to end of files. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/*nand*.c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves command registration to end of files. Moves flash structure definition to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/flash.c: remove forward declarationsZachary T Welch
Remove useless forward declarations. Moves command registration to end of file. Moves flash structure definition to end of file. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09src/flash: remove 'extern' and wrap headersZachary T Welch
Removes 'extern' keywords from function prototypes in the flash headers. Wraps long lines to fit into 80 columns. Adds multiple inclusion protection for s3c2xx_nand.h.
2009-11-09Overhaul time support APIZachary T Welch
This patch changes the duration_* API in several ways. First, it updates the API to use better names. Second, string formatting has been removed from the API (with its associated malloc). Finally, a new function added to convert the time into seconds, which can be used (or formatted) by the caller. This eliminates hidden calls to malloc that require associated calls to free(). This patch also removes the useless extern keyword from prototypes, and it eliminates the duration_t typedef (use 'struct duration'). These API also allows proper error checking, as it is possible for gettimeofday to fail in certain circumstances. The consumers have all been chased to use this new API as well, as there were relatively few cases doing this type of measurement. In most cases, the code performs additional checks for errors, but the calling code looks much cleaner in every case.
2009-11-06Simplify nand indentation.Zachary T Welch
Removes check covered by new nand_command_get_device_by_num helper. Reverses logic of probe check to further reduce indentation.
2009-11-06Improve flash indentation.Zachary T Welch
Removes redundant tests and reverses backwards logic to reduce the indentation level in flash.c.
2009-11-05Improve str9xpec command argument parsing.Zachary T Welch
2009-11-05Improve str9x config command argument parsing.Zachary T Welch
2009-11-05Improve str7x config command argument parsing.Zachary T Welch
2009-11-05Improve stm32x.c command argument parsing.Zachary T Welch
2009-11-05Improve stellaris.c erase argument parsing.Zachary T Welch
2009-11-05Improve pic32mx.c command argument parsing.Zachary T Welch
2009-11-05Improve mflash.c command argument parsing.Zachary T Welch
2009-11-05Improve lpc3180_nand_controller.c parsing.Zachary T Welch
This fixes a memory leak in lpc3180_nand_device_command by reordering the malloc to occur after all parsing has completed.
2009-11-05Improve lpc2900.c command argument parsing.Zachary T Welch
2009-11-05Improve lpc288x.c command argument parsing.Zachary T Welch
2009-11-05Improve lpc2000.c command argument parsing.Zachary T Welch
2009-11-05Improve cfi.c command argument parsing.Zachary T Welch
2009-11-05Improve avrf.c command argument parsing.Zachary T Welch
2009-11-05Improve orion_nand.c command argument parsing.Zachary T Welch
2009-11-05Improve davinci_nand.c command argument parsing.Zachary T Welch
2009-11-05Improve at91sam7.c command argument parsing.Zachary T Welch
2009-11-05Improve at91sam3.c command argument parsing.Zachary T Welch
2009-11-05Improve nand.c command argument parsing.Zachary T Welch
2009-11-05Improve flash.c command argument parsing.Zachary T Welch
2009-11-05Add Flash/NAND bank command argument helpers.Zachary T Welch
This eliminates redundant code for parsing and retreiving the bank specified from a script command argument. This patch was written to replace existing functionality; however, the parsing logic can be updated later to allow flash commands to accept bank names as well as their numbers.
2009-10-20Added the faux flash driver and target. Used for testing.Øyvind Harboe
2009-10-20Added 'unlock' option to flash write_imageØyvind Harboe
2009-10-14another portability updateDavid Brownell
Just use "%p" instead of consing up some integral type for pointer printf. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-14S29WS-N CFI query fix is to try 0x555 if 0x55 fails.Øyvind Harboe
2009-10-13Cleanup: nuke trailling whitespacesYauheni Kaliuta
Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
2009-10-10printf format warning fixesDavid Brownell
Observed on a Cygwin build. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-09-23Nico Coesel <ncoesel@dealogic.nl> fix warnings. . I'm wondering why theseoharboe
didn't turn up earlier. Is everyone still using gcc 3.x? Or is the x86 version of gcc 4.x much more relaxed? git-svn-id: svn://svn.berlios.de/openocd/trunk@2749 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-22- fix build issue under win32 (cygwin/msys) from svn r2746ntfreak
git-svn-id: svn://svn.berlios.de/openocd/trunk@2748 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-22- add missing svn props from previous commitntfreak
git-svn-id: svn://svn.berlios.de/openocd/trunk@2747 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-22Make it easier to erase or protect through to the enddbrownell
of a (NOR) flash chip: allow passing "last" as an alias for the number of the last sector. Improve several aspects of error checking while we're at it. From: Johnny Halfmoon <jhalfmoon@milksnot.com> git-svn-id: svn://svn.berlios.de/openocd/trunk@2746 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-21Remove annoying end-of-line whitespace from most src/*dbrownell
files; omitted src/httpd git-svn-id: svn://svn.berlios.de/openocd/trunk@2742 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-20Enhancement: stm32 flash protection error messagedbrownell
This patch modifies an error message which, in its original state, I find somewhat unhelpful. So a small hint was added. Signed-off-by: Johnny Halfmoon <jhalfmoon at milksnot.com> git-svn-id: svn://svn.berlios.de/openocd/trunk@2738 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-17Minor fixes to NAND code and docsdbrownell
Erase logic: - command invocation + treat "nand erase N" (no offset/length) as "erase whole chip N" + catch a few more bogus parameter cases, like length == 0 (sigh) - nand_erase() should be static - on error + say which block failed, and if it was a bad block + don't give up after the first error; try to erase the rest - on success, say which nand device was erased (name isn't unique) Device list ("nand list"): - say how many blocks there are - split summary into two lines - give example in the docs Doc tweaks: - Use @option{...} for DaVinci's supported hardware ECC options For the record, I've observed that _sometimes_ erasing bad blocks causes failure reports, and that manufacturer bad block markers aren't always erasable (even when erasing their blocks doesn't trigger an error report). git-svn-id: svn://svn.berlios.de/openocd/trunk@2724 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-16Rolf Meeser <rolfm_9dq@yahoo.de> adds flash support for NXP's LPC2900 family ↵oharboe
(ARM968E). git-svn-id: svn://svn.berlios.de/openocd/trunk@2715 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-14fix email addressoharboe
git-svn-id: svn://svn.berlios.de/openocd/trunk@2706 b42882b7-edfa-0310-969c-e2dbd0fdcd60