You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(75) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(70) |
Feb
(20) |
Mar
(52) |
Apr
(149) |
May
(387) |
Jun
(466) |
Jul
(133) |
Aug
(87) |
Sep
(122) |
Oct
(140) |
Nov
(185) |
Dec
(105) |
2010 |
Jan
(85) |
Feb
(45) |
Mar
(75) |
Apr
(17) |
May
(41) |
Jun
(52) |
Jul
(33) |
Aug
(29) |
Sep
(36) |
Oct
(15) |
Nov
(26) |
Dec
(34) |
2011 |
Jan
(26) |
Feb
(25) |
Mar
(26) |
Apr
(29) |
May
(20) |
Jun
(27) |
Jul
(15) |
Aug
(32) |
Sep
(13) |
Oct
(64) |
Nov
(60) |
Dec
(10) |
2012 |
Jan
(64) |
Feb
(63) |
Mar
(39) |
Apr
(43) |
May
(54) |
Jun
(11) |
Jul
(30) |
Aug
(45) |
Sep
(11) |
Oct
(70) |
Nov
(24) |
Dec
(23) |
2013 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(40) |
May
(20) |
Jun
(24) |
Jul
(36) |
Aug
(25) |
Sep
(42) |
Oct
(40) |
Nov
(9) |
Dec
(21) |
2014 |
Jan
(29) |
Feb
(24) |
Mar
(60) |
Apr
(22) |
May
(22) |
Jun
(46) |
Jul
(11) |
Aug
(23) |
Sep
(26) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
2015 |
Jan
(28) |
Feb
(47) |
Mar
(33) |
Apr
(58) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(8) |
Sep
(12) |
Oct
(25) |
Nov
(58) |
Dec
(21) |
2016 |
Jan
(12) |
Feb
(40) |
Mar
(2) |
Apr
(1) |
May
(67) |
Jun
(2) |
Jul
(5) |
Aug
(36) |
Sep
|
Oct
(24) |
Nov
(17) |
Dec
(50) |
2017 |
Jan
(14) |
Feb
(16) |
Mar
(2) |
Apr
(35) |
May
(14) |
Jun
(16) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
(19) |
Nov
|
Dec
(16) |
2018 |
Jan
(55) |
Feb
(11) |
Mar
(34) |
Apr
(14) |
May
(4) |
Jun
(20) |
Jul
(39) |
Aug
(16) |
Sep
(17) |
Oct
(16) |
Nov
(20) |
Dec
(30) |
2019 |
Jan
(29) |
Feb
(24) |
Mar
(37) |
Apr
(26) |
May
(19) |
Jun
(21) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
2020 |
Jan
(47) |
Feb
(36) |
Mar
(54) |
Apr
(44) |
May
(37) |
Jun
(19) |
Jul
(32) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(32) |
Dec
(11) |
2021 |
Jan
(14) |
Feb
(5) |
Mar
(40) |
Apr
(32) |
May
(42) |
Jun
(31) |
Jul
(29) |
Aug
(47) |
Sep
(38) |
Oct
(17) |
Nov
(74) |
Dec
(33) |
2022 |
Jan
(11) |
Feb
(15) |
Mar
(40) |
Apr
(21) |
May
(39) |
Jun
(44) |
Jul
(19) |
Aug
(46) |
Sep
(79) |
Oct
(35) |
Nov
(21) |
Dec
(15) |
2023 |
Jan
(56) |
Feb
(13) |
Mar
(43) |
Apr
(28) |
May
(60) |
Jun
(15) |
Jul
(29) |
Aug
(28) |
Sep
(32) |
Oct
(21) |
Nov
(42) |
Dec
(39) |
2024 |
Jan
(35) |
Feb
(17) |
Mar
(28) |
Apr
(7) |
May
(14) |
Jun
(35) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(28) |
Nov
(38) |
Dec
(18) |
2025 |
Jan
(21) |
Feb
(28) |
Mar
(36) |
Apr
(35) |
May
(34) |
Jun
(58) |
Jul
(9) |
Aug
(50) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Øyvind H. <go...@us...> - 2010-09-27 16:35:18
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 19167a7af6053f1eba0420509408731db007368c (commit) from 3bb4a6ba14dba7441868dd28b6f56798523e8ad3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 19167a7af6053f1eba0420509408731db007368c Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Sep 27 16:29:08 2010 +0200 image: fix spelling mistake struct imageection => struct imagesection Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c index 84408e6..d200d8c 100644 --- a/src/flash/nor/core.c +++ b/src/flash/nor/core.c @@ -522,9 +522,9 @@ int flash_unlock_address_range(struct target *target, uint32_t addr, uint32_t le static int compare_section (const void * a, const void * b) { - struct imageection *b1, *b2; - b1=*((struct imageection **)a); - b2=*((struct imageection **)b); + struct imagesection *b1, *b2; + b1=*((struct imagesection **)a); + b2=*((struct imagesection **)b); if (b1->base_address == b2->base_address) { @@ -568,7 +568,7 @@ int flash_write_unlock(struct target *target, struct image *image, /* This fn requires all sections to be in ascending order of addresses, * whereas an image can have sections out of order. */ - struct imageection **sections = malloc(sizeof(struct imageection *) * + struct imagesection **sections = malloc(sizeof(struct imagesection *) * image->num_sections); int i; for (i = 0; i < image->num_sections; i++) @@ -576,7 +576,7 @@ int flash_write_unlock(struct target *target, struct image *image, sections[i] = &image->sections[i]; } - qsort(sections, image->num_sections, sizeof(struct imageection *), + qsort(sections, image->num_sections, sizeof(struct imagesection *), compare_section); /* loop until we reach end of the image */ @@ -696,7 +696,7 @@ int flash_write_unlock(struct target *target, struct image *image, * list of pointers to sections to invoke image_read_section()... */ intptr_t diff = (intptr_t)sections[section] - (intptr_t)image->sections; - int t_section_num = diff / sizeof(struct imageection); + int t_section_num = diff / sizeof(struct imagesection); LOG_DEBUG("image_read_section: section = %d, t_section_num = %d, section_offset = %d, buffer_size = %d, size_read = %d", (int)section, diff --git a/src/target/image.c b/src/target/image.c index f8d0529..d36fbc3 100644 --- a/src/target/image.c +++ b/src/target/image.c @@ -147,7 +147,7 @@ static int identify_image_type(struct image *image, const char *type_string, con return ERROR_OK; } -static int image_ihex_buffer_complete_inner(struct image *image, char *lpszLine, struct imageection *section) +static int image_ihex_buffer_complete_inner(struct image *image, char *lpszLine, struct imagesection *section) { struct image_ihex *ihex = image->type_private; struct fileio *fileio = &ihex->fileio; @@ -230,7 +230,7 @@ static int image_ihex_buffer_complete_inner(struct image *image, char *lpszLine, image->num_sections++; /* copy section information */ - image->sections = malloc(sizeof(struct imageection) * image->num_sections); + image->sections = malloc(sizeof(struct imagesection) * image->num_sections); for (i = 0; i < image->num_sections; i++) { image->sections[i].private = section[i].private; @@ -367,7 +367,7 @@ static int image_ihex_buffer_complete(struct image *image) LOG_ERROR("Out of memory"); return ERROR_FAIL; } - struct imageection *section = malloc(sizeof(struct imageection) * IMAGE_MAX_SECTIONS); + struct imagesection *section = malloc(sizeof(struct imagesection) * IMAGE_MAX_SECTIONS); if (section == NULL) { free(lpszLine); @@ -466,7 +466,7 @@ static int image_elf_read_headers(struct image *image) if ((field32(elf, elf->segments[i].p_type) == PT_LOAD) && (field32(elf, elf->segments[i].p_filesz) != 0)) image->num_sections++; /* alloc and fill sections array with loadable segments */ - image->sections = malloc(image->num_sections * sizeof(struct imageection)); + image->sections = malloc(image->num_sections * sizeof(struct imagesection)); for (i = 0,j = 0;i < elf->segment_count;i++) { if ((field32(elf, elf->segments[i].p_type) == PT_LOAD) && (field32(elf, elf->segments[i].p_filesz) != 0)) @@ -526,7 +526,7 @@ static int image_elf_read_section(struct image *image, int section, uint32_t off return ERROR_OK; } -static int image_mot_buffer_complete_inner(struct image *image, char *lpszLine, struct imageection *section) +static int image_mot_buffer_complete_inner(struct image *image, char *lpszLine, struct imagesection *section) { struct image_mot *mot = image->type_private; struct fileio *fileio = &mot->fileio; @@ -660,7 +660,7 @@ static int image_mot_buffer_complete_inner(struct image *image, char *lpszLine, image->num_sections++; /* copy section information */ - image->sections = malloc(sizeof(struct imageection) * image->num_sections); + image->sections = malloc(sizeof(struct imagesection) * image->num_sections); for (i = 0; i < image->num_sections; i++) { image->sections[i].private = section[i].private; @@ -706,7 +706,7 @@ static int image_mot_buffer_complete(struct image *image) LOG_ERROR("Out of memory"); return ERROR_FAIL; } - struct imageection *section = malloc(sizeof(struct imageection) * IMAGE_MAX_SECTIONS); + struct imagesection *section = malloc(sizeof(struct imagesection) * IMAGE_MAX_SECTIONS); if (section == NULL) { free(lpszLine); @@ -745,7 +745,7 @@ int image_open(struct image *image, const char *url, const char *type_string) } image->num_sections = 1; - image->sections = malloc(sizeof(struct imageection)); + image->sections = malloc(sizeof(struct imagesection)); image->sections[0].base_address = 0x0; image->sections[0].size = image_binary->fileio.size; image->sections[0].flags = 0; @@ -798,7 +798,7 @@ int image_open(struct image *image, const char *url, const char *type_string) struct image_memory *image_memory; image->num_sections = 1; - image->sections = malloc(sizeof(struct imageection)); + image->sections = malloc(sizeof(struct imagesection)); image->sections[0].base_address = 0x0; image->sections[0].size = 0xffffffff; image->sections[0].flags = 0; @@ -954,7 +954,7 @@ int image_read_section(struct image *image, int section, uint32_t offset, uint32 int image_add_section(struct image *image, uint32_t base, uint32_t size, int flags, uint8_t *data) { - struct imageection *section; + struct imagesection *section; /* only image builder supports adding sections */ if (image->type != IMAGE_BUILDER) @@ -978,7 +978,7 @@ int image_add_section(struct image *image, uint32_t base, uint32_t size, int fla /* allocate new section */ image->num_sections++; - image->sections = realloc(image->sections, sizeof(struct imageection) * image->num_sections); + image->sections = realloc(image->sections, sizeof(struct imagesection) * image->num_sections); section = &image->sections[image->num_sections - 1]; section->base_address = base; section->size = size; diff --git a/src/target/image.h b/src/target/image.h index b096031..27f3186 100644 --- a/src/target/image.h +++ b/src/target/image.h @@ -47,7 +47,7 @@ enum image_type IMAGE_BUILDER, /* when building a new image */ }; -struct imageection +struct imagesection { uint32_t base_address; uint32_t size; @@ -60,7 +60,7 @@ struct image enum image_type type; /* image type (plain, ihex, ...) */ void *type_private; /* type private data */ int num_sections; /* number of sections contained in the image */ - struct imageection *sections; /* array of sections */ + struct imagesection *sections; /* array of sections */ int base_address_set; /* whether the image has a base address set (for relocation purposes) */ long long base_address; /* base address, if one is set */ int start_address_set; /* whether the image has a start address (entry point) associated */ ----------------------------------------------------------------------- Summary of changes: src/flash/nor/core.c | 12 ++++++------ src/target/image.c | 22 +++++++++++----------- src/target/image.h | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Zach W. <zw...@us...> - 2010-09-27 02:51:04
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 3bb4a6ba14dba7441868dd28b6f56798523e8ad3 (commit) from 6468c593c7ece11aa7735d8d6aa9a546b9505cc3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3bb4a6ba14dba7441868dd28b6f56798523e8ad3 Author: Zachary T Welch <zw...@co...> Date: Fri Sep 24 16:13:04 2010 -0700 Fix omap3_dbginit to write to physical memory. Setting the OMAP3530 DBGEN bit must be done in physical memory, so update omap3_dbginit callback to use the new 'mww phys' command syntax. diff --git a/tcl/target/omap3530.cfg b/tcl/target/omap3530.cfg index 74edd72..ba130a9 100644 --- a/tcl/target/omap3530.cfg +++ b/tcl/target/omap3530.cfg @@ -56,7 +56,7 @@ proc omap3_dbginit {target} { # General Cortex A8 debug initialisation cortex_a8 dbginit # Enable DBGU signal for OMAP353x - $target mww 0x5401d030 0x00002000 + $target mww phys 0x5401d030 0x00002000 } # be absolutely certain the JTAG clock will work with the worst-case ----------------------------------------------------------------------- Summary of changes: tcl/target/omap3530.cfg | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-26 22:40:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 6468c593c7ece11aa7735d8d6aa9a546b9505cc3 (commit) from 9f26aff39c047d813047b4f4bae1f5de3cfc56b1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6468c593c7ece11aa7735d8d6aa9a546b9505cc3 Author: Ãyvind Harboe <oyv...@zy...> Date: Sun Sep 26 20:37:53 2010 +0200 zy1000: fix non-JTAG master build Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index c939d7f..c8bee2f 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -1589,7 +1589,7 @@ int zy1000_init(void) { #if BUILD_ECOSBOARD LOG_USER("%s", ZYLIN_OPENOCD_VERSION); -#else +#elif BUILD_ZY1000_MASTER int fd; if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) { ----------------------------------------------------------------------- Summary of changes: src/jtag/zy1000/zy1000.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-26 18:07:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 9f26aff39c047d813047b4f4bae1f5de3cfc56b1 (commit) from cb0de21d0cb6b899be30b6ce9c48d93f75a6c345 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9f26aff39c047d813047b4f4bae1f5de3cfc56b1 Author: Ãyvind Harboe <oyv...@zy...> Date: Sun Sep 26 18:01:54 2010 +0200 gdb: fix blank line at top snuck in at some point... Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 1d1d836..76c3e36 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -1,4 +1,3 @@ - /*************************************************************************** * Copyright (C) 2005 by Dominic Rath * * Dom...@gm... * ----------------------------------------------------------------------- Summary of changes: src/server/gdb_server.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-25 11:38:18
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via cb0de21d0cb6b899be30b6ce9c48d93f75a6c345 (commit) from 22911a3aedfa01c7a5643de9c21fbb94f6219c38 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit cb0de21d0cb6b899be30b6ce9c48d93f75a6c345 Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Sep 21 22:13:09 2010 +0200 jtagdp: remove #if 0'd kludges and explain why the code is correct short story: if the JTAG clock is too high, then the behavior will be flaky and kludging the code may seem to make things beter, but really it's just a red herring. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index 8731a1a..48b4a7b 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -191,22 +191,30 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap *dap) /* too expensive to call keep_alive() here */ -#if 0 - /* Danger!!!! BROKEN!!!! */ - adi_jtag_scan_inout_check_u32(dap, JTAG_DP_DPACC, - DP_CTRL_STAT, DPAP_READ, 0, &ctrlstat); - /* Danger!!!! BROKEN!!!! Why will jtag_execute_queue() fail here???? - R956 introduced the check on return value here and now Michael Schwingen reports - that this code no longer works.... - - https://lists.berlios.de/pipermail/openocd-development/2008-September/003107.html - */ - if ((retval = jtag_execute_queue()) != ERROR_OK) - { - LOG_ERROR("BUG: Why does this fail the first time????"); - } - /* Why??? second time it works??? */ -#endif + /* Here be dragons! + * + * It is easy to be in a JTAG clock range where the target + * is not operating in a stable fashion. This happens + * for a few reasons: + * + * - the user may construct a simple test case to try to see + * if a higher JTAG clock works to eke out more performance. + * This simple case may pass, but more complex situations can + * fail. + * + * - The mostly works JTAG clock rate and the complete failure + * JTAG clock rate may be as much as 2-4x apart. This seems + * to be especially true on RC oscillator driven parts. + * + * So: even if calling adi_jtag_scan_inout_check_u32() multiple + * times here seems to "make things better here", it is just + * hiding problems with too high a JTAG clock. + * + * Note that even if some parts have RCLK/RTCK, that doesn't + * mean that RCLK/RTCK is the *correct* rate to run the JTAG + * interface at, i.e. RCLK/RTCK rates can be "too high", especially + * before the RC oscillator phase is not yet complete. + */ /* Post CTRL/STAT read; discard any previous posted read value * but collect its ACK status. ----------------------------------------------------------------------- Summary of changes: src/target/adi_v5_jtag.c | 40 ++++++++++++++++++++++++---------------- 1 files changed, 24 insertions(+), 16 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-21 22:22:02
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 22911a3aedfa01c7a5643de9c21fbb94f6219c38 (commit) via 9aafd42853b4164ea72e6e2f89008ff84b1fac52 (commit) from edefee988045558d5d306453ce352dc06bcb7a03 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 22911a3aedfa01c7a5643de9c21fbb94f6219c38 Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Sep 20 09:22:46 2010 +0200 flash: fix error handling sensible error must be reported at failure site Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c index 7b84888..57bbe00 100644 --- a/src/flash/nand/tcl.c +++ b/src/flash/nand/tcl.c @@ -150,16 +150,8 @@ COMMAND_HANDLER(handle_nand_probe_command) command_print(CMD_CTX, "NAND flash device '%s (%s)' found", p->device->name, p->manufacturer->name); } - else if (retval == ERROR_NAND_OPERATION_FAILED) - { - command_print(CMD_CTX, "probing failed for NAND flash device"); - } - else - { - command_print(CMD_CTX, "unknown error when probing NAND flash device"); - } - return ERROR_OK; + return retval; } COMMAND_HANDLER(handle_nand_erase_command) @@ -206,16 +198,8 @@ COMMAND_HANDLER(handle_nand_erase_command) offset, offset + length, CMD_ARGV[0], p->device->name); } - else if (retval == ERROR_NAND_OPERATION_FAILED) - { - command_print(CMD_CTX, "erase failed"); - } - else - { - command_print(CMD_CTX, "unknown error when erasing NAND flash device"); - } - return ERROR_OK; + return retval; } COMMAND_HANDLER(handle_nand_check_bad_blocks_command) @@ -261,18 +245,8 @@ COMMAND_HANDLER(handle_nand_check_bad_blocks_command) command_print(CMD_CTX, "checked NAND flash device for bad blocks, " "use \"nand info\" command to list blocks"); } - else if (retval == ERROR_NAND_OPERATION_FAILED) - { - command_print(CMD_CTX, "error when checking for bad blocks on " - "NAND flash device"); - } - else - { - command_print(CMD_CTX, "unknown error when checking for bad " - "blocks on NAND flash device"); - } - return ERROR_OK; + return retval; } COMMAND_HANDLER(handle_nand_write_command) diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c index 3dc6cff..8604b4b 100644 --- a/src/flash/nor/tcl.c +++ b/src/flash/nor/tcl.c @@ -132,23 +132,14 @@ COMMAND_HANDLER(handle_flash_probe_command) { command_print(CMD_CTX, "flash '%s' found at 0x%8.8" PRIx32, p->driver->name, p->base); } - else if (retval == ERROR_FLASH_BANK_INVALID) - { - command_print(CMD_CTX, "probing failed for flash bank '#%s' at 0x%8.8" PRIx32, - CMD_ARGV[0], p->base); - } - else - { - command_print(CMD_CTX, "unknown error when probing flash bank '#%s' at 0x%8.8" PRIx32, - CMD_ARGV[0], p->base); - } } else { command_print(CMD_CTX, "flash bank '#%s' is out of bounds", CMD_ARGV[0]); + retval = ERROR_FAIL; } - return ERROR_OK; + return retval; } COMMAND_HANDLER(handle_flash_erase_check_command) commit 9aafd42853b4164ea72e6e2f89008ff84b1fac52 Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Sep 20 09:40:09 2010 +0200 embeddedice: fix error handling error is now reported at failure site. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/flash/nor/ocl.c b/src/flash/nor/ocl.c index 9a295eb..6c60923 100644 --- a/src/flash/nor/ocl.c +++ b/src/flash/nor/ocl.c @@ -101,8 +101,6 @@ static int ocl_erase(struct flash_bank *bank, int first, int last) /* wait for response, fixed timeout of 1 s */ if ((retval = embeddedice_handshake(ocl->jtag_info, EICE_COMM_CTRL_WBIT, 1000) != ERROR_OK)) { - if (retval == ERROR_TARGET_TIMEOUT) - LOG_ERROR("loader not responding"); return retval; } @@ -206,8 +204,6 @@ static int ocl_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, /* wait for response, fixed timeout of 1 s */ if ((retval = embeddedice_handshake(ocl->jtag_info, EICE_COMM_CTRL_WBIT, 1000) != ERROR_OK)) { - if (retval == ERROR_TARGET_TIMEOUT) - LOG_ERROR("loader not responding"); free(dcc_buffer); return retval; } @@ -252,8 +248,6 @@ static int ocl_probe(struct flash_bank *bank) /* wait for response, fixed timeout of 1 s */ if ((retval = embeddedice_handshake(ocl->jtag_info, EICE_COMM_CTRL_WBIT, 1000) != ERROR_OK)) { - if (retval == ERROR_TARGET_TIMEOUT) - LOG_ERROR("loader not responding"); return retval; } diff --git a/src/target/embeddedice.c b/src/target/embeddedice.c index abc49d7..5502ad8 100644 --- a/src/target/embeddedice.c +++ b/src/target/embeddedice.c @@ -588,7 +588,10 @@ int embeddedice_handshake(struct arm_jtag *jtag_info, int hsbit, uint32_t timeou else if (hsbit == EICE_COMM_CTRL_RBIT) hsact = 0; else + { + LOG_ERROR("Invalid arguments"); return ERROR_INVALID_ARGUMENTS; + } retval = arm_jtag_scann(jtag_info, 0x2, TAP_IDLE); if (retval != ERROR_OK) @@ -625,6 +628,7 @@ int embeddedice_handshake(struct arm_jtag *jtag_info, int hsbit, uint32_t timeou } while ((uint32_t)((now.tv_sec - lap.tv_sec) * 1000 + (now.tv_usec - lap.tv_usec) / 1000) <= timeout); + LOG_ERROR("embeddedice handshake timeout"); return ERROR_TARGET_TIMEOUT; } ----------------------------------------------------------------------- Summary of changes: src/flash/nand/tcl.c | 32 +++----------------------------- src/flash/nor/ocl.c | 6 ------ src/flash/nor/tcl.c | 13 ++----------- src/target/embeddedice.c | 4 ++++ 4 files changed, 9 insertions(+), 46 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-21 12:28:04
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via edefee988045558d5d306453ce352dc06bcb7a03 (commit) from ea48794210037699bdde44014238c10c9968a72d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit edefee988045558d5d306453ce352dc06bcb7a03 Author: Antonio Borneo <bor...@gm...> Date: Tue Sep 21 16:06:37 2010 +0800 TCL scripts: collect duplicated procedures TCL procedures mrw and mmw, originally in DaVinci target code, are duplicated in other TCL scripts. Moved in a common helper file, and added help/usage description. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/mem_helper.tcl b/tcl/mem_helper.tcl new file mode 100644 index 0000000..d811490 --- /dev/null +++ b/tcl/mem_helper.tcl @@ -0,0 +1,22 @@ +# Helper for common memory read/modify/write procedures + +# mrw: "memory read word", returns value of $reg +proc mrw {reg} { + set value "" + ocd_mem2array value 32 $reg 1 + return $value(0) +} + +add_usage_text mrw "address" +add_help_text mrw "Returns value of word in memory." + +# mmw: "memory modify word", updates value of $reg +# $reg <== ((value & ~$clearbits) | $setbits) +proc mmw {reg setbits clearbits} { + set old [mrw $reg] + set new [expr ($old & ~$clearbits) | $setbits] + mww $reg $new +} + +add_usage_text mmw "address setbits clearbits" +add_help_text mmw "Modify word in memory. new_val = (old_val & ~clearbits) | setbits;" diff --git a/tcl/target/c100helper.tcl b/tcl/target/c100helper.tcl index 45adc62..3251066 100644 --- a/tcl/target/c100helper.tcl +++ b/tcl/target/c100helper.tcl @@ -25,13 +25,7 @@ proc helpC100 {} { puts "22) flashUBOOT: will prgram NOR sectors 0-3 with u-boot.bin" } -# mrw,mmw from davinci.cfg -# mrw: "memory read word", returns value of $reg -proc mrw {reg} { - set value "" - mem2array value 32 $reg 1 - return $value(0) -} +source [find mem_helper.tcl] # read a 64-bit register (memory mapped) proc mr64bit {reg} { @@ -50,14 +44,6 @@ proc mw64bit {reg value} { mww [expr $reg+4] $high } -# mmw: "memory modify word", updates value of $reg -# $reg <== ((value & ~$clearbits) | $setbits) -proc mmw {reg setbits clearbits} { - set old [mrw $reg] - set new [expr ($old & ~$clearbits) | $setbits] - mww $reg $new -} - proc showNOR {} { puts "This is the current NOR setup" diff --git a/tcl/target/davinci.cfg b/tcl/target/davinci.cfg index 6e9091e..9e9369d 100644 --- a/tcl/target/davinci.cfg +++ b/tcl/target/davinci.cfg @@ -7,20 +7,7 @@ proc davinci_pinmux {soc reg value} { mww [expr [dict get $soc sysbase] + 4 * $reg] $value } -# mrw: "memory read word", returns value of $reg -proc mrw {reg} { - set value "" - mem2array value 32 $reg 1 - return $value(0) -} - -# mmw: "memory modify word", updates value of $reg -# $reg <== ((value & ~$clearbits) | $setbits) -proc mmw {reg setbits clearbits} { - set old [mrw $reg] - set new [expr ($old & ~$clearbits) | $setbits] - mww $reg $new -} +source [find mem_helper.tcl] # # pll_setup: initialize PLL diff --git a/tcl/target/stellaris.cfg b/tcl/target/stellaris.cfg index 6ba5f14..b663ce3 100644 --- a/tcl/target/stellaris.cfg +++ b/tcl/target/stellaris.cfg @@ -46,12 +46,7 @@ $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE # this, if you're using a slower clock. adapter_khz 500 -# mrw: "memory read word", returns value of $reg -proc mrw {reg} { - set value "" - mem2array value 32 $reg 1 - return $value(0) -} +source [find mem_helper.tcl] $_TARGETNAME configure -event reset-start { adapter_khz 500 ----------------------------------------------------------------------- Summary of changes: tcl/mem_helper.tcl | 22 ++++++++++++++++++++++ tcl/target/c100helper.tcl | 16 +--------------- tcl/target/davinci.cfg | 15 +-------------- tcl/target/stellaris.cfg | 7 +------ 4 files changed, 25 insertions(+), 35 deletions(-) create mode 100644 tcl/mem_helper.tcl hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-21 07:47:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via ea48794210037699bdde44014238c10c9968a72d (commit) from 1abc26d7a2b7172184c64d2151bf4803699993da (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ea48794210037699bdde44014238c10c9968a72d Author: Ãyvind Harboe <oyv...@zy...> Date: Fri Sep 10 11:42:12 2010 +0200 startup: removed capture_catch not used. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl index d1c73ef..4c71a9a 100644 --- a/src/helper/startup.tcl +++ b/src/helper/startup.tcl @@ -61,10 +61,3 @@ add_usage_text script "<file>" ######### -# catch any exceptions, capture output and return output -proc capture_catch {a} { - catch { - capture {uplevel $a} - } result - return $result -} ----------------------------------------------------------------------- Summary of changes: src/helper/startup.tcl | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-21 07:47:07
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 1abc26d7a2b7172184c64d2151bf4803699993da (commit) from 6000411dddd9930b99a4931bc363f425cc0fdcda (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1abc26d7a2b7172184c64d2151bf4803699993da Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Sep 20 11:50:32 2010 +0200 helper: fix flaky capture command capture of progress output would get polling results. This will break in the example below where polling output would override the tcl return value. capture {sleep 10000; set abc def} Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/helper/command.c b/src/helper/command.c index 086b03d..1bd8c42 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -36,6 +36,7 @@ #endif // @todo the inclusion of target.h here is a layering violation +#include <jtag/jtag.h> #include <target/target.h> #include "command.h" #include "configuration.h" @@ -867,6 +868,9 @@ static char* openocd_jim_fgets(char *s, int size, void *cookie) return NULL; } +/* Capture progress output and return as tcl return value. If the + * progress output was empty, return tcl return value. + */ static int jim_capture(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { if (argc != 2) @@ -874,9 +878,21 @@ static int jim_capture(Jim_Interp *interp, int argc, Jim_Obj *const *argv) struct log_capture_state *state = command_log_capture_start(interp); + /* disable polling during capture. This avoids capturing output + * from polling. + * + * This is necessary in order to avoid accidentially getting a non-empty + * string for tcl fn's. + */ + bool save_poll = jtag_poll_get_enabled(); + + jtag_poll_set_enabled(false); + const char *str = Jim_GetString(argv[1], NULL); int retcode = Jim_Eval_Named(interp, str, __THIS__FILE__, __LINE__); + jtag_poll_set_enabled(save_poll); + command_log_capture_finish(state); return retcode; ----------------------------------------------------------------------- Summary of changes: src/helper/command.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-21 07:46:27
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 6000411dddd9930b99a4931bc363f425cc0fdcda (commit) from 241fd0b5a8a95e814395f79b5ea7715c1862f045 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6000411dddd9930b99a4931bc363f425cc0fdcda Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Sep 8 20:04:27 2010 +0200 tcl_server: switch to ctrl-z by using ctrl-z instead of line end, multi-line tcl scripts can be handled. Testing: send ctrl-z a couple of times to make telnet enter the mode where it sends ctrl-z unencoded. Programs that talk to the tcl_server can send ctrl-z to indicate end of tcl-let to be executed without having to worry about telnet protocols. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/server/tcl_server.c b/src/server/tcl_server.c index 7c8e130..06f67ab 100644 --- a/src/server/tcl_server.c +++ b/src/server/tcl_server.c @@ -1,5 +1,6 @@ /*************************************************************************** - * Copyright (C) 2008 * + * Copyright (C) 2010 Ãyvind Harboe * + * oyv...@zy... * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -104,13 +105,6 @@ static int tcl_input(struct connection *connection) /* push as much data into the line as possible */ for (i = 0; i < rlen; i++) { - if (!isprint(in[i]) && !isspace(in[i])) - { - /* drop this line */ - tclc->tc_linedrop = 1; - continue; - } - /* buffer the data */ tclc->tc_line[tclc->tc_lineoffset] = in[i]; if (tclc->tc_lineoffset < TCL_MAX_LINE) @@ -118,7 +112,11 @@ static int tcl_input(struct connection *connection) else tclc->tc_linedrop = 1; - if (in[i] != '\n') + /* ctrl-z is end of command. When testing from telnet, just + * press ctrl-z a couple of times first to put telnet into the + * mode where it will send 0x1a in response to pressing ctrl-z + */ + if (in[i] != '\x1a') continue; /* process the line */ @@ -131,13 +129,15 @@ static int tcl_input(struct connection *connection) } else { tclc->tc_line[tclc->tc_lineoffset-1] = '\0'; + LOG_DEBUG("Executing script:\n %s", tclc->tc_line); retval = Jim_Eval_Named(interp, tclc->tc_line, "remote:connection",1); + LOG_DEBUG("Result: %d\n %s", retval, Jim_GetString(Jim_GetResult(interp), &reslen)); result = Jim_GetString(Jim_GetResult(interp), &reslen); retval = tcl_output(connection, result, reslen); if (retval != ERROR_OK) return retval; - if (memchr(result, '\n', reslen) == NULL) - tcl_output(connection, "\n", 1); + /* Always output ctrl-d as end of line to allow multiline results */ + tcl_output(connection, "\x1a", 1); } tclc->tc_lineoffset = 0; ----------------------------------------------------------------------- Summary of changes: src/server/tcl_server.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-21 07:46:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 241fd0b5a8a95e814395f79b5ea7715c1862f045 (commit) from 61780558e1654af0f3f20a332763b30bf533a912 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 241fd0b5a8a95e814395f79b5ea7715c1862f045 Author: Ãyvind Harboe <oyv...@zy...> Date: Sat Sep 18 01:37:42 2010 +0200 logging: turn of stdout/stderr buffering with this buffering disabled fancier logging scripts will be able to process each line as it is output. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/main.c b/src/main.c index a71977d..9c7191d 100644 --- a/src/main.c +++ b/src/main.c @@ -35,5 +35,9 @@ int main(int argc, char *argv[]) { + /* disable buffering otherwise piping to logs causes problems work */ + setvbuf(stdout, NULL, _IONBF, 0); + setvbuf(stderr, NULL, _IONBF, 0); + return openocd_main(argc, argv); } ----------------------------------------------------------------------- Summary of changes: src/main.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-21 07:45:22
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 61780558e1654af0f3f20a332763b30bf533a912 (commit) from 549d97481407b99a820033379d5a3d44931a5336 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 61780558e1654af0f3f20a332763b30bf533a912 Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Sep 7 20:27:45 2010 +0200 zy1000: add support for Linux host used /dev/mem and mmem() to memory map JTAG registers into user space and used new configure options to exclude eCos specific code. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/jtag/zy1000/jtag_minidriver.h b/src/jtag/zy1000/jtag_minidriver.h index 4e99d3c..543fd9b 100644 --- a/src/jtag/zy1000/jtag_minidriver.h +++ b/src/jtag/zy1000/jtag_minidriver.h @@ -21,12 +21,19 @@ #define TEST_MANUAL() 0 #define VERBOSE(a) -#if BUILD_ECOSBOARD +#if BUILD_ZY1000_MASTER +#if BUILD_ECOSBOARD #include <cyg/hal/hal_io.h> // low level i/o #include <cyg/hal/hal_intr.h> // low level i/o #define ZY1000_PEEK(a, b) HAL_READ_UINT32(a, b) #define ZY1000_POKE(a, b) HAL_WRITE_UINT32(a, b) +#else +#define ZY1000_PEEK(a, b) do {b = *( ( volatile uint32_t *)(a) );} while (0) +#define ZY1000_POKE(a, b) do {*( ( volatile uint32_t *)(a) ) = b;} while (0) +extern volatile void *zy1000_jtag_master; +#define ZY1000_JTAG_BASE ((unsigned long)zy1000_jtag_master) +#endif #else @@ -41,7 +48,7 @@ extern uint32_t zy1000_tcpin(uint32_t address); -#if BUILD_ECOSBOARD +#if BUILD_ZY1000_MASTER // FIFO empty? static __inline__ void waitIdle(void) { @@ -228,7 +235,7 @@ static __inline__ void interface_jtag_add_dr_out(struct jtag_tap *target_tap, } } -#if BUILD_ECOSBOARD +#if BUILD_ZY1000_MASTER #define interface_jtag_add_callback(callback, in) callback(in) #define interface_jtag_add_callback4(callback, in, data1, data2, data3) jtag_set_error(callback(in, data1, data2, data3)) #else diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index 3ecd0f9..c939d7f 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -321,7 +321,7 @@ COMMAND_HANDLER(handle_power_command) return ERROR_OK; } -#if !BUILD_ECOSBOARD +#if !BUILD_ZY1000_MASTER static char *tcp_server = "notspecified"; static int jim_zy1000_server(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { @@ -1002,6 +1002,7 @@ static const struct command_registration zy1000_commands[] = { "With no arguments, prints status.", .usage = "('on'|'off)", }, +#if BUILD_ZY1000_MASTER #if BUILD_ECOSBOARD { .name = "zy1000_version", @@ -1010,6 +1011,7 @@ static const struct command_registration zy1000_commands[] = { .help = "Print version info for zy1000.", .usage = "['openocd'|'zy1000'|'date'|'time'|'pcb'|'fpga']", }, +#endif #else { .name = "zy1000_server", @@ -1038,6 +1040,7 @@ static const struct command_registration zy1000_commands[] = { }; +#if !BUILD_ZY1000_MASTER || BUILD_ECOSBOARD static int tcp_ip = -1; /* Write large packets if we can */ @@ -1106,6 +1109,7 @@ static bool readLong(uint32_t *out_data) *out_data = data; return true; } +#endif enum ZY1000_CMD { @@ -1116,7 +1120,7 @@ enum ZY1000_CMD }; -#if !BUILD_ECOSBOARD +#if !BUILD_ZY1000_MASTER #include <sys/socket.h> /* for socket(), connect(), send(), and recv() */ #include <arpa/inet.h> /* for sockaddr_in and inet_addr() */ @@ -1566,21 +1570,49 @@ static void watchdog_server(cyg_addrword_t data) } #endif +#endif + +#if BUILD_ZY1000_MASTER int interface_jtag_add_sleep(uint32_t us) { jtag_sleep(us); return ERROR_OK; } - #endif +#if BUILD_ZY1000_MASTER && !BUILD_ECOSBOARD +volatile void *zy1000_jtag_master; +#include <sys/mman.h> +#endif int zy1000_init(void) { #if BUILD_ECOSBOARD LOG_USER("%s", ZYLIN_OPENOCD_VERSION); +#else + int fd; + if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) + { + LOG_ERROR("No access to /dev/mem"); + return ERROR_FAIL; + } +#ifndef REGISTERS_BASE +#define REGISTERS_BASE 0x9002000 +#define REGISTERS_SPAN 128 +#endif + + zy1000_jtag_master = mmap(0, REGISTERS_SPAN, PROT_READ | PROT_WRITE, MAP_SHARED, fd, REGISTERS_BASE); + + if(zy1000_jtag_master == (void *) -1) + { + close(fd); + LOG_ERROR("No access to /dev/mem"); + return ERROR_FAIL; + } #endif + + ZY1000_POKE(ZY1000_JTAG_BASE + 0x10, 0x30); // Turn on LED1 & LED2 setPower(true); // on by default ----------------------------------------------------------------------- Summary of changes: src/jtag/zy1000/jtag_minidriver.h | 13 +++++++++-- src/jtag/zy1000/zy1000.c | 38 ++++++++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-20 13:53:00
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 549d97481407b99a820033379d5a3d44931a5336 (commit) from f6a3fc818bc6a24b6c5bbcc6057f72d2b0b2e2ab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 549d97481407b99a820033379d5a3d44931a5336 Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Sep 20 13:44:03 2010 +0200 jtag: build jtag first because it generates header files Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/Makefile.am b/src/Makefile.am index 56385f7..a2f8d77 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = \ - helper \ jtag \ + helper \ target \ flash \ svf \ ----------------------------------------------------------------------- Summary of changes: src/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-20 13:19:00
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via f6a3fc818bc6a24b6c5bbcc6057f72d2b0b2e2ab (commit) from 32ab98c9e9672d0f1d8758c7dfb478b0316c13af (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f6a3fc818bc6a24b6c5bbcc6057f72d2b0b2e2ab Author: Ãyvind Harboe <oyv...@zy...> Date: Fri Sep 3 22:49:37 2010 +0200 warnings: fix alignment warnings These warnings are for architectures that do not support non-aligned word access. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/flash/mflash.c b/src/flash/mflash.c index 4372128..26b85b1 100644 --- a/src/flash/mflash.c +++ b/src/flash/mflash.c @@ -1121,7 +1121,7 @@ static int mg_storage_config(void) != ERROR_OK) return ret; - mg_gen_ataid((mg_io_type_drv_info *)buff); + mg_gen_ataid((mg_io_type_drv_info *)(void *)buff); if ((ret = mg_mflash_do_write_sects(buff, 0, 1, mg_vcmd_update_stgdrvinfo)) != ERROR_OK) @@ -1149,7 +1149,7 @@ static int mg_boot_config(void) buff[0] = mg_op_mode_snd; /* operation mode */ buff[1] = MG_UNLOCK_OTP_AREA; buff[2] = 4; /* boot size */ - *((uint32_t *)(buff + 4)) = 0; /* XIP size */ + *((uint32_t *)(void *)(buff + 4)) = 0; /* XIP size */ if ((ret = mg_mflash_do_write_sects(buff, 0, 1, mg_vcmd_update_xipinfo)) != ERROR_OK) diff --git a/src/flash/nand/lpc3180.c b/src/flash/nand/lpc3180.c index 93d00d5..d81443d 100644 --- a/src/flash/nand/lpc3180.c +++ b/src/flash/nand/lpc3180.c @@ -1119,9 +1119,9 @@ static int lpc3180_read_page(struct nand_device *nand, uint32_t page, uint8_t *d target_read_memory(target, target_mem_base+SPARE_OFFS, 4, 16, ecc_flash_buffer); target_read_memory(target, target_mem_base+ECC_OFFS, 4, 8, ecc_hw_buffer); for(i=0;i<idx;i++){ - if( (0x00ffffff&*(uint32_t *)(ecc_hw_buffer+i*8)) != (0x00ffffff&*(uint32_t *)(ecc_flash_buffer+8+i*16)) ) + if( (0x00ffffff&*(uint32_t *)(void *)(ecc_hw_buffer+i*8)) != (0x00ffffff&*(uint32_t *)(void *)(ecc_flash_buffer+8+i*16)) ) LOG_WARNING("ECC mismatch at 256 bytes size block= %d at page= 0x%" PRIx32,i*2+1,page); - if( (0x00ffffff&*(uint32_t *)(ecc_hw_buffer+4+i*8)) != (0x00ffffff&*(uint32_t *)(ecc_flash_buffer+12+i*16)) ) + if( (0x00ffffff&*(uint32_t *)(void *)(ecc_hw_buffer+4+i*8)) != (0x00ffffff&*(uint32_t *)(void *)(ecc_flash_buffer+12+i*16)) ) LOG_WARNING("ECC mismatch at 256 bytes size block= %d at page= 0x%" PRIx32,i*2+2,page); } } diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index 221832c..8005fe0 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -1702,7 +1702,7 @@ sam3_get_reg_ptr(struct sam3_cfg *pCfg, const struct sam3_reg_list *pList) // By using prototypes - we can detect what would // be casting errors. - return ((uint32_t *)(((char *)(pCfg)) + pList->struct_offset)); + return ((uint32_t *)(void *)(((char *)(pCfg)) + pList->struct_offset)); } @@ -1756,7 +1756,7 @@ sam3_GetReg(struct sam3_chip *pChip, uint32_t *goes_here) // calculate where this one go.. // it is "possibly" this register. - pPossible = ((uint32_t *)(((char *)(&(pChip->cfg))) + pReg->struct_offset)); + pPossible = ((uint32_t *)(void *)(((char *)(&(pChip->cfg))) + pReg->struct_offset)); // well? Is it this register if (pPossible == goes_here) { diff --git a/src/helper/types.h b/src/helper/types.h index 1010dcd..04b0059 100644 --- a/src/helper/types.h +++ b/src/helper/types.h @@ -80,7 +80,7 @@ typedef bool _Bool; */ #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) + (type *)( (void *) ( (char *)__mptr - offsetof(type,member) ) );}) /** diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c index 1963736..f4657bc 100644 --- a/src/pld/virtex2.c +++ b/src/pld/virtex2.c @@ -78,7 +78,7 @@ static int virtex2_send_32(struct pld_device *pld_device, static __inline__ void virtexflip32(jtag_callback_data_t arg) { uint8_t *in = (uint8_t *)arg; - *((uint32_t *)in) = flip_u32(le_to_h_u32(in), 32); + *((uint32_t *)arg) = flip_u32(le_to_h_u32(in), 32); } static int virtex2_receive_32(struct pld_device *pld_device, diff --git a/src/target/arm11.c b/src/target/arm11.c index 85d45b0..9955143 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -901,7 +901,7 @@ static int arm11_read_memory_inner(struct target *target, { uint32_t instr = !arm11_config_memrw_no_increment ? 0xecb05e01 : 0xed905e00; /** \todo TODO: buffer cast to uint32_t* causes alignment warnings */ - uint32_t *words = (uint32_t *)buffer; + uint32_t *words = (uint32_t *)(void *)buffer; /* LDC p14,c5,[R0],#4 */ /* LDC p14,c5,[R0] */ @@ -1023,7 +1023,7 @@ static int arm11_write_memory_inner(struct target *target, uint32_t instr = !no_increment ? 0xeca05e01 : 0xed805e00; /** \todo TODO: buffer cast to uint32_t* causes alignment warnings */ - uint32_t *words = (uint32_t*)buffer; + uint32_t *words = (uint32_t*)(void *)buffer; /* "burst" here just means trusting each instruction executes * fully before we run the next one: per-word roundtrips, to diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index b26175b..3414796 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -316,7 +316,7 @@ int mem_ap_write_buf_u32(struct adiv5_dap *dap, uint8_t *buffer, int count, uint for (writecount = 0; writecount < blocksize; writecount++) { retval = dap_queue_ap_write(dap, AP_REG_DRW, - *(uint32_t *) (buffer + 4 * writecount)); + *(uint32_t *) ((void *) (buffer + 4 * writecount))); if (retval != ERROR_OK) break; } diff --git a/src/target/arm_jtag.h b/src/target/arm_jtag.h index f581278..e90abfe 100644 --- a/src/target/arm_jtag.h +++ b/src/target/arm_jtag.h @@ -77,13 +77,13 @@ int arm_jtag_setup_connection(struct arm_jtag *jtag_info); static __inline__ void arm7flip32(jtag_callback_data_t arg) { uint8_t *in = (uint8_t *)arg; - *((uint32_t *)in) = flip_u32(le_to_h_u32(in), 32); + *((uint32_t *)arg) = flip_u32(le_to_h_u32(in), 32); } static __inline__ void arm_le_to_h_u32(jtag_callback_data_t arg) { uint8_t *in = (uint8_t *)arg; - *((uint32_t *)in) = le_to_h_u32(in); + *((uint32_t *)arg) = le_to_h_u32(in); } diff --git a/src/target/avr32_ap7k.c b/src/target/avr32_ap7k.c index a5cdbe4..ed10847 100644 --- a/src/target/avr32_ap7k.c +++ b/src/target/avr32_ap7k.c @@ -499,10 +499,10 @@ static int avr32_ap7k_read_memory(struct target *target, uint32_t address, switch (size) { case 4: - return avr32_jtag_read_memory32(&ap7k->jtag, address, count, (uint32_t*)buffer); + return avr32_jtag_read_memory32(&ap7k->jtag, address, count, (uint32_t*)(void *)buffer); break; case 2: - return avr32_jtag_read_memory16(&ap7k->jtag, address, count, (uint16_t*)buffer); + return avr32_jtag_read_memory16(&ap7k->jtag, address, count, (uint16_t*)(void *)buffer); break; case 1: return avr32_jtag_read_memory8(&ap7k->jtag, address, count, buffer); @@ -537,10 +537,10 @@ static int avr32_ap7k_write_memory(struct target *target, uint32_t address, switch (size) { case 4: - return avr32_jtag_write_memory32(&ap7k->jtag, address, count, (uint32_t*)buffer); + return avr32_jtag_write_memory32(&ap7k->jtag, address, count, (uint32_t*)(void *)buffer); break; case 2: - return avr32_jtag_write_memory16(&ap7k->jtag, address, count, (uint16_t*)buffer); + return avr32_jtag_write_memory16(&ap7k->jtag, address, count, (uint16_t*)(void *)buffer); break; case 1: return avr32_jtag_write_memory8(&ap7k->jtag, address, count, buffer); diff --git a/src/target/avr32_mem.c b/src/target/avr32_mem.c index 0767c55..fe6b8f0 100644 --- a/src/target/avr32_mem.c +++ b/src/target/avr32_mem.c @@ -112,7 +112,7 @@ int avr32_jtag_read_memory8(struct avr32_jtag *jtag_info, if (addr & 3) { retval = avr32_jtag_mwa_read(jtag_info, SLAVE_HSB_UNCACHED, - addr + i, (uint32_t*)data); + addr + i, (uint32_t*)(void *)data); if (retval != ERROR_OK) return retval; @@ -126,7 +126,7 @@ int avr32_jtag_read_memory8(struct avr32_jtag *jtag_info, for (; i < (count & ~3); i+=4) { retval = avr32_jtag_mwa_read(jtag_info, SLAVE_HSB_UNCACHED, - addr + i, (uint32_t*)data); + addr + i, (uint32_t*)(void *)data); if (retval != ERROR_OK) return retval; @@ -139,7 +139,7 @@ int avr32_jtag_read_memory8(struct avr32_jtag *jtag_info, if (i < count) { retval = avr32_jtag_mwa_read(jtag_info, SLAVE_HSB_UNCACHED, - addr + i, (uint32_t*)data); + addr + i, (uint32_t*)(void *)data); if (retval != ERROR_OK) return retval; diff --git a/src/target/etb.c b/src/target/etb.c index ba47c39..489b9ed 100644 --- a/src/target/etb.c +++ b/src/target/etb.c @@ -166,7 +166,7 @@ static void etb_getbuf(jtag_callback_data_t arg) { uint8_t *in = (uint8_t *)arg; - *((uint32_t *)in) = buf_get_u32(in, 0, 32); + *((uint32_t *)arg) = buf_get_u32(in, 0, 32); } diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c index 62c484a..c0adc06 100644 --- a/src/target/mips_m4k.c +++ b/src/target/mips_m4k.c @@ -1000,7 +1000,7 @@ static int mips_m4k_bulk_write_memory(struct target *target, uint32_t address, } retval = mips32_pracc_fastdata_xfer(ejtag_info, source, write_t, address, - count, (uint32_t*) buffer); + count, (uint32_t*) (void *)buffer); if (retval != ERROR_OK) { /* FASTDATA access failed, try normal memory write */ diff --git a/src/target/xscale.c b/src/target/xscale.c index 37a2438..e0ce400 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -244,7 +244,7 @@ static int xscale_read_dcsr(struct target *target) static void xscale_getbuf(jtag_callback_data_t arg) { uint8_t *in = (uint8_t *)arg; - *((uint32_t *)in) = buf_get_u32(in, 0, 32); + *((uint32_t *)arg) = buf_get_u32(in, 0, 32); } static int xscale_receive(struct target *target, uint32_t *buffer, int num_words) ----------------------------------------------------------------------- Summary of changes: src/flash/mflash.c | 4 ++-- src/flash/nand/lpc3180.c | 4 ++-- src/flash/nor/at91sam3.c | 4 ++-- src/helper/types.h | 2 +- src/pld/virtex2.c | 2 +- src/target/arm11.c | 4 ++-- src/target/arm_adi_v5.c | 2 +- src/target/arm_jtag.h | 4 ++-- src/target/avr32_ap7k.c | 8 ++++---- src/target/avr32_mem.c | 6 +++--- src/target/etb.c | 2 +- src/target/mips_m4k.c | 2 +- src/target/xscale.c | 2 +- 13 files changed, 23 insertions(+), 23 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-20 13:14:20
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 32ab98c9e9672d0f1d8758c7dfb478b0316c13af (commit) from 1dbb7ba47259f99905b590d6118771113edfc142 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 32ab98c9e9672d0f1d8758c7dfb478b0316c13af Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Sep 7 20:19:05 2010 +0200 zy1000: split out configure option for eCos and JTAG master Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/configure.in b/configure.in index 7f31e1d..a15b80a 100644 --- a/configure.in +++ b/configure.in @@ -408,6 +408,10 @@ AC_ARG_ENABLE(ecosboard, AS_HELP_STRING([--enable-ecosboard], [Enable building support for eCos based JTAG debugger]), [build_ecosboard=$enableval], [build_ecosboard=no]) +AC_ARG_ENABLE(zy1000_master, + AS_HELP_STRING([--enable-zy1000-master], [Use ZY1000 JTAG master registers]), + [build_zy1000_master=$enableval], [build_zy1000_master=no]) + AC_ARG_ENABLE(zy1000, AS_HELP_STRING([--enable-zy1000], [Enable ZY1000 interface]), [build_zy1000=$enableval], [build_zy1000=no]) @@ -626,6 +630,12 @@ else AC_DEFINE(BUILD_ZY1000, 0, [0 if you don't want ZY1000.]) fi +if test $build_zy1000_master = yes; then + AC_DEFINE(BUILD_ZY1000_MASTER, 1, [1 if you want ZY1000 JTAG master registers.]) +else + AC_DEFINE(BUILD_ZY1000_MASTER, 0, [0 if you don't want ZY1000 JTAG master registers.]) +fi + if test $build_at91rm9200 = yes; then build_bitbang=yes AC_DEFINE(BUILD_AT91RM9200, 1, [1 if you want at91rm9200.]) @@ -1027,6 +1037,7 @@ AM_CONDITIONAL(GIVEIO, test x$parport_use_giveio = xyes) AM_CONDITIONAL(EP93XX, test $build_ep93xx = yes) AM_CONDITIONAL(ECOSBOARD, test $build_ecosboard = yes) AM_CONDITIONAL(ZY1000, test $build_zy1000 = yes) +AM_CONDITIONAL(ZY1000_MASTER, test $build_zy1000_master = yes) AM_CONDITIONAL(IOUTIL, test $build_ioutil = yes) AM_CONDITIONAL(HTTPD, test $build_httpd = yes) AM_CONDITIONAL(AT91RM9200, test $build_at91rm9200 = yes) ----------------------------------------------------------------------- Summary of changes: configure.in | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-20 13:13:14
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 1dbb7ba47259f99905b590d6118771113edfc142 (commit) from f613011aa0232d1cc8a9db1e739fa63ccf5ffcfa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1dbb7ba47259f99905b590d6118771113edfc142 Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Sep 7 20:22:38 2010 +0200 zy1000: remove obsolete debug code Obsolete code clutter Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/jtag/zy1000/jtag_minidriver.h b/src/jtag/zy1000/jtag_minidriver.h index 7e13f66..4e99d3c 100644 --- a/src/jtag/zy1000/jtag_minidriver.h +++ b/src/jtag/zy1000/jtag_minidriver.h @@ -25,15 +25,8 @@ #include <cyg/hal/hal_io.h> // low level i/o #include <cyg/hal/hal_intr.h> // low level i/o - -#if 0 -int diag_printf(const char *fmt, ...); -#define ZY1000_POKE(a, b) HAL_WRITE_UINT32(a, b); diag_printf("poke 0x%08x,0x%08x\n", a, b) -#define ZY1000_PEEK(a, b) HAL_READ_UINT32(a, b); diag_printf("peek 0x%08x = 0x%08x\n", a, b) -#else #define ZY1000_PEEK(a, b) HAL_READ_UINT32(a, b) #define ZY1000_POKE(a, b) HAL_WRITE_UINT32(a, b) -#endif #else ----------------------------------------------------------------------- Summary of changes: src/jtag/zy1000/jtag_minidriver.h | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-20 09:25:32
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via f613011aa0232d1cc8a9db1e739fa63ccf5ffcfa (commit) from 103c1f9525436892b610b37d5efc4f2635f5a832 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f613011aa0232d1cc8a9db1e739fa63ccf5ffcfa Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Sep 20 09:23:24 2010 +0200 tcl: remove incomplete unused tcl file Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/tcl/readable.tcl b/tcl/readable.tcl deleted file mode 100644 index bd2dc7f..0000000 --- a/tcl/readable.tcl +++ /dev/null @@ -1,24 +0,0 @@ -proc iswithin { ADDRESS BASE LEN } { - return [expr ((($ADDRESS - $BASE) > 0) && (($ADDRESS - $BASE + $LEN) > 0))] -} - -proc memorytype { ADDRESS } { - for { set chip 0 } { $chip < $N_CHIP } { incr chip } { - if { iswithin $ADDRESS $FLASH($chip,BASE) $FLASH($chip,LEN) } { - return "flash" - } - } - - for { set chip 0 } { $chip < $N_RAM } { incr chip } { - if { iswithin $ADDRESS $RAM($chip,BASE) $RAM($chip,LEN) } { - return "ram" - } - } -} - -# default to 32bit reads. -proc isreadable { ADDRESS } { - return isreadable32 $ADDRESS -} - -proc isreadable32 { ADDRESS } { ----------------------------------------------------------------------- Summary of changes: tcl/readable.tcl | 24 ------------------------ 1 files changed, 0 insertions(+), 24 deletions(-) delete mode 100644 tcl/readable.tcl hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-20 09:23:07
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 103c1f9525436892b610b37d5efc4f2635f5a832 (commit) via ebfb2f4f3715f264ae4474c1b2e78812d1625cdc (commit) via 7e888741d13e66b6b343b8f0839621107c5a2962 (commit) from 60501bb0fb0cb69f66ebb3ce3b64b69f3cadf4ff (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 103c1f9525436892b610b37d5efc4f2635f5a832 Author: Mike Dunn <mik...@ne...> Date: Sun Sep 19 15:30:59 2010 -0700 xscale: some wp detail added to user manual Hi everyone (again), Watchpoints on xscale are quirky, so I thought a little explanation in the user's manual was warranted. Comments gratefully received. Last one, Ãyvind :-) Thanks, Mike Signed-off-by: Mike Dunn <mik...@ne...> diff --git a/doc/openocd.texi b/doc/openocd.texi index bc026b9..230e47c 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -6390,6 +6390,15 @@ the @code{xscale debug_handler} command. The allowed locations for the debug handler are either (0x800 - 0x1fef800) or (0xfe000800 - 0xfffff800). The default value is 0xfe000800. +XScale has resources to support two hardware breakpoints and two +watchpoints. However, the following restrictions on watchpoint +functionality apply: (1) the value and mask arguments to the @code{wp} +command are not supported, (2) the watchpoint length must be a +power of two and not less than four, and can not be greater than the +watchpoint address, and (3) a watchpoint with a length greater than +four consumes all the watchpoint hardware resources. This means that +at any one time, you can have enabled either two watchpoints with a +length of four, or one watchpoint with a length greater than four. These commands are available to XScale based CPUs, which are implementations of the ARMv5TE architecture. commit ebfb2f4f3715f264ae4474c1b2e78812d1625cdc Author: Mike Dunn <mik...@ne...> Date: Sun Sep 19 14:48:51 2010 -0700 xscale: check that wp length does not exceed address Hi everyone, A while back I sent in a patch that adds support for watchpoint lengths greater than four on xscale. It's been working well, until the other day, when it caused an unexpected debug exception. Looking into this I realized there is a case where it breaks: when the length arg is greater than the base address. This is a consequence of the way the hardware works. Don't see a work-around, so I added code to xscale_add_watchpoint() to check for and disallow this combination. Some more detail... xscale watchpoint hardware does not support a length directly. Instead, a mask value can be specified (not to be confused with the optional mask arg to the wp command, which xscale does not support). Any bits set in the mask are ignored when the watchpoint hardware compares the access address to the watchpoint address. So as long as the length is a power of two, setting the mask to length-1 effectively specifies the length. Or so I thought, until I realized that if the length exceeds the base address, *all* bits of the base address are ignored by the comaparator, and the watchpoint range effectively becomes 0 .. length. Questions, comments, criticisms gratefully received. Thanks, Mike Signed-off-by: Mike Dunn <mik...@ne...> diff --git a/src/target/xscale.c b/src/target/xscale.c index 77f0f1b..37a2438 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -2401,6 +2401,13 @@ static int xscale_add_watchpoint(struct target *target, return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } + if (watchpoint->length > watchpoint->address) + { + LOG_ERROR("xscale does not support watchpoints with length " + "greater than address"); + return ERROR_COMMAND_ARGUMENT_INVALID; + } + xscale->dbr_available = 0; return ERROR_OK; } commit 7e888741d13e66b6b343b8f0839621107c5a2962 Author: Mike Dunn <mik...@ne...> Date: Sun Sep 19 14:35:46 2010 -0700 xscale: bp/wp: additional LOG_ERROR on failure Hi everyone, Added more LOG_ERROR messsages to watchpoint and breakpoint code, given that the infrastructure no longer interprets returned error codes. Also changed existing LOG_INFO and LOG_WARNING to LOG_ERROR for cases where an error is returned. Note that the check of the target state is superflous, since the infrastruture code currently checks this before calling target code. Is this being reconsidered as well? Also, should we stop returning anything other than ERROR_OK and ERROR_FAIL? Comments gratefully received. Thanks, Mike Signed-off-by: Mike Dunn <mik...@ne...> diff --git a/src/target/xscale.c b/src/target/xscale.c index 82b0f34..77f0f1b 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -2193,13 +2193,13 @@ static int xscale_add_breakpoint(struct target *target, if ((breakpoint->type == BKPT_HARD) && (xscale->ibcr_available < 1)) { - LOG_INFO("no breakpoint unit available for hardware breakpoint"); + LOG_ERROR("no breakpoint unit available for hardware breakpoint"); return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } if ((breakpoint->length != 2) && (breakpoint->length != 4)) { - LOG_INFO("only breakpoints of two (Thumb) or four (ARM) bytes length supported"); + LOG_ERROR("only breakpoints of two (Thumb) or four (ARM) bytes length supported"); return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } @@ -2277,7 +2277,7 @@ static int xscale_remove_breakpoint(struct target *target, struct breakpoint *br if (target->state != TARGET_HALTED) { - LOG_WARNING("target not halted"); + LOG_ERROR("target not halted"); return ERROR_TARGET_NOT_HALTED; } @@ -2302,7 +2302,7 @@ static int xscale_set_watchpoint(struct target *target, if (target->state != TARGET_HALTED) { - LOG_WARNING("target not halted"); + LOG_ERROR("target not halted"); return ERROR_TARGET_NOT_HALTED; } @@ -2371,7 +2371,8 @@ static int xscale_add_watchpoint(struct target *target, if (xscale->dbr_available < 1) { - return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; + LOG_ERROR("no more watchpoint registers available"); + return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } if (watchpoint->value) @@ -2395,7 +2396,10 @@ static int xscale_add_watchpoint(struct target *target, /* watchpoints across multiple words require both DBR registers */ if (xscale->dbr_available < 2) + { + LOG_ERROR("insufficient watchpoint registers available"); return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; + } xscale->dbr_available = 0; return ERROR_OK; @@ -2450,7 +2454,7 @@ static int xscale_remove_watchpoint(struct target *target, struct watchpoint *wa if (target->state != TARGET_HALTED) { - LOG_WARNING("target not halted"); + LOG_ERROR("target not halted"); return ERROR_TARGET_NOT_HALTED; } ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 9 +++++++++ src/target/xscale.c | 23 +++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-20 09:19:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 60501bb0fb0cb69f66ebb3ce3b64b69f3cadf4ff (commit) from c14852385fde55abc5d5ffb076510cd1814432e0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 60501bb0fb0cb69f66ebb3ce3b64b69f3cadf4ff Author: Karl Kurbjun <kku...@gm...> Date: Sat Sep 18 09:55:29 2010 -0600 AM/DM37x: Unify configuration scripts and add support for TI Beagleboard xM. diff --git a/tcl/board/am3517evm.cfg b/tcl/board/am3517evm.cfg index db76255..2bff512 100644 --- a/tcl/board/am3517evm.cfg +++ b/tcl/board/am3517evm.cfg @@ -10,88 +10,12 @@ # http://processors.wiki.ti.com/index.php/Debug_Access_Port_(DAP) # http://processors.wiki.ti.com/index.php?title=How_to_Find_the_Silicon_Revision_of_your_OMAP35x -# Slooow during startup -adapter_khz 10 +set CHIPTYPE "am35x" +source [find target/amdm37x.cfg] +# The TI-14 JTAG connector does not have srst. CPU reset is handled in +# hardware. +reset_config trst_only -if { [info exists CHIPNAME] } { - set _CHIPNAME $CHIPNAME -} else { - set _CHIPNAME am3517 -} - -set JRC_TAPID 0 - -set DAP_TAPID 0x0b86802f - -# Subsidiary TAP: CoreSight Debug Access Port (DAP) -if { [info exists DAP_TAPID ] } { - set _DAP_TAPID $DAP_TAPID -} else { - set _DAP_TAPID 0x0b6d602f -} - - -# Primary TAP: ICEpick-C (JTAG route controller) and boundary scan -if { [info exists JRC_TAPID ] } { - set _JRC_TAPID $JRC_TAPID -} else { - set _JRC_TAPID 0x0b7ae02f -} - -# ICEpick-C ... used to route Cortex, and more not shown here -source [find target/icepick.cfg] - - -jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0xf \ - -expected-id $_DAP_TAPID -disable -jtag configure $_CHIPNAME.dap -event tap-enable \ - "icepick_c_tapenable $_CHIPNAME.jrc 3" - -jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f \ - -expected-id $_JRC_TAPID - - - -# GDB target: Cortex-A8, using DAP -set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME cortex_a8 -chain-position $_CHIPNAME.dap - -# SRAM: 64K at 0x4020.0000; use the first 16K -$_TARGETNAME configure -work-area-phys 0x40200000 -work-area-size 0x4000 - -################### - -# the reset sequence is event-driven -# and kind of finicky... - -# some TCK tycles are required to activate the DEBUG power domain -jtag configure $_CHIPNAME.jrc -event post-reset "runtest 100" - -# have the DAP "always" be active -jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.dap" - -proc omap3_dbginit {target} { - - # General Cortex A8 debug initialisation - cortex_a8 dbginit - # Enable DBGU signal for OMAP353x - $target mww phys 0x5401d030 0x00002000 -} - -# be absolutely certain the JTAG clock will work with the worst-case -# 16.8MHz/2 = 8.4MHz core clock, even before a bootloader kicks in. -# OK to speed up *after* PLL and clock tree setup. - -$_TARGETNAME configure -event "reset-start" { adapter_khz 10} - -# Assume SRST is unavailable (e.g. TI-14 JTAG), so we must assert reset -# ourselves using PRM_RSTCTRL. RST_GS (2) is a warm reset, like ICEpick -# would issue. RST_DPLL3 (4) is a cold reset. -set PRM_RSTCTRL 0x48307250 -$_TARGETNAME configure -event reset-assert "$_TARGETNAME mww phys $PRM_RSTCTRL 2" - -$_TARGETNAME configure -event reset-assert-post "omap3_dbginit $_TARGETNAME; adapter_khz 1000" - +# "amdm37x_dbginit am35x.cpu" needs to be run after init. -reset_config trst_only diff --git a/tcl/board/ti_beagleboard_xm.cfg b/tcl/board/ti_beagleboard_xm.cfg new file mode 100644 index 0000000..e4e93e3 --- /dev/null +++ b/tcl/board/ti_beagleboard_xm.cfg @@ -0,0 +1,12 @@ +# BeagleBoard xM (DM37x) +# http://beagleboard.org + +set CHIPTYPE "dm37x" +source [find target/amdm37x.cfg] + +# The TI-14 JTAG connector does not have srst. CPU reset is handled in +# hardware. +reset_config trst_only + +# "amdm37x_dbginit dm37x.cpu" needs to be run after init. + diff --git a/tcl/target/amdm37x.cfg b/tcl/target/amdm37x.cfg new file mode 100644 index 0000000..ab18681 --- /dev/null +++ b/tcl/target/amdm37x.cfg @@ -0,0 +1,203 @@ +# +# Copyright (C) 2010 by Karl Kurbjun +# Copyright (C) 2009, 2010 by Ãyvind Harboe +# Copyright (C) 2009 by David Brownell +# Copyright (C) 2009 by Magnus Lundin +# +# TI AM/DM37x +# http://www.ti.com/litv/pdf/sprugn4b +# +# This script is based on the AM3517 initialization. It should be considered +# preliminary since it needs more complete testing and only the basic +# operations work. +# + +############################################################################### +# User modifiable parameters +############################################################################### + +# This script uses the variable CHIPTYPE to determine whether this is an AM35x +# or DM37x target. If CHIPTYPE is not set it will error out. +if { [info exists CHIPTYPE] } { + + if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME + } else { + set _CHIPNAME $CHIPTYPE + } + + switch $CHIPTYPE { + dm37x { + # Primary TAP: ICEpick-C (JTAG route controller) and boundary scan + set _JRC_TAPID 0x0b89102f + } + am35x { + # Primary TAP: ICEpick-C (JTAG route controller) and boundary scan + set _JRC_TAPID 0x0b7ae02f + } + default { + error "ERROR: CHIPTYPE was set, but it was not set to a valid value. Acceptable values are \"dm37x\" or \"am35x\"." + } + } +} else { + error "ERROR: CHIPTYPE was not defined. Please set CHIPTYPE to \"am35x\" for the AM35x or \"dm37x\" for the DM37x series in the board configuration." +} + +# Run the adapter at the fastest acceptable speed with the slowest possible +# core clock. +adapter_khz 10 + +############################################################################### +# JTAG setup +# The OpenOCD commands are described in the TAP Declaration section +# http://openocd.berlios.de/doc/html/TAP-Declaration.html +############################################################################### + +# The AM/DM37x has an ICEpick module in it like many of TI's other devices. More +# can be read about this module in sprugn4b under chapter 27: "Debug and +# Emulation". The module is used to route the JTAG chain to the various +# subsystems in the chip. +source [find target/icepick.cfg] + +# The TAP order should be described from the TDO connection in OpenOCD to the +# TDI pin. The OpenOCD FAQ describes this in more detail: +# http://openocd.berlios.de/doc/html/FAQ.html + +# From SPRUGN4B CH27 the available secondary TAPs are in this order from TDO: +# +# Device | TAP number +# ---------|------------ +# DAP | 3 +# Sequencer| 2 Note: The sequencer is an ARM968 +# DSP | 1 +# D2D | 0 +# +# Right now the only secondary tap enabled is the DAP so the rest are left +# undescribed. + +###### +# Start of Chain Description +# The Secondary TAPs all have enable functions defined for use with the ICEpick +# Only the DAP is enabled. The AM37xx does not have the Sequencer or DSP but +# the TAP numbers for ICEpick do not change. +# +# TODO: A disable function should also be added. +###### + +# Secondary TAP: DAP is closest to the TDO output +# The TAP enable event also needs to be described +jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0xf -disable +jtag configure $_CHIPNAME.dap -event tap-enable \ + "icepick_c_tapenable $_CHIPNAME.jrc 3" + +# These taps are only present in the DM37x series. +if { $CHIPTYPE == "dm37x" } { + # Secondary TAP: Sequencer (ARM968) it is not in the chain by default + # The ICEpick can be used to enable it in the chain. + jtag newtap $_CHIPNAME arm2 -irlen 4 -ircapture 0x1 -irmask 0x0f -disable + jtag configure $_CHIPNAME.arm2 -event tap-enable \ + "icepick_c_tapenable $_CHIPNAME.jrc 2" + + # Secondary TAP: C64x+ DSP - it is not in the chain by default (-disable) + # The ICEpick can be used to enable it in the chain. + jtag newtap $_CHIPNAME dsp -irlen 38 -ircapture 0x25 -irmask 0x3f -disable + jtag configure $_CHIPNAME.dsp -event tap-enable \ + "icepick_c_tapenable $_CHIPNAME.jrc 1" +} + +# Secondary TAP: D2D it is not in the chain by default (-disable) +# The ICEpick can be used to enable it in the chain. +# This IRLEN is probably incorrect - not sure where the documentation is. +jtag newtap $_CHIPNAME d2d -irlen 4 -ircapture 0x1 -irmask 0x0f -disable +jtag configure $_CHIPNAME.d2d -event tap-enable \ + "icepick_c_tapenable $_CHIPNAME.jrc 0" + +# Primary TAP: ICEpick - it is closest to TDI so last in the chain +jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f \ + -expected-id $_JRC_TAPID + +###### +# End of Chain Description +###### + +###### +# Start JTAG TAP events +###### + +# some TCK tycles are required to activate the DEBUG power domain +jtag configure $_CHIPNAME.jrc -event post-reset "runtest 100" + +# Enable the DAP TAP +jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.dap" + +###### +# End JTAG TAP events +###### + +############################################################################### +# Target Setup: +# This section is described in the OpenOCD documentation under CPU Configuration +# http://openocd.berlios.de/doc/html/CPU-Configuration.html +############################################################################### + +# Create the CPU target to be used with GDB: Cortex-A8, using DAP +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME cortex_a8 -chain-position $_CHIPNAME.dap + +# The DM37x has 64K of SRAM starting at address 0x4020_0000. Allow the first +# 16K to be used as a scratchpad for OpenOCD. + +$_TARGETNAME configure -work-area-phys 0x40200000 -work-area-size 0x4000 + +###### +# Start Target Reset Event Setup: +###### + +# Set the JTAG clock down to 10 kHz to be sure that it will work with the +# slowest possible core clock (16.8MHz/2 = 8.4MHz). It is OK to speed up +# *after* PLL and clock tree setup. + +$_TARGETNAME configure -event "reset-start" { adapter_khz 10 } + +# Reset needs to be performed in in software. +# The AM/DM37x TRM (sprugn4b) describes the software reset in detail. +# PRM_RSTCTRL is described in table 3-425 on page 618. We assert RST_GS +# (bit 1 (in 31:0) ) to do a warm reset. + +# Create a vaiable for the register address +set PRM_RSTCTRL 0x48307250 + +# Describe the reset assert process: A value of 2 must be written +# (assert bit 1) to the physical address of PRM_RSTCTRL. + +$_TARGETNAME configure -event \ + reset-assert "$_TARGETNAME mww phys $PRM_RSTCTRL 2" + +# After the reset is asserted we need to re-initialize debugging and speed up +# the JTAG clock. + +$_TARGETNAME configure -event \ + reset-assert-post "amdm37x_dbginit $_TARGETNAME; adapter_khz 1000" + +###### +# End Target Reset Event Setup: +###### + +############################################################################### +# Target Functions +# Add any functions needed for the target here +############################################################################### + +# Run this to enable invasive debugging. This is run automatically in the +# reset sequence. +proc amdm37x_dbginit {target} { + # General Cortex A8 debug initialisation + cortex_a8 dbginit + + # Enable DBGEN signal. This signal is described in the ARM v7 TRM, but + # access to the signal appears to be implementation specific. TI does not + # describe this register much except a quick line that states DBGEM (sic) is + # at this address and this bit. + $target mww phys 0x5401d030 0x00002000 +} + ----------------------------------------------------------------------- Summary of changes: tcl/board/am3517evm.cfg | 88 +---------------- tcl/board/ti_beagleboard_xm.cfg | 12 +++ tcl/target/amdm37x.cfg | 203 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 221 insertions(+), 82 deletions(-) create mode 100644 tcl/board/ti_beagleboard_xm.cfg create mode 100644 tcl/target/amdm37x.cfg hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-15 11:39:31
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via c14852385fde55abc5d5ffb076510cd1814432e0 (commit) from 4a47d87e4791a00cab4f420e23cd7d85aee0342b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c14852385fde55abc5d5ffb076510cd1814432e0 Author: Flemming Futtrup <ff...@de...> Date: Wed Sep 15 11:34:57 2010 +0200 cfi: add sst39vf6401b Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 5b5b4da..43e19b5 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -57,6 +57,7 @@ static const struct cfi_fixup cfi_0002_fixups[] = { {CFI_MFR_SST, 0x00D6, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]}, {CFI_MFR_SST, 0x00D7, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]}, {CFI_MFR_SST, 0x2780, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]}, + {CFI_MFR_SST, 0x236d, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_555_2AA]}, {CFI_MFR_ATMEL, 0x00C8, cfi_fixup_reversed_erase_regions, NULL}, {CFI_MFR_ST, 0x22C4, cfi_fixup_reversed_erase_regions, NULL}, /* M29W160ET */ {CFI_MFR_FUJITSU, 0x22ea, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_555_2AA]}, diff --git a/src/flash/nor/non_cfi.c b/src/flash/nor/non_cfi.c index 569ffc5..c68ace6 100644 --- a/src/flash/nor/non_cfi.c +++ b/src/flash/nor/non_cfi.c @@ -230,6 +230,20 @@ static struct non_cfi non_cfi_flashes[] = { } }, { + .mfr = CFI_MFR_SST, + .id = 0x236d, /* SST39VF6401B */ + .pri_id = 0x02, + .dev_size = 8*MB, + .interface_desc = 0x2, /* x8 or x16 device with nBYTE */ + .max_buf_write_size = 0x0, + .status_poll_mask = CFI_STATUS_POLL_MASK_DQ6_DQ7, + .num_erase_regions = 1, + .erase_region_info = + { + ERASE_REGION(2048, 4*KB) + } + }, + { .mfr = CFI_MFR_AMD, .id = 0x22ab, /* AM29F400BB */ .pri_id = 0x02, ----------------------------------------------------------------------- Summary of changes: src/flash/nor/cfi.c | 1 + src/flash/nor/non_cfi.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-14 16:30:07
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 4a47d87e4791a00cab4f420e23cd7d85aee0342b (commit) from 1b0f194d90f38e363939b7f11260fc64680016e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4a47d87e4791a00cab4f420e23cd7d85aee0342b Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Sep 13 21:59:39 2010 +0200 breakpoints: fix error handling do not try to interpret "retval" into a string, just amend a bit about the context of the already reported error. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/breakpoints.c b/src/target/breakpoints.c index dc44642..917dfc7 100644 --- a/src/target/breakpoints.c +++ b/src/target/breakpoints.c @@ -46,7 +46,6 @@ int breakpoint_add(struct target *target, uint32_t address, uint32_t length, enu { struct breakpoint *breakpoint = target->breakpoints; struct breakpoint **breakpoint_p = &target->breakpoints; - char *reason; int retval; int n; @@ -77,19 +76,9 @@ int breakpoint_add(struct target *target, uint32_t address, uint32_t length, enu (*breakpoint_p)->unique_id = bpwp_unique_id++; retval = target_add_breakpoint(target, *breakpoint_p); - switch (retval) { - case ERROR_OK: - break; - case ERROR_TARGET_RESOURCE_NOT_AVAILABLE: - reason = "resource not available"; - goto fail; - case ERROR_TARGET_NOT_HALTED: - reason = "target running"; - goto fail; - default: - reason = "unknown reason"; -fail: - LOG_ERROR("can't add breakpoint: %s", reason); + if (retval != ERROR_OK) + { + LOG_ERROR("could not add breakpoint"); free((*breakpoint_p)->orig_instr); free(*breakpoint_p); *breakpoint_p = NULL; @@ -185,7 +174,6 @@ int watchpoint_add(struct target *target, uint32_t address, uint32_t length, struct watchpoint *watchpoint = target->watchpoints; struct watchpoint **watchpoint_p = &target->watchpoints; int retval; - char *reason; while (watchpoint) { @@ -216,21 +204,11 @@ int watchpoint_add(struct target *target, uint32_t address, uint32_t length, (*watchpoint_p)->unique_id = bpwp_unique_id++; retval = target_add_watchpoint(target, *watchpoint_p); - switch (retval) { - case ERROR_OK: - break; - case ERROR_TARGET_RESOURCE_NOT_AVAILABLE: - reason = "resource not available"; - goto bye; - case ERROR_TARGET_NOT_HALTED: - reason = "target running"; - goto bye; - default: - reason = "unrecognized error"; -bye: - LOG_ERROR("can't add %s watchpoint at 0x%8.8" PRIx32 ", %s", + if (retval != ERROR_OK) + { + LOG_ERROR("can't add %s watchpoint at 0x%8.8" PRIx32, watchpoint_rw_strings[(*watchpoint_p)->rw], - address, reason); + address); free (*watchpoint_p); *watchpoint_p = NULL; return retval; ----------------------------------------------------------------------- Summary of changes: src/target/breakpoints.c | 36 +++++++----------------------------- 1 files changed, 7 insertions(+), 29 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-14 11:19:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 1b0f194d90f38e363939b7f11260fc64680016e1 (commit) from 35691065f72110d4490df3a127467ea9c04c70ca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1b0f194d90f38e363939b7f11260fc64680016e1 Author: Takács Ãron <tak...@in...> Date: Tue Sep 14 11:15:35 2010 +0200 board scripts: Marvell PXA270M processor has a new TAPID: 0x89265013 the new Marvell PXA270M processor has a new TAPID: 0x89265013. Attached you will find a patch for target/pxa270.cfg that will handle this. I have also attached a board/colibri.cfg file to support the Colibri PXA270 module by Toradex. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/tcl/board/colibri.cfg b/tcl/board/colibri.cfg new file mode 100644 index 0000000..7c1f1cb --- /dev/null +++ b/tcl/board/colibri.cfg @@ -0,0 +1,13 @@ +# Toradex Colibri PXA270 +source [find target/pxa270.cfg] +reset_config trst_and_srst srst_push_pull +adapter_nsrst_assert_width 40 + +# CS0 -- one bank of CFI flash, 32 MBytes +# the bank is 32-bits wide, two 16-bit chips in parallel +set _FLASHNAME $_CHIPNAME.flash +flash bank $_FLASHNAME cfi 0x00000000 0x02000000 2 4 $_TARGETNAME + + + + diff --git a/tcl/target/pxa270.cfg b/tcl/target/pxa270.cfg index 7aaef8c..f5d2c85 100644 --- a/tcl/target/pxa270.cfg +++ b/tcl/target/pxa270.cfg @@ -27,6 +27,12 @@ if { [info exists CPUTAPID2 ] } { set _CPUTAPID2 0x79265013 } +if { [info exists CPUTAPID3 ] } { + set _CPUTAPID2 $CPUTAPID3 +} else { + # set useful default + set _CPUTAPID3 0x89265013 +} # set adapter_nsrst_delay to the delay introduced by your reset circuit # the rest of the needed delays are built into the openocd program @@ -36,7 +42,7 @@ adapter_nsrst_delay 260 jtag_ntrst_delay 250 set _TARGETNAME $_CHIPNAME.cpu -jtag newtap $_CHIPNAME cpu -irlen 7 -ircapture 0x1 -irmask 0x7f -expected-id $_CPUTAPID -expected-id $_CPUTAPID2 +jtag newtap $_CHIPNAME cpu -irlen 7 -ircapture 0x1 -irmask 0x7f -expected-id $_CPUTAPID -expected-id $_CPUTAPID2 -expected-id $_CPUTAPID3 target create $_TARGETNAME xscale -endian $_ENDIAN -chain-position $_TARGETNAME -variant pxa27x # maps to PXA internal RAM. If you are using a PXA255 ----------------------------------------------------------------------- Summary of changes: tcl/board/colibri.cfg | 13 +++++++++++++ tcl/target/pxa270.cfg | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletions(-) create mode 100644 tcl/board/colibri.cfg hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-13 21:57:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 35691065f72110d4490df3a127467ea9c04c70ca (commit) from 81e0d4438ec4b4112e28a9e90ba2fc1fb548310b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 35691065f72110d4490df3a127467ea9c04c70ca Author: Mike Dunn <mik...@ne...> Date: Mon Sep 13 12:45:37 2010 -0700 xscale: fix sw breakpoints for thumb; set bp immediately Hi everyone, Version 2 of this patch. Code added to breakpoints.c was removed from previous patch, and item 3 added, per discussion with Ãyvind regarding error reporting. Item 4 added, which I just noticed. I tried to use a software breakpoint in thumb code on the xscale for the first time recently, and was surprised to find that it didn't work. The result was this patch, which does four things: 1): fix trivial cut-n-paste error that caused thumb breakpoints to not work 2): call xscale_set_breakpoint() from xscale_add_breakpoint() 3): log error on data abort in xscale_write_memory() 4): fixed incorrect error code returned by xscale_set_breakpoint() when no breakpoint register is available; added comment Item 2 not only makes the xscale breakpoint code consistent with other targets, but also alerts the user immediately if an error occurs when writing the breakpoint instruction to target memory (previously, xscale_set_breakpoint() was not called until execution resumed). Also, calling xscale_breakpoint_set() as part of the call chain starting with handle_bp_command() and propagating the return status back up the chain avoids the situation where OpenOCD "thinks" the breakpoint is set when in reality an error ocurred. Item 3 provides a helpful message for a common reason for failure to set sw breakpoint. This was thoroughly tested, mindful of the fact that breakpoint management is somewhat dicey during single-stepping. Comments and criticisms of course gratefully received. Mike Signed-off-by: Mike Dunn <mik...@ne...> Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/xscale.c b/src/target/xscale.c index 2b8bff1..82b0f34 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -1979,6 +1979,7 @@ static int xscale_write_memory(struct target *target, uint32_t address, if ((retval = xscale_send_u32(target, 0x60)) != ERROR_OK) return retval; + LOG_ERROR("data abort writing memory"); return ERROR_TARGET_DATA_ABORT; } @@ -2141,9 +2142,9 @@ static int xscale_set_breakpoint(struct target *target, breakpoint->set = 2; /* breakpoint set on second breakpoint register */ } else - { + { /* bug: availability previously verified in xscale_add_breakpoint() */ LOG_ERROR("BUG: no hardware comparator available"); - return ERROR_OK; + return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } } else if (breakpoint->type == BKPT_SOFT) @@ -2169,7 +2170,7 @@ static int xscale_set_breakpoint(struct target *target, return retval; } /* write the bkpt instruction in target endianness (arm7_9->arm_bkpt is host endian) */ - if ((retval = target_write_u32(target, breakpoint->address, xscale->thumb_bkpt)) != ERROR_OK) + if ((retval = target_write_u16(target, breakpoint->address, xscale->thumb_bkpt)) != ERROR_OK) { return retval; } @@ -2207,7 +2208,7 @@ static int xscale_add_breakpoint(struct target *target, xscale->ibcr_available--; } - return ERROR_OK; + return xscale_set_breakpoint(target, breakpoint); } static int xscale_unset_breakpoint(struct target *target, ----------------------------------------------------------------------- Summary of changes: src/target/xscale.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-13 19:50:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 81e0d4438ec4b4112e28a9e90ba2fc1fb548310b (commit) from 8afd2309a4e18b222da189eb51f46339f17201d5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 81e0d4438ec4b4112e28a9e90ba2fc1fb548310b Author: Mike Dunn <mik...@ne...> Date: Sun Sep 12 12:05:07 2010 -0700 propagate return status of set_breakpoint() up call chain Hi everyone, I figured since I was poking around in the breakpoint code on other arches, I'd add this change to those arches that don't do it already. This patch propagates the return code of <arch>_set_breakpoint() up the call stack. This ensures that the higher layer breakpoint infrastructure is aware that an error ocurred, in which case the breakpoint is not recorded. Normally I wouldn't touch code that I can't test, but the code is very uniform across architectures, and the change is rather benign, so I figured after careful inspection that it is safe. If the maintainers or others think this is imprudent, the patch can be dropped. Also changed the error code to something more appropriate in two cases where hardware resources are unavailable. Comments and criticisms of course gratefully received. Mike Signed-off-by: Mike Dunn <mik...@ne...> Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c index 9b3521a..8b4ced5 100644 --- a/src/target/cortex_a8.c +++ b/src/target/cortex_a8.c @@ -1230,7 +1230,7 @@ static int cortex_a8_set_breakpoint(struct target *target, if (brp_i >= cortex_a8->brp_num) { LOG_ERROR("ERROR Can not find free Breakpoint Register Pair"); - return ERROR_FAIL; + return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } breakpoint->set = brp_i + 1; if (breakpoint->length == 2) @@ -1360,9 +1360,8 @@ static int cortex_a8_add_breakpoint(struct target *target, if (breakpoint->type == BKPT_HARD) cortex_a8->brp_num_available--; - cortex_a8_set_breakpoint(target, breakpoint, 0x00); /* Exact match */ - return ERROR_OK; + return cortex_a8_set_breakpoint(target, breakpoint, 0x00); /* Exact match */ } static int cortex_a8_remove_breakpoint(struct target *target, struct breakpoint *breakpoint) diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index f87c3e0..3011b59 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -1221,9 +1221,8 @@ cortex_m3_add_breakpoint(struct target *target, struct breakpoint *breakpoint) if (breakpoint->type == BKPT_HARD) cortex_m3->fp_code_available--; - cortex_m3_set_breakpoint(target, breakpoint); - return ERROR_OK; + return cortex_m3_set_breakpoint(target, breakpoint); } static int diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c index 21ff0ba..62c484a 100644 --- a/src/target/mips_m4k.c +++ b/src/target/mips_m4k.c @@ -497,7 +497,7 @@ static int mips_m4k_set_breakpoint(struct target *target, { LOG_ERROR("Can not find free FP Comparator(bpid: %d)", breakpoint->unique_id ); - return ERROR_FAIL; + return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } breakpoint->set = bp_num + 1; comparator_list[bp_num].used = 1; @@ -662,9 +662,7 @@ static int mips_m4k_add_breakpoint(struct target *target, struct breakpoint *bre mips32->num_inst_bpoints_avail--; } - mips_m4k_set_breakpoint(target, breakpoint); - - return ERROR_OK; + return mips_m4k_set_breakpoint(target, breakpoint); } static int mips_m4k_remove_breakpoint(struct target *target, ----------------------------------------------------------------------- Summary of changes: src/target/cortex_a8.c | 5 ++--- src/target/cortex_m3.c | 3 +-- src/target/mips_m4k.c | 6 ++---- 3 files changed, 5 insertions(+), 9 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2010-09-12 20:24:18
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 8afd2309a4e18b222da189eb51f46339f17201d5 (commit) via 73e5dffdfd310bd09b5497f40db98f50eedeb31a (commit) from 505d4633cd7a4e8623ef70932cd7edc9f22e71d4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8afd2309a4e18b222da189eb51f46339f17201d5 Author: Ãyvind Harboe <oyv...@zy...> Date: Sun Sep 12 19:29:37 2010 +0200 helper: add stacktrace command that returns error stacktrace Ability to access the stacktrace from a script is quite handy. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/openocd.c b/src/openocd.c index 5f890db..7347cad 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -185,6 +185,29 @@ COMMAND_HANDLER(handle_add_script_search_dir_command) return ERROR_OK; } + +static int jim_stacktrace_command(Jim_Interp *interp, int argc, + Jim_Obj * const *argv) +{ + if (argc != 1) + { + return JIM_ERR; + } + Jim_Obj * stacktrace = Jim_DuplicateObj(interp, interp->stackTrace); + + /* insert actual error site at beginning of list*/ + Jim_Obj *procname = Jim_NewStringObj(interp, "", -1); /* Uhhh... don't know this one. */ + Jim_ListInsertElements(interp, stacktrace, 0, 1, &procname); + Jim_Obj *filename = Jim_NewStringObj(interp, interp->errorFileName, -1); + Jim_ListInsertElements(interp, stacktrace, 1, 1, &filename); + Jim_Obj *line = Jim_NewIntObj(interp, interp->errorLine); + Jim_ListInsertElements(interp, stacktrace, 2, 1, &line); + + Jim_SetResult(interp, stacktrace); + + return JIM_OK; +} + static const struct command_registration openocd_command_handlers[] = { { .name = "version", @@ -215,6 +238,14 @@ static const struct command_registration openocd_command_handlers[] = { .help = "dir to search for config files and scripts", }, + { + .name = "stacktrace", + .jim_handler = jim_stacktrace_command, + .mode = COMMAND_ANY, + .help = "returns the stacktrace as a list of triples: proc, file, line." + "The stack trace is reset when a new stack trace is being built after " + "a new failure has occurred.", + }, COMMAND_REGISTRATION_DONE }; commit 73e5dffdfd310bd09b5497f40db98f50eedeb31a Author: Ãyvind Harboe <oyv...@zy...> Date: Sun Sep 12 20:16:55 2010 +0200 jim: fix crash when using Jim_ListInsertElements Jim_ListInsertElements was simply forgotten from the fn that registered all the APIs. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/helper/jim.c b/src/helper/jim.c index 071e557..bb74838 100644 --- a/src/helper/jim.c +++ b/src/helper/jim.c @@ -9296,6 +9296,7 @@ void JimRegisterCoreApi(Jim_Interp *interp) JIM_REGISTER_API(CollectIfNeeded); JIM_REGISTER_API(GetIndex); JIM_REGISTER_API(NewListObj); + JIM_REGISTER_API(ListInsertElements); JIM_REGISTER_API(ListAppendElement); JIM_REGISTER_API(ListAppendList); JIM_REGISTER_API(ListLength); ----------------------------------------------------------------------- Summary of changes: src/helper/jim.c | 1 + src/openocd.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |