From: Øyvind H. <go...@us...> - 2010-08-11 17:09: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 676f48d77db83c687740955aed6783ea6d326853 (commit) via f941192723f7d71ae4a9a8f011dad5909f156da3 (commit) via ba951aede3aa98591087428955dad51279e6a5ea (commit) from 91305bfa7f550c96b967008c1512864cffdaa52a (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 676f48d77db83c687740955aed6783ea6d326853 Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Aug 11 11:00:02 2010 +0200 debug: use assert's when approperiate error was returned instead of using assert. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/arm_jtag.h b/src/target/arm_jtag.h index 37c228f..f581278 100644 --- a/src/target/arm_jtag.h +++ b/src/target/arm_jtag.h @@ -45,8 +45,7 @@ static inline int arm_jtag_set_instr(struct arm_jtag *jtag_info, /* inline most common code path */ struct jtag_tap *tap; tap = jtag_info->tap; - if (tap == NULL) - return ERROR_FAIL; + assert (tap != NULL); if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr) { diff --git a/src/target/xscale.c b/src/target/xscale.c index c0080b2..44358bc 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -160,8 +160,7 @@ static int xscale_verify_pointer(struct command_context *cmd_ctx, static int xscale_jtag_set_instr(struct jtag_tap *tap, uint32_t new_instr, tap_state_t end_state) { - if (tap == NULL) - return ERROR_FAIL; + assert (tap != NULL); if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr) { commit f941192723f7d71ae4a9a8f011dad5909f156da3 Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Aug 11 10:58:49 2010 +0200 arm: add missing error reporting when an unknown core mode is read from the target, report error. Can be communication failure. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 3bbe8b0..778e606 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -2,7 +2,7 @@ * Copyright (C) 2005 by Dominic Rath * * Dom...@gm... * * * - * Copyright (C) 2007-2009 Ãyvind Harboe * + * Copyright (C) 2007-2010 Ãyvind Harboe * * oyv...@zy... * * * * Copyright (C) 2008 by Spencer Oliver * @@ -1518,7 +1518,10 @@ static int arm7_9_full_context(struct target *target) } if (!is_arm_mode(armv4_5->core_mode)) + { + LOG_ERROR("not a valid arm core mode - communication failure?"); return ERROR_FAIL; + } /* iterate through processor modes (User, FIQ, IRQ, SVC, ABT, UND) * SYS shares registers with User, so we don't touch SYS @@ -1621,7 +1624,10 @@ static int arm7_9_restore_context(struct target *target) arm7_9->pre_restore_context(target); if (!is_arm_mode(armv4_5->core_mode)) + { + LOG_ERROR("not a valid arm core mode - communication failure?"); return ERROR_FAIL; + } /* iterate through processor modes (User, FIQ, IRQ, SVC, ABT, UND) * SYS shares registers with User, so we don't touch SYS diff --git a/src/target/arm920t.c b/src/target/arm920t.c index 90f548f..a3a5adf 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -281,7 +281,10 @@ static int arm920t_read_cp15_interpreted(struct target *target, #endif if (!is_arm_mode(armv4_5->core_mode)) + { + LOG_ERROR("not a valid arm core mode - communication failure?"); return ERROR_FAIL; + } r[0].dirty = 1; r[1].dirty = 1; @@ -323,7 +326,10 @@ int arm920t_write_cp15_interpreted(struct target *target, #endif if (!is_arm_mode(armv4_5->core_mode)) + { + LOG_ERROR("not a valid arm core mode - communication failure?"); return ERROR_FAIL; + } r[0].dirty = 1; r[1].dirty = 1; @@ -1154,7 +1160,10 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command) fclose(output); if (!is_arm_mode(armv4_5->core_mode)) + { + LOG_ERROR("not a valid arm core mode - communication failure?"); return ERROR_FAIL; + } /* force writeback of the valid data */ r = armv4_5->core_cache->reg_list; @@ -1481,7 +1490,10 @@ COMMAND_HANDLER(arm920t_handle_read_mmu_command) fclose(output); if (!is_arm_mode(armv4_5->core_mode)) + { + LOG_ERROR("not a valid arm core mode - communication failure?"); return ERROR_FAIL; + } /* force writeback of the valid data */ r = armv4_5->core_cache->reg_list; diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index d950af3..07c8c6e 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -634,7 +634,10 @@ COMMAND_HANDLER(handle_armv4_5_reg_command) } if (!is_arm_mode(armv4_5->core_mode)) + { + LOG_ERROR("not a valid arm core mode - communication failure?"); return ERROR_FAIL; + } if (!armv4_5->full_context) { command_print(CMD_CTX, "error: target doesn't support %s", @@ -1046,7 +1049,10 @@ int arm_get_gdb_reg_list(struct target *target, int i; if (!is_arm_mode(armv4_5->core_mode)) + { + LOG_ERROR("not a valid arm core mode - communication failure?"); return ERROR_FAIL; + } *reg_list_size = 26; *reg_list = malloc(sizeof(struct reg*) * (*reg_list_size)); @@ -1127,7 +1133,10 @@ int armv4_5_run_algorithm_inner(struct target *target, } if (!is_arm_mode(armv4_5->core_mode)) + { + LOG_ERROR("not a valid arm core mode - communication failure?"); return ERROR_FAIL; + } /* armv5 and later can terminate with BKPT instruction; less overhead */ if (!exit_point && armv4_5->is_armv4) commit ba951aede3aa98591087428955dad51279e6a5ea Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Aug 11 10:53:54 2010 +0200 config scripts: remove useless reference to OpenOCD docs clutters config scripts. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/tcl/board/microchip_explorer16.cfg b/tcl/board/microchip_explorer16.cfg index f5c4faa..7c036c6 100644 --- a/tcl/board/microchip_explorer16.cfg +++ b/tcl/board/microchip_explorer16.cfg @@ -8,6 +8,3 @@ set CPUTAPID 0x30938053 set WORKAREASIZE 32768 source [find target/pic32mx.cfg] - -# For more information about the configuration files, take a look at: -# openocd.texi diff --git a/tcl/board/str910-eval.cfg b/tcl/board/str910-eval.cfg index 9e3f881..38a1477 100644 --- a/tcl/board/str910-eval.cfg +++ b/tcl/board/str910-eval.cfg @@ -62,6 +62,3 @@ set _FLASHNAME $_CHIPNAME.flash0 flash bank $_FLASHNAME str9x 0x00000000 0x00080000 0 0 0 set _FLASHNAME $_CHIPNAME.flash1 flash bank $_FLASHNAME str9x 0x00080000 0x00008000 0 0 0 - -# For more information about the configuration files, take a look at: -# openocd.texi diff --git a/tcl/target/at91sam7sx.cfg b/tcl/target/at91sam7sx.cfg index f3cc88e..6cbd6b6 100644 --- a/tcl/target/at91sam7sx.cfg +++ b/tcl/target/at91sam7sx.cfg @@ -51,6 +51,3 @@ $_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-a #flash bank <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>] set _FLASHNAME $_CHIPNAME.flash flash bank $_FLASHNAME at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432 - -# For more information about the configuration files, take a look at: -# openocd.texi diff --git a/tcl/target/lpc2294.cfg b/tcl/target/lpc2294.cfg index 8ed6352..6f34171 100644 --- a/tcl/target/lpc2294.cfg +++ b/tcl/target/lpc2294.cfg @@ -28,6 +28,3 @@ $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-a # flash bank <name> lpc2000 <base> <size> 0 0 <target#> <variant> <clock> [calc checksum] set _FLASHNAME $_CHIPNAME.flash flash bank $_FLASHNAME lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14765 calc_checksum - -# For more information about the configuration files, take a look at: -# openocd.texi diff --git a/tcl/target/mega128.cfg b/tcl/target/mega128.cfg index bb7cdee..212a267 100644 --- a/tcl/target/mega128.cfg +++ b/tcl/target/mega128.cfg @@ -38,6 +38,3 @@ flash bank $_FLASHNAME avr 0 0 0 0 $_TARGETNAME #flash write_image E:/Versaloon/Software/CAMERAPROTOCOLAGENT.hex #reset run #shutdown -# -# For more information about the configuration files, take a look at: -# openocd.texi diff --git a/tcl/target/pic32mx.cfg b/tcl/target/pic32mx.cfg index 202668b..efffd04 100644 --- a/tcl/target/pic32mx.cfg +++ b/tcl/target/pic32mx.cfg @@ -78,6 +78,3 @@ flash bank $_FLASHNAME pic32mx 0x1d000000 0 0 0 $_TARGETNAME # add virtual banks for kseg0 and kseg1 flash bank vbank2 virtual 0xbd000000 0 0 0 $_TARGETNAME $_FLASHNAME flash bank vbank3 virtual 0x9d000000 0 0 0 $_TARGETNAME $_FLASHNAME - -# For more information about the configuration files, take a look at: -# openocd.texi diff --git a/tcl/target/sam7x256.cfg b/tcl/target/sam7x256.cfg index 19145e5..dd36458 100644 --- a/tcl/target/sam7x256.cfg +++ b/tcl/target/sam7x256.cfg @@ -48,6 +48,3 @@ $_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-a #flash bank <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>] set _FLASHNAME $_CHIPNAME.flash flash bank $_FLASHNAME at91sam7 0 0 0 0 $_TARGETNAME 0 0 0 0 0 0 0 18432 - -# For more information about the configuration files, take a look at: -# openocd.texi diff --git a/tcl/target/stm32.cfg b/tcl/target/stm32.cfg index a13dc31..fa59e35 100644 --- a/tcl/target/stm32.cfg +++ b/tcl/target/stm32.cfg @@ -64,6 +64,3 @@ $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE set _FLASHNAME $_CHIPNAME.flash flash bank $_FLASHNAME stm32x 0 0 0 0 $_TARGETNAME - -# For more information about the configuration files, take a look at: -# openocd.texi diff --git a/tcl/target/str710.cfg b/tcl/target/str710.cfg index a5955b6..0f61d44 100644 --- a/tcl/target/str710.cfg +++ b/tcl/target/str710.cfg @@ -51,6 +51,3 @@ set _FLASHNAME $_CHIPNAME.flash0 flash bank $_FLASHNAME str7x 0x40000000 0x00040000 0 0 $_TARGETNAME STR71x set _FLASHNAME $_CHIPNAME.flash1 flash bank $_FLASHNAME str7x 0x400C0000 0x00004000 0 0 $_TARGETNAME STR71x - -# For more information about the configuration files, take a look at: -# openocd.texi diff --git a/tcl/target/str912.cfg b/tcl/target/str912.cfg index a16c83a..9b0a708 100644 --- a/tcl/target/str912.cfg +++ b/tcl/target/str912.cfg @@ -67,6 +67,3 @@ set _FLASHNAME $_CHIPNAME.flash0 flash bank $_FLASHNAME str9x 0x00000000 0x00080000 0 0 $_TARGETNAME set _FLASHNAME $_CHIPNAME.flash1 flash bank $_FLASHNAME str9x 0x00080000 0x00008000 0 0 $_TARGETNAME - -# For more information about the configuration files, take a look at: -# openocd.texi ----------------------------------------------------------------------- Summary of changes: src/target/arm7_9_common.c | 8 +++++++- src/target/arm920t.c | 12 ++++++++++++ src/target/arm_jtag.h | 3 +-- src/target/armv4_5.c | 9 +++++++++ src/target/xscale.c | 3 +-- tcl/board/microchip_explorer16.cfg | 3 --- tcl/board/str910-eval.cfg | 3 --- tcl/target/at91sam7sx.cfg | 3 --- tcl/target/lpc2294.cfg | 3 --- tcl/target/mega128.cfg | 3 --- tcl/target/pic32mx.cfg | 3 --- tcl/target/sam7x256.cfg | 3 --- tcl/target/stm32.cfg | 3 --- tcl/target/str710.cfg | 3 --- tcl/target/str912.cfg | 3 --- 15 files changed, 30 insertions(+), 35 deletions(-) hooks/post-receive -- Main OpenOCD repository |