Commit Graph

73 Commits

Author SHA1 Message Date
Zachary T Welch
2861877b32 command_handler: change 'cmd_ctx' to CMD_CTX
Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
2009-11-17 11:40:06 -08:00
Zachary T Welch
23402315ce command_handler: change 'args' to CMD_ARGV
This patch converts all instances of 'args' in COMMAND_HANDLER routines
to use CMD_ARGV macro.
2009-11-17 11:38:07 -08:00
Zachary T Welch
7bf1a86e47 command_handler: change to 'argc' to CMD_ARGC
This patch converts all instances of 'argc' in COMMAND_HANDLER routines
to use CMD_ARGC.
2009-11-17 11:38:06 -08:00
Zachary T Welch
e84849f5ed flash_command_get_bank_by_num: make COMMAND_HELPER
Use COMMAND_HELPER macro to declare flash_command_get_bank_by_num.
This is required for COMMAND_PARSE_NUMBER macro.
2009-11-16 08:44:38 -08:00
David Brownell
db094c2e60 target: don't implicitly include "algorithm.h"
Most files in the tree seem to have ended up including this,
and *quite* needlessly ... only code implementing or using
downloadable algorithms actually needs these declarations.

So take it out of the header files which included it, and put
it in files which use it ... reduce needless interdependencies.

Also: "algorithm.h" doesn't need to include "types.h" again;
it already comes from a different header.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16 00:35:05 -08:00
Zachary T Welch
ef746e27c5 command_t -> struct command
Remove misleading typedef and redundant suffix from struct command.
2009-11-13 13:30:50 -08:00
Zachary T Welch
98723c4ecd command_context_t -> struct command_context
Remove misleading typedef and redundant suffix from struct command_context.
2009-11-13 13:25:47 -08:00
Zachary T Welch
96b62996d2 flash_bank_t -> struct flash_bank
Remove misleading typedef and redundant suffix from struct flash_bank.
2009-11-13 11:58:14 -08:00
Zachary T Welch
0f1163e823 target_t -> struct target
Remove misleading typedef and redundant suffix from struct target.
2009-11-13 11:58:14 -08:00
Zachary T Welch
46fc1d57ac working_area_t -> struct working_area
Remove misleading typedef and redundant suffix from struct working_area.
2009-11-13 11:58:12 -08:00
Zachary T Welch
5e43565ab5 armv7m_algorithm_t -> struct armv7m_algorithm
Remove misleading typedef and redundant suffix from struct armv7m_algorithm.
2009-11-13 11:58:10 -08:00
Zachary T Welch
b1de5eb9a0 reg_param_t -> struct reg_param
Remove misleading typedef and redundant suffix from struct reg_param.
2009-11-13 11:58:09 -08:00
Zachary T Welch
c7b2cad52d stm32x_flash_bank_t -> struct stm32x_flash_bank
Remove misleading typedef and redundant suffix from struct stm32x_flash_bank.
2009-11-13 11:58:07 -08:00
Zachary T Welch
632fd663a8 flash_driver_t -> struct flash_driver
Remove misleading typedef and redundant suffix from struct flash_driver.
2009-11-13 11:58:06 -08:00
Zachary T Welch
fb59ec739a flash_sector_t -> struct flash_sector
Remove misleading typedef and redundant suffix from struct flash_sector.
2009-11-13 11:58:06 -08:00
Zachary T Welch
0796dfff89 use FLASH_BANK_COMMAND_HANDLER macro
Defines all flash_bank_command handlers using the new macro.
2009-11-13 10:51:46 -08:00
Zachary T Welch
cfc4d5c6b7 use COMMAND_HANDLER macro to define all commands 2009-11-13 10:51:45 -08:00
Zachary T Welch
2351641b8f {pic32m,stm32}x.c: remove useless declarations
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-09 18:42:48 -08:00
Zachary T Welch
aa9351ba46 Improve stm32x.c command argument parsing. 2009-11-05 18:19:19 -08:00
dbrownell
48e96a18ed Enhancement: stm32 flash protection error message
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-20 23:54:13 +00:00
ntfreak
f486f86c6c - correct stm32 connectivity line programming as per latest manual
git-svn-id: svn://svn.berlios.de/openocd/trunk@2439 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-01 10:15:53 +00:00
zwelch
dc575dc5bf Remove whitespace that occurs before ')'.
- Replace '[ \t]*[)]' with ')'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:47:42 +00:00
zwelch
f90d8fa45f Remove whitespace that occurs after '('.
- Replace '([ \t]*' with '('.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:46:23 +00:00
zwelch
fb1a9b2cb2 - Fixes '[|]' whitespace
- 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@2374 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:45:15 +00:00
zwelch
84df52f9ea - Fixes '=' whitespace
- 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 22:42:54 +00:00
zwelch
aea6815462 - Fixes '<<' whitespace
- 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 22:41:13 +00:00
zwelch
53d605e12c - Fixes '!=' whitespace
- 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@2363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:38:12 +00:00
zwelch
9af5e445b7 - Replace 'switch(' with 'switch ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2359 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:36:56 +00:00
zwelch
e43979e702 - Replace 'if(' with 'if ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2357 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:35:09 +00:00
duane
bf509dbafa C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2330 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:19:55 +00:00
zwelch
1840226d55 Transform 'u32' to 'uint32_t' in src/flash.
- Replace '\([^_]\)u32' with '\1uint32_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2280 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:10:25 +00:00
zwelch
f876d5e9c7 Transform 'u16' to 'uint16_t'
- 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-18 07:07:59 +00:00
zwelch
310be8a838 Transform 'u8' to 'uint8_t' in src/flash
- 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-06-18 07:06:25 +00:00
zwelch
278ca633da David Brownell <david-b@pacbell.net>:
Remove broken whitespace ... mostly at end of line, but
also in some cases blocks of inappropriate empty lines.

And spell "comamnd" right. :)


git-svn-id: svn://svn.berlios.de/openocd/trunk@1972 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 03:05:26 +00:00
zwelch
fbe8cf72a5 Add target_run_algorithm wrapper:
- 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-31 09:38:20 +00:00
zwelch
fbcb57baf8 Audit and eliminate redundant #include directives in src/flash sources.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1712 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 04:30:41 +00:00
zwelch
fdf114ab0a Fix stm32x and pic32mx flash pointer cast alignment warnings, simplify their last word handling.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1626 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-07 00:21:59 +00:00
mlu
7d61acebd8 Clear FLASH_SR error flags after flash errors to avoid reset befor further flash operations.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1571 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-29 21:08:39 +00:00
oharboe
a88532bc60 Zach Welch <zw@superlucidity.net> fix signed/unsigned comparisons
git-svn-id: svn://svn.berlios.de/openocd/trunk@1466 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-19 08:16:58 +00:00
mifi
0bba832713 The following patches was applied:
- 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-18 10:08:13 +00:00
mlu
ba4e2c43fb Improved (for humans) error reporting for flash programming errors.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1456 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-14 17:17:38 +00:00
mlu
c008618be9 Cortex-M3 cleanup and performance patch
git-svn-id: svn://svn.berlios.de/openocd/trunk@1438 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-02 12:16:19 +00:00
ntfreak
58f4bd4a3c - stm32x flash driver - add support for stm32105/107 (connectivity line)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1383 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-02-26 10:06:00 +00:00
ntfreak
ab28153685 - stm32x flash driver: add support for low density devices
git-svn-id: svn://svn.berlios.de/openocd/trunk@1189 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-27 12:14:46 +00:00
oharboe
d34e01f51d search and replace usleep(1000) with alive_sleep(1) to avoid GDB timeouts.
git-svn-id: svn://svn.berlios.de/openocd/trunk@942 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-19 16:40:35 +00:00
oharboe
330cf5a6bb fixed not halted error messages
git-svn-id: svn://svn.berlios.de/openocd/trunk@925 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-17 19:40:17 +00:00
ntfreak
be00c7d0c4 - more fixes to high density stm32x flash driver
- updated copyright for original author

git-svn-id: svn://svn.berlios.de/openocd/trunk@859 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-23 14:49:41 +00:00
ntfreak
dad28d0659 - fix bug with stm32 high density write protection
git-svn-id: svn://svn.berlios.de/openocd/trunk@858 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-22 14:30:52 +00:00
ntfreak
b979c22bcc - stm32 flash driver correctly handles early silicon
git-svn-id: svn://svn.berlios.de/openocd/trunk@808 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-15 10:21:43 +00:00
ntfreak
5c8ebfbed2 - probe incorrect for high density stm32 flash
git-svn-id: svn://svn.berlios.de/openocd/trunk@708 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-06-11 11:12:24 +00:00