diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-01-02 23:58:16 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-01-02 23:58:16 +0000 |
commit | ad751bb7a4c73268fb38181b603215300490d201 (patch) | |
tree | e04a22dc6526d96887da6ede87fd5a4710657531 /src/flash/flash.c | |
parent | 9d75343e451cb9a11bade2deb575794cb6aecad3 (diff) | |
download | riscv-openocd-ad751bb7a4c73268fb38181b603215300490d201.zip riscv-openocd-ad751bb7a4c73268fb38181b603215300490d201.tar.gz riscv-openocd-ad751bb7a4c73268fb38181b603215300490d201.tar.bz2 |
John McCarthy <jgmcc@magma.ca> pic32mx flash wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1296 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/flash.c')
-rw-r--r-- | src/flash/flash.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/flash/flash.c b/src/flash/flash.c index c5cf757..72ba127 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -78,6 +78,7 @@ extern flash_driver_t tms470_flash; extern flash_driver_t ecosflash_flash; extern flash_driver_t lpc288x_flash; extern flash_driver_t ocl_flash; +extern flash_driver_t pic32mx_flash; flash_driver_t *flash_drivers[] = { &lpc2000_flash, @@ -94,6 +95,7 @@ flash_driver_t *flash_drivers[] = { &ecosflash_flash, &lpc288x_flash, &ocl_flash, + &pic32mx_flash, NULL, }; @@ -316,14 +318,17 @@ int handle_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char /* put flash bank in linked list */ if (flash_banks) { + int bank_num = 0; /* find last flash bank */ - for (p = flash_banks; p && p->next; p = p->next); + for (p = flash_banks; p && p->next; p = p->next) bank_num++; if (p) p->next = c; + c->bank_number = bank_num + 1; } else { flash_banks = c; + c->bank_number = 0; } found = 1; |