summaryrefslogtreecommitdiff
path: root/src/flash/mflash.c
Commit message (Collapse)AuthorAgeFilesLines
* mflash_bank_t -> struct mflash_bankZachary T Welch2009-11-131-2/+2
| | | | Remove misleading typedef and redundant suffix from struct mflash_bank.
* mg_drv_info_t -> struct mg_drv_infoZachary T Welch2009-11-131-1/+1
| | | | Remove misleading typedef and redundant suffix from struct mg_drv_info.
* mflash_gpio_drv_t -> struct mflash_gpio_drvZachary T Welch2009-11-131-4/+4
| | | | Remove misleading typedef and redundant suffix from struct mflash_gpio_drv.
* mflash_gpio_num_t -> struct mflash_gpio_numZachary T Welch2009-11-131-8/+8
| | | | Remove misleading typedef and redundant suffix from struct mflash_gpio_num.
* fileio_t -> struct fileioZachary T Welch2009-11-131-2/+2
| | | | Remove useless structure typedef.
* use COMMAND_HANDLER macro to define all commandsZachary T Welch2009-11-131-6/+5
|
* Overhaul time support APIZachary T Welch2009-11-091-40/+34
| | | | | | | | | | | | | | | | | | | 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.
* Improve mflash.c command argument parsing.Zachary T Welch2009-11-051-6/+9
|
* another portability updateDavid Brownell2009-10-141-4/+4
| | | | | | Just use "%p" instead of consing up some integral type for pointer printf. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* Remove whitespace at end of lines, step 1.zwelch2009-06-231-14/+14
| | | | | | | - Replace '\s*$' with ''. git-svn-id: svn://svn.berlios.de/openocd/trunk@2379 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove whitespace that occurs before ')'.zwelch2009-06-231-3/+3
| | | | | | | - Replace '[ \t]*[)]' with ')'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '+' whitespacezwelch2009-06-231-1/+1
| | | | | | | | | | - Replace ')\(+\)(' with ') \1 ('. - Replace ')\(+\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(+\)(' with '\1 \2 ('. - Replace '\(\w\)\(+\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2373 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '=' whitespacezwelch2009-06-231-3/+3
| | | | | | | | | - Replace ')\(=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(=\)(' with '\1 \2 ('. - Replace '\(\w\)\(=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2372 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '[+]=' whitespacezwelch2009-06-231-1/+1
| | | | | | | | - Replace '\(\w\)\([+]=\)(' with '\1 \2 ('. - Replace '\(\w\)\([+]=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2364 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Replace 'switch(' with 'switch ('.zwelch2009-06-231-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2359 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Replace 'if(' with 'if ('.zwelch2009-06-231-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2357 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* C99 printf() -Werror fixesduane2009-06-211-19/+19
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2332 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u32' to 'uint32_t' in src/flash.zwelch2009-06-181-30/+30
| | | | | | | - Replace '\([^_]\)u32' with '\1uint32_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2280 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u16' to 'uint16_t'zwelch2009-06-181-4/+4
| | | | | | | | - Replace '\([^_]\)u16' with '\1uint16_t'. - Replace '^u16' with 'uint16_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2277 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u8' to 'uint8_t' in src/flashzwelch2009-06-181-32/+32
| | | | | | | | - Replace '\([^_]\)u8' with '\1uint8_t'. - Replace '^u8' with 'uint8_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2275 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* unsik Kim <donari75@gmail.com>:zwelch2009-06-121-191/+233
| | | | | | | Improve error handling in mflash driver. git-svn-id: svn://svn.berlios.de/openocd/trunk@2221 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add target_write_memory wrapper:zwelch2009-05-311-2/+2
| | | | | | | | - replaces all calls to target->type->write_memory. - add documentation in target_s to warn not to invoke callback directly. git-svn-id: svn://svn.berlios.de/openocd/trunk@1960 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add target_read_memory wrapper:zwelch2009-05-311-3/+3
| | | | | | | | - replaces all calls to target->type->read_memory. - add documentation in target_s to warn not to invoke callback directly. git-svn-id: svn://svn.berlios.de/openocd/trunk@1959 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fix potentialyl unaligned memory accesses in mflash driver.zwelch2009-05-271-2/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1935 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* unsik Kim <donari75@gmail.com>:zwelch2009-05-271-23/+64
| | | | | | | Add large bank write/dump support in mflash driver. git-svn-id: svn://svn.berlios.de/openocd/trunk@1931 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* unsik Kim <donari75@gmail.com>:zwelch2009-05-271-10/+449
| | | | | | | Add mflash configuration code, updating relevant documentation. git-svn-id: svn://svn.berlios.de/openocd/trunk@1930 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* unsik Kim <donari75@gmail.com>:zwelch2009-05-271-12/+0
| | | | | | | Remove unused mflash driver 'prove' field. git-svn-id: svn://svn.berlios.de/openocd/trunk@1929 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* unsik Kim <donari75@gmail.com>:zwelch2009-05-271-23/+5
| | | | | | | Remove unused mflash bank command options. git-svn-id: svn://svn.berlios.de/openocd/trunk@1928 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* unsik Kim <donari75@gmail.com>:zwelch2009-05-271-13/+13
| | | | | | | Change prefix of mflash driver routines to mg_. git-svn-id: svn://svn.berlios.de/openocd/trunk@1927 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Consolidate target selection code into single get_target() that handles both ↵kc8apf2009-05-181-2/+2
| | | | | | names and numbers. Provided by David Brownell <david-b@pacbell.net> git-svn-id: svn://svn.berlios.de/openocd/trunk@1804 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Audit and eliminate redundant #include directives in src/flash sources.zwelch2009-05-111-12/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1712 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove redundant sys/types.h #include directives (now in types.h).zwelch2009-05-111-1/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1700 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Philippe Vachon <philippe@cowpig.ca> 64 bit host fixesoharboe2009-04-271-4/+8
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1534 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Holger Schurig <hs4233@mail.mn-solutions.de> fix warningsoharboe2009-02-181-25/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - remove target specific variant and use target->variant memberntfreak2008-12-131-75/+70
| | | | | | | - fix build warning in cortex_m3 - code cleanup - remove trailing lf and convert c++ comments git-svn-id: svn://svn.berlios.de/openocd/trunk@1238 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - update docs deprecated section to include links to new commands (if any)ntfreak2008-10-161-876/+876
| | | | | | - added missing svn props git-svn-id: svn://svn.berlios.de/openocd/trunk@1077 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* unsik Kim <donari75@gmail.com> - mflash supportoharboe2008-10-161-0/+876
git-svn-id: svn://svn.berlios.de/openocd/trunk@1067 b42882b7-edfa-0310-969c-e2dbd0fdcd60