aboutsummaryrefslogtreecommitdiff
path: root/src/flash/cfi.c
AgeCommit message (Collapse)AuthorFilesLines
2009-06-23Remove whitespace that occurs after '('.zwelch1-1/+1
- Replace '([ \t]*' with '('. git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '[<>]' whitespacezwelch1-2/+2
- 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@2375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '+' whitespacezwelch1-2/+2
- 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
2009-06-23- Fixes '=' whitespacezwelch1-5/+5
- 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
2009-06-23- Fixes '<<' whitespacezwelch1-1/+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@2370 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '[*]=' whitespacezwelch1-1/+1
- Replace '\(\w\)\([*]=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2365 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '[+]=' whitespacezwelch1-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
2009-06-23- Replace 'for(' with 'for ('.zwelch1-2/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@2360 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Replace 'switch(' with 'switch ('.zwelch1-12/+12
git-svn-id: svn://svn.berlios.de/openocd/trunk@2359 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Replace 'if(' with 'if ('.zwelch1-71/+71
git-svn-id: svn://svn.berlios.de/openocd/trunk@2357 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21C99 printf() -Werror fixesduane1-26/+33
git-svn-id: svn://svn.berlios.de/openocd/trunk@2331 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18Transform 'u32' to 'uint32_t' in src/flash.zwelch1-54/+54
- Replace '\([^_]\)u32' with '\1uint32_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2280 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18Transform 'u16' to 'uint16_t'zwelch1-3/+3
- 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
2009-06-18Transform 'u8' to 'uint8_t' in src/flashzwelch1-51/+51
- 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
2009-05-31Add target_run_algorithm wrapper:zwelch1-2/+2
- replaces all calls to target->type->run_algorithm. - add documentation in target_s to warn not to invoke callback directly. git-svn-id: svn://svn.berlios.de/openocd/trunk@1961 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31Add target_write_memory wrapper:zwelch1-66/+66
- 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
2009-05-31Add target_read_memory wrapper:zwelch1-9/+9
- 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
2009-05-25Author: Raúl Sánchez Siles <rsanchezs@infoglobal.es>kc8apf1-2/+4
- cfi flash_address coding style fix git-svn-id: svn://svn.berlios.de/openocd/trunk@1911 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-22Author: Raúl Sánchez Siles <rsanchezs@infoglobal.es>kc8apf1-2/+20
- Fix multi-byte reads on x16 devices used as x8 git-svn-id: svn://svn.berlios.de/openocd/trunk@1886 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-22Author: Raúl Sánchez Siles <rsanchezs@infoglobal.es>kc8apf1-2/+4
- Fix calculation of flash_address for x16 devices used as x8 git-svn-id: svn://svn.berlios.de/openocd/trunk@1885 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-22Author: Raúl Sánchez Siles <rsanchezs@infoglobal.es>kc8apf1-4/+4
- Consistently use flash_address git-svn-id: svn://svn.berlios.de/openocd/trunk@1884 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11Audit and eliminate redundant #include directives in src/flash sources.zwelch1-11/+0
git-svn-id: svn://svn.berlios.de/openocd/trunk@1712 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-08Michael Fischer <fischermi@t-online.de> fix compile problems on Macoharboe1-1/+1
git-svn-id: svn://svn.berlios.de/openocd/trunk@1678 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-21Michael Schwingen <rincewind@discworld.dascon.de> add non-CFI SST flashsoharboe1-3/+5
git-svn-id: svn://svn.berlios.de/openocd/trunk@1480 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-19Michael Schwingen <rincewind@discworld.dascon.de> enhanced non-CFI flash ↵oharboe1-34/+29
support git-svn-id: svn://svn.berlios.de/openocd/trunk@1469 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-19Zach Welch <zw@superlucidity.net> fix signed/unsigned comparisonsoharboe1-4/+4
git-svn-id: svn://svn.berlios.de/openocd/trunk@1466 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-18The following patches was applied:mifi1-56/+56
- openocd-flash-static-keyword-v3.patch - openocd-lpc2000-fix-erase-obo.patch - openocd-jlink-fix-sign-ptr-warn.patch - openocd-wextra-etm.patch - openocd-wextra-jtag.patch - openocd-add-new-tap-symbols-v6.patch Many thanks to Zach Welch <zw(at)superlucidity.net> git-svn-id: svn://svn.berlios.de/openocd/trunk@1462 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-15Nico Coesel <ncoesel@dealogic.nl> Chip width / bus width bug in cfi driveroharboe1-3/+11
git-svn-id: svn://svn.berlios.de/openocd/trunk@1459 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-15Laurentiu Cocanu - memory read/write and exit() error path fixesoharboe1-79/+266
git-svn-id: svn://svn.berlios.de/openocd/trunk@1064 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-14Laurentiu Cocanu - fix error handlingoharboe1-10/+33
git-svn-id: svn://svn.berlios.de/openocd/trunk@1061 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-14Ben Bodley TEKNIQUE <ben@teknique.com> - support for the 1Mb Spansion Flash ↵oharboe1-0/+2
S29AL008D. git-svn-id: svn://svn.berlios.de/openocd/trunk@1051 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-06- remove build warningsntfreak1-1/+0
- add missing svn props git-svn-id: svn://svn.berlios.de/openocd/trunk@1022 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-06Georg Acher <acher@in.tum.de> implements the buffer flash mode for Spansion ↵oharboe1-3/+71
flashes. It's basically a clone of the Intel version, just a few details differ git-svn-id: svn://svn.berlios.de/openocd/trunk@1017 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-19search and replace usleep(1000) with alive_sleep(1) to avoid GDB timeouts.oharboe1-2/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@942 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-17fixed not halted error messagesoharboe1-0/+7
git-svn-id: svn://svn.berlios.de/openocd/trunk@925 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-21Michael Kurz <michi.kurz@googlemail.com> MX29LV800B non-cfi flash.oharboe1-0/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@845 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-20Ben Bodley <ben@teknique.com> non-CFI compliant flash (AMIC A29L800A)oharboe1-0/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@841 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-06-16fallback for no implementation of multi word CFI write. Successful codepath ↵oharboe1-7/+11
not affected. git-svn-id: svn://svn.berlios.de/openocd/trunk@711 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-23Andre Renaud support for the am29sl800db CFI flash chip (id: 0x0004, 0x226b).oharboe1-0/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@603 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-08added a couple of LOG_ERROR() messages to improve logfile.oharboe1-0/+4
git-svn-id: svn://svn.berlios.de/openocd/trunk@548 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-03- Work on fixing erase check. Many implementations are plain broken.oharboe1-118/+1
Wrote a default flash erase check fn which uses CFI's target algorithm w/fallback to memory reads. - "flash info" no longer prints erase status as it is stale. - "flash erase_check" now prints erase status. erase check can take a *long* time. Work in progress - arm7/9 with seperate srst & trst now supports reset init/halt after a power outage. arm7/9 no longer makes any assumptions about state of target when reset is asserted. - fixes for srst & trst capable arm7/9 with reset init/halt - prepare_reset_halt retired. This code needs to be inside assert_reset anyway - haven't been able to get stm32 write algorithm to work. Fallback flash write does work. Haven't found a version of openocd trunk where this works. - added target_free_all_working_areas_restore() which can let be of restoring backups. This is needed when asserting reset as the target must be assumed to be an unknown state. Added some comments to working areas API - str9 reset script fixes - some guidelines - fixed dangling callbacks upon reset timeout git-svn-id: svn://svn.berlios.de/openocd/trunk@536 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-25- rename log functions to stop conflicts under win32 (wingdi)ntfreak1-80/+80
git-svn-id: svn://svn.berlios.de/openocd/trunk@523 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-17- fix warnings during configure cause by ecosboard. default to no, if host ↵drath1-87/+86
cpu isn't arm. - fix generic bitbang code to allow scans to end in Shift-[ID]R - several CFI fixes (thanks to Michael Schwingen): - buffer overflow when converting target code in cfi_intel_write_block - cfi_fix_code_endian needs the number of words, not bytes, as size argument. - Spansion flash write was completely broken on big-endian targets - I borrowed mechanisms from the intel driver, and moved some common code into the cfi_command_val helper function. There is still more common code that might be cleaned up. - the buffer size check in cfi_write was broken for spansion flashes, where cfi_write_words is not implemented. cfi_write_words is no only called if the flash does have a buffer size >1. - "flash info" printed CFI status information for non-CFI flashes, which is confusing. It now only prints those when a real CFI flash is detected. git-svn-id: svn://svn.berlios.de/openocd/trunk@517 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-07Michael Bruck: fixed warningsoharboe1-0/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@471 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-02Uwe Hermann tightned up comments, etc. to follow OpenOCD policyoharboe1-1/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@431 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-28Pavel Chromy cleaned up checks for halted, error messages, etc.oharboe1-21/+44
git-svn-id: svn://svn.berlios.de/openocd/trunk@374 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25- convert all files to unix line-endingdrath1-2355/+2355
git-svn-id: svn://svn.berlios.de/openocd/trunk@347 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25- "flash write_binary" is now "flash write_bank" to clarify the focus of theoharboe1-9/+4
command and reduce confusion with "flash write_image". - retired deprecated "flash erase" & "flash write". - added flash_driver_protect/write/erase() that are wafer thin frontend functions to low level driver functions. They implement checks that were inconsistently handled by the drivers, e.g. check for target halted was done in a spotty fashion. - use return ERROR_COMMAND_SYNTAX_ERROR to print out syntax of command instead of having lots of inlined replicas of the command line syntax(some of which were wrong). - use logging instead of dubious translation of error values to human understandable explanations of why things failed. The lower levels log the precise reason and the higher levels can ammend context as the error propagates up the call stack. - simplified flash API slightly with logging instead of allocating and returning information that the caller then has to translate into print statements. git-svn-id: svn://svn.berlios.de/openocd/trunk@337 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-24disable cfi_write_words(). Broken for spansion, fallbackoharboe1-2357/+2360
is a slower codepath that is reported to work. git-svn-id: svn://svn.berlios.de/openocd/trunk@331 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-18- add new non-cfi SST flash device. Thanks Øyvind Harboentfreak1-1/+4
git-svn-id: svn://svn.berlios.de/openocd/trunk@303 b42882b7-edfa-0310-969c-e2dbd0fdcd60