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
(37) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Øyvind H. <go...@us...> - 2009-10-21 13:17: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 e895246966e3aa6e78f9d0816c72c6fbb9160122 (commit) via a4a1de4dd1ec3e17fa7da0f8f82c4c2854d39d5d (commit) from 62525792e073a54f21e334764ddd9dcd2d47ff0c (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 e895246966e3aa6e78f9d0816c72c6fbb9160122 Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Oct 21 13:10:32 2009 +0200 Retire obsolete and superfluous implementations of virt2phys in each target. This is done in a polymorphic implementation in target.c diff --git a/src/target/arm720t.c b/src/target/arm720t.c index a5916aa..2ebd83a 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -34,7 +34,6 @@ int arm720t_register_commands(struct command_context_s *cmd_ctx); int arm720t_handle_cp15_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); -int arm720t_handle_virt2phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int arm720t_handle_md_phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int arm720t_handle_mw_phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); @@ -487,7 +486,6 @@ int arm720t_register_commands(struct command_context_s *cmd_ctx) arm720t_cmd = register_command(cmd_ctx, NULL, "arm720t", NULL, COMMAND_ANY, "arm720t specific commands"); register_command(cmd_ctx, arm720t_cmd, "cp15", arm720t_handle_cp15_command, COMMAND_EXEC, "display/modify cp15 register <opcode> [value]"); - register_command(cmd_ctx, arm720t_cmd, "virt2phys", arm720t_handle_virt2phys_command, COMMAND_EXEC, "translate va to pa <va>"); register_command(cmd_ctx, arm720t_cmd, "mdw_phys", arm720t_handle_md_phys_command, COMMAND_EXEC, "display memory words <physical addr> [count]"); register_command(cmd_ctx, arm720t_cmd, "mdh_phys", arm720t_handle_md_phys_command, COMMAND_EXEC, "display memory half-words <physical addr> [count]"); @@ -560,32 +558,6 @@ int arm720t_handle_cp15_command(struct command_context_s *cmd_ctx, char *cmd, ch return ERROR_OK; } -int arm720t_handle_virt2phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc) -{ - target_t *target = get_current_target(cmd_ctx); - armv4_5_common_t *armv4_5; - arm7_9_common_t *arm7_9; - arm7tdmi_common_t *arm7tdmi; - arm720t_common_t *arm720t; - arm_jtag_t *jtag_info; - - if (arm720t_get_arch_pointers(target, &armv4_5, &arm7_9, &arm7tdmi, &arm720t) != ERROR_OK) - { - command_print(cmd_ctx, "current target isn't an ARM720t target"); - return ERROR_OK; - } - - jtag_info = &arm7_9->jtag_info; - - if (target->state != TARGET_HALTED) - { - command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd); - return ERROR_OK; - } - - return armv4_5_mmu_handle_virt2phys_command(cmd_ctx, cmd, args, argc, target, &arm720t->armv4_5_mmu); -} - int arm720t_handle_md_phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc) { target_t *target = get_current_target(cmd_ctx); diff --git a/src/target/arm920t.c b/src/target/arm920t.c index 3d119bd..5ade82b 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -33,7 +33,6 @@ /* cli handling */ int arm920t_handle_cp15_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int arm920t_handle_cp15i_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); -int arm920t_handle_virt2phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int arm920t_handle_cache_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int arm920t_handle_md_phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int arm920t_handle_mw_phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); @@ -700,7 +699,6 @@ int arm920t_register_commands(struct command_context_s *cmd_ctx) register_command(cmd_ctx, arm920t_cmd, "cp15", arm920t_handle_cp15_command, COMMAND_EXEC, "display/modify cp15 register <num> [value]"); register_command(cmd_ctx, arm920t_cmd, "cp15i", arm920t_handle_cp15i_command, COMMAND_EXEC, "display/modify cp15 (interpreted access) <opcode> [value] [address]"); register_command(cmd_ctx, arm920t_cmd, "cache_info", arm920t_handle_cache_info_command, COMMAND_EXEC, "display information about target caches"); - register_command(cmd_ctx, arm920t_cmd, "virt2phys", arm920t_handle_virt2phys_command, COMMAND_EXEC, "translate va to pa <va>"); register_command(cmd_ctx, arm920t_cmd, "mdw_phys", arm920t_handle_md_phys_command, COMMAND_EXEC, "display memory words <physical addr> [count]"); register_command(cmd_ctx, arm920t_cmd, "mdh_phys", arm920t_handle_md_phys_command, COMMAND_EXEC, "display memory half-words <physical addr> [count]"); @@ -1402,32 +1400,6 @@ int arm920t_handle_cache_info_command(struct command_context_s *cmd_ctx, char *c return armv4_5_handle_cache_info_command(cmd_ctx, &arm920t->armv4_5_mmu.armv4_5_cache); } -int arm920t_handle_virt2phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc) -{ - target_t *target = get_current_target(cmd_ctx); - armv4_5_common_t *armv4_5; - arm7_9_common_t *arm7_9; - arm9tdmi_common_t *arm9tdmi; - arm920t_common_t *arm920t; - arm_jtag_t *jtag_info; - - if (arm920t_get_arch_pointers(target, &armv4_5, &arm7_9, &arm9tdmi, &arm920t) != ERROR_OK) - { - command_print(cmd_ctx, "current target isn't an ARM920t target"); - return ERROR_OK; - } - - jtag_info = &arm7_9->jtag_info; - - if (target->state != TARGET_HALTED) - { - command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd); - return ERROR_OK; - } - - return armv4_5_mmu_handle_virt2phys_command(cmd_ctx, cmd, args, argc, target, &arm920t->armv4_5_mmu); -} - int arm920t_handle_md_phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc) { target_t *target = get_current_target(cmd_ctx); diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index 5d7f1e3..c3c5097 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -36,7 +36,6 @@ /* cli handling */ int arm926ejs_handle_cp15_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int arm926ejs_handle_cp15i_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); -int arm926ejs_handle_virt2phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int arm926ejs_handle_cache_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int arm926ejs_handle_md_phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int arm926ejs_handle_mw_phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); @@ -810,7 +809,6 @@ int arm926ejs_register_commands(struct command_context_s *cmd_ctx) register_command(cmd_ctx, arm926ejs_cmd, "cp15", arm926ejs_handle_cp15_command, COMMAND_EXEC, "display/modify cp15 register <opcode_1> <opcode_2> <CRn> <CRm> [value]"); register_command(cmd_ctx, arm926ejs_cmd, "cache_info", arm926ejs_handle_cache_info_command, COMMAND_EXEC, "display information about target caches"); - register_command(cmd_ctx, arm926ejs_cmd, "virt2phys", arm926ejs_handle_virt2phys_command, COMMAND_EXEC, "translate va to pa <va>"); register_command(cmd_ctx, arm926ejs_cmd, "mdw_phys", arm926ejs_handle_md_phys_command, COMMAND_EXEC, "display memory words <physical addr> [count]"); register_command(cmd_ctx, arm926ejs_cmd, "mdh_phys", arm926ejs_handle_md_phys_command, COMMAND_EXEC, "display memory half-words <physical addr> [count]"); @@ -905,32 +903,6 @@ int arm926ejs_handle_cache_info_command(struct command_context_s *cmd_ctx, char return armv4_5_handle_cache_info_command(cmd_ctx, &arm926ejs->armv4_5_mmu.armv4_5_cache); } -int arm926ejs_handle_virt2phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc) -{ - target_t *target = get_current_target(cmd_ctx); - armv4_5_common_t *armv4_5; - arm7_9_common_t *arm7_9; - arm9tdmi_common_t *arm9tdmi; - arm926ejs_common_t *arm926ejs; - arm_jtag_t *jtag_info; - - if (arm926ejs_get_arch_pointers(target, &armv4_5, &arm7_9, &arm9tdmi, &arm926ejs) != ERROR_OK) - { - command_print(cmd_ctx, "current target isn't an ARM926EJ-S target"); - return ERROR_OK; - } - - jtag_info = &arm7_9->jtag_info; - - if (target->state != TARGET_HALTED) - { - command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd); - return ERROR_OK; - } - - return armv4_5_mmu_handle_virt2phys_command(cmd_ctx, cmd, args, argc, target, &arm926ejs->armv4_5_mmu); -} - int arm926ejs_handle_md_phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc) { target_t *target = get_current_target(cmd_ctx); diff --git a/src/target/armv4_5_mmu.c b/src/target/armv4_5_mmu.c index e64021e..3380012 100644 --- a/src/target/armv4_5_mmu.c +++ b/src/target/armv4_5_mmu.c @@ -170,51 +170,6 @@ int armv4_5_mmu_write_physical(target_t *target, armv4_5_mmu_common_t *armv4_5_m return retval; } -int armv4_5_mmu_handle_virt2phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc, target_t *target, armv4_5_mmu_common_t *armv4_5_mmu) -{ - uint32_t va; - uint32_t pa; - int type; - uint32_t cb; - int domain; - uint32_t ap; - - if (target->state != TARGET_HALTED) - { - command_print(cmd_ctx, "target must be stopped for \"virt2phys\" command"); - return ERROR_OK; - } - - if (argc == 0) - { - command_print(cmd_ctx, "usage: virt2phys <virtual address>"); - return ERROR_OK; - } - - if (argc == 1) - { - va = strtoul(args[0], NULL, 0); - pa = armv4_5_mmu_translate_va(target, armv4_5_mmu, va, &type, &cb, &domain, &ap); - if (type == -1) - { - switch (pa) - { - case ERROR_TARGET_TRANSLATION_FAULT: - command_print(cmd_ctx, "no valid translation for 0x%8.8" PRIx32 "", va); - break; - default: - command_print(cmd_ctx, "unknown translation error"); - } - return ERROR_OK; - } - - command_print(cmd_ctx, "0x%8.8" PRIx32 " -> 0x%8.8" PRIx32 ", type: %s, cb: %i, domain: %d, ap: %2.2x", - va, pa, armv4_5_mmu_page_type_names[type], (int)cb, domain, (int)ap); - } - - return ERROR_OK; -} - int armv4_5_mmu_handle_md_phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc, target_t *target, armv4_5_mmu_common_t *armv4_5_mmu) { int count = 1; commit a4a1de4dd1ec3e17fa7da0f8f82c4c2854d39d5d Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Oct 21 13:07:44 2009 +0200 First cut at implementing software breakpoints for mmu read only memory diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index 3c80802..5d7f1e3 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -2,6 +2,9 @@ * Copyright (C) 2007 by Dominic Rath * * Dom...@gm... * * * + * Copyright (C) 2009 by Ã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 * * the Free Software Foundation; either version 2 of the License, or * @@ -681,8 +684,40 @@ int arm926ejs_write_memory(struct target_s *target, uint32_t address, uint32_t s arm9tdmi_common_t *arm9tdmi = arm7_9->arch_info; arm926ejs_common_t *arm926ejs = arm9tdmi->arch_info; - if ((retval = arm7_9_write_memory(target, address, size, count, buffer)) != ERROR_OK) - return retval; + /* FIX!!!! this should be cleaned up and made much more general. The + * plan is to write up and test on arm926ejs specifically and + * then generalize and clean up afterwards. */ + if ((count == 1) && ((size==2) || (size==4))) + { + /* special case the handling of single word writes to bypass MMU + * to allow implementation of breakpoints in memory marked read only + * by MMU */ + if (arm926ejs->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled) + { + /* flush and invalidate data cache + * + * MCR p15,0,p,c7,c10,1 - clean cache line using virtual address + * + */ + retval = arm926ejs->write_cp15(target, 0, 1, 7, 10, address&~0x3); + if (retval != ERROR_OK) + return retval; + } + + uint32_t pa; + retval = target->type->virt2phys(target, address, &pa); + if (retval != ERROR_OK) + return retval; + + /* write directly to physical memory bypassing any read only MMU bits, etc. */ + retval = armv4_5_mmu_write_physical(target, &arm926ejs->armv4_5_mmu, pa, size, count, buffer); + if (retval != ERROR_OK) + return retval; + } else + { + if ((retval = arm7_9_write_memory(target, address, size, count, buffer)) != ERROR_OK) + return retval; + } /* If ICache is enabled, we have to invalidate affected ICache lines * the DCache is forced to write-through, so we don't have to clean it here ----------------------------------------------------------------------- Summary of changes: src/target/arm720t.c | 28 ------------------- src/target/arm920t.c | 28 ------------------- src/target/arm926ejs.c | 67 +++++++++++++++++++++++++-------------------- src/target/armv4_5_mmu.c | 45 ------------------------------- 4 files changed, 37 insertions(+), 131 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-10-21 12:55: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 62525792e073a54f21e334764ddd9dcd2d47ff0c (commit) from a02411a15f24a9e1f0ac893e631c6a520adfdab8 (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 62525792e073a54f21e334764ddd9dcd2d47ff0c Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Oct 21 12:54:41 2009 +0200 Defined target_write_memory() to be able to handle implementing breakpoints for read only ram(e.g. MMU write protected. diff --git a/src/target/target.h b/src/target/target.h index 0f8be6f..19d8013 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -363,6 +363,30 @@ extern int target_write_memory(struct target_s *target, extern int target_bulk_write_memory(struct target_s *target, uint32_t address, uint32_t count, uint8_t *buffer); +/* + * Write to target memory using the virtual address. + * + * Note that this fn is used to implement software breakpoints. Targets + * can implement support for software breakpoints to memory marked as read + * only by making this fn write to ram even if it is read only(MMU or + * MPUs). + * + * It is sufficient to implement for writing a single word(16 or 32 in + * ARM32/16 bit case) to write the breakpoint to ram. + * + * The target should also take care of "other things" to make sure that + * software breakpoints can be written using this function. E.g. + * when there is a separate instruction and data cache, this fn must + * make sure that the instruction cache is synced up to the potential + * code change that can happen as a result of the memory write(typically + * by invalidating the cache). + * + * The high level wrapper fn in target.c will break down this memory write + * request to multiple write requests to the target driver to e.g. guarantee + * that writing 4 bytes to an aligned address happens with a single 32 bit + * write operation, thus making this fn suitable to e.g. write to special + * peripheral registers which do not support byte operations. + */ extern int target_write_buffer(struct target_s *target, uint32_t address, uint32_t size, uint8_t *buffer); extern int target_read_buffer(struct target_s *target, uint32_t address, uint32_t size, uint8_t *buffer); extern int target_checksum_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t* crc); ----------------------------------------------------------------------- Summary of changes: src/target/target.h | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-10-21 12:02:26
|
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 a02411a15f24a9e1f0ac893e631c6a520adfdab8 (commit) from 7556a93aed97c3fad2c0a904a115168cd3dd61a8 (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 a02411a15f24a9e1f0ac893e631c6a520adfdab8 Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Oct 21 12:02:04 2009 +0200 eCos synthetic target updates. diff --git a/src/ecosboard.c b/src/ecosboard.c index b537e5b..4af38e8 100644 --- a/src/ecosboard.c +++ b/src/ecosboard.c @@ -328,6 +328,7 @@ void openocd_sleep_postlude(void) void format(void) { +#ifdef CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_1 diag_printf("Formatting JFFS2...\n"); cyg_io_handle_t handle; @@ -365,6 +366,7 @@ void format(void) } diag_printf("Flash formatted successfully\n"); +#endif reboot(); } diff --git a/src/helper/types.h b/src/helper/types.h index 86b62c2..eb836c2 100644 --- a/src/helper/types.h +++ b/src/helper/types.h @@ -123,13 +123,14 @@ static inline void h_u16_to_be(uint8_t* buf, int val) buf[1] = (uint8_t) (val >> 0); } -#ifdef __ECOS +#if defined(__ECOS) + /* eCos plain lacks these definition... A series of upstream patches * could probably repair it, but it seems like too much work to be * worth it. */ - +#if !defined(_STDINT_H) #define PRIx32 "x" #define PRId32 "d" #define SCNx32 "x" @@ -151,6 +152,14 @@ typedef uint64_t uintmax_t; #define INT64_MAX 0x7fffffffffffffffLL #define INT64_MIN (-INT64_MAX - 1LL) #define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL) +#endif + + #ifndef LLONG_MAX + #define ULLONG_MAX UINT64_C(0xFFFFFFFFFFFFFFFF) + #define LLONG_MAX INT64_C(0x7FFFFFFFFFFFFFFF) + #define LLONG_MIN ULLONG_MAX + #endif + #define ULLONG_MAX 18446744073709551615 ----------------------------------------------------------------------- Summary of changes: src/ecosboard.c | 2 ++ src/helper/types.h | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-21 08:51:35
|
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 annotated tag, v0.2.0 has been created at 772a80f0d6065f45efdf4efd9fc80982c0a42080 (tag) tagging 64d998e584e0140fff2ead4dfe09f2d14b43c89e (commit) tagged by David Brownell on Tue Jul 14 09:00:00 2009 -0700 - Log ----------------------------------------------------------------- Milestone for 0.2.0 source release. bodylove (12): Merged rev 215 changes from /branches/xscale-ixp-be into trunk: Changed openocd version info creation to be more useful. - XScale DebugHandler code is now installed into - Added PKGLIBDIR define to C options. Allows to store - Enabled URL keyword expansion for enhanced version - Stripped trailing spaces (patch preparation) - Eleminated leading tabs/white space - Eleminated leading tabs/white space - Eleminated leading tabs/white space - Synced code with branch [MERGE] Merged all remaining changes between trunk and xscale big-endian branch. - Added example config and startup-script for a XScale IXP42x system drath (109): - prepare OpenOCD for branching, created ./trunk/ - fixed some spelling errors (thanks to Andrew Dyer) - the 'help' command now takes an optional argument to display help only on a certain command (thanks to Andrew Dyer for this enhancement) - keep additional information for decoded instructions - added support for AT91SAM7A3 flash (patch from andre renaud, thanks) - added "version" command (patch from John Hartman, thanks) - changed use of bzero (deprecated) to memset (thanks to Spen for pointing this out) - fixed bug in Thumb sw breakpoint handling (thanks to Spen for this patch) - Added support for native MinGW builds (thanks to Spencer Oliver and Michael Fischer) - you still need to install GiveIO (not part of OpenOCD) - added configurable delays after reset lines get deasserted. useful if reset circuitry keeps lines asserted for too long. - allow building for MinGW using either -mno-cygwin or the MinGW gcc - fixed a minor problem with the GDB server that could drop the first packet (non-fatal) - fixed jtag_n[st]rst_delay. time is now miliseconds (as documented), not microseconds - added support for FreeBSD ppi (parallel port access similar to /dev/parport on linux) (thanks to Darius for this patch) - added support for the Signalyzer USB->JTAG dongle (www.signalyzer.com) - updated configuration examples, installation instructions and README (including list of supported JTAG interfaces) - fixed bug in .cfg files. Thanks to Michael Fischer for noticing this. - renamed jtag_interface_t.support_statemove to jtag_interface_t.support_pathmove (it is used to indicate jtag_add_pathmove support) - updated version info in openocd.c - made bp command more verbose - endianess fixes everywhere but in the flash code. flashing might still be broken on big-endian targets and/or hosts - added missing AT91RM9200 files - made lpc2000 code endianness safe (support big-endian hosts, target is always little) - added debug output for D/I FSR and FAR (arm920t) - integrated patch from Magnus Lundin that fixes at91sam7 flash timing bugs and possible endianness problems (big endian hosts) - free working area used to store flash write buffer - set the T bit in the CPSR when the core was executing in Thumb state. Mask the T bit from the CPSR for all CPSR-writing operations - allow writes to second flash bank on STR71x devices (cleaned up sector list building) - str9x flash support (Thanks to Spencer Oliver) - fixed regression in gdb_server.c (Thanks to Michael Fischer for finding these bugs) - added support for American Microsystem's M5960 (FT2232 based USB JTAG interface) - allow FT2232 devices to be opened by serial number instead of device description ('ft2232_serial <serial>' command) - fixed endianness handling in arm7_9_read_core_reg (thanks to Magnus Lundin for reporting this) - several small fixes (thanks to Magnus Lundin and Spencer Oliver) - correctly enter debug state on a "soft_reset_halt" command - added support for the oocd-link (http://www.joernonline.de/dw/doku.php?id=en:projects:oocdlink) - added a PLD (programmable logic device) subsystem for FPGA, CPLD etc. configuration - checked in missing configure.in changes for GW16012 support - disabled FT2232 debug output (that code should be fairly stable) - fix incorrect parsing of whitespace in command.c (thanks to Magnus Lundin) - Added support for ARM926EJ-S based cores - disabled JTAG debug output - disabled use of single-step bit for EmbeddedICE version 6 cores - merged several changes from XScale - add missing parentheses around macro parameters (thanks to Matthias Bauch for noticing this bug and providing a fix) - fixed libftdi initialization - reworked file i/o. every fileaccess (target, flash, nand, in future configuration, too) should now go through the fileio subsystem - added missing files for last commit - fixed arm926 cp15 command bug (thanks to Vincent Palatin for this patch) - merged XScale branch back into trunk - added "arm9tdmi vector_catch ['all'|'none'|'vec1 [vec2 [...]]']" command - added support for Turtelizer 2 (USB JTAG interface) (Thanks to Michael Fischer for this patch) - disabled excessive debug output in jtag.h - correctly mask out bits that aren't part of a copied buffer - allow multiple USB vendor and product ids when searching for connected FT2232 based JTAG interfaces (thanks to Werner Almesberger for this patch) - explicitly disable monitor mode on ARM7/9 targets - added support for error handlers to JTAG scan commands (jtag_[plain_][ir|dr]_scan) - improved ETB trace output - further work on ETB decoding (not yet functional) - split fileio handling into fileio part and image handling - add missing image handling files - add missing file src/target/trace.h - reworked image handling to support multiple sections (tested with ihex file containing gaps) - add support for ELF images (thanks to Vincent Palatin for this patch) - added manpage for OpenOCD (thanks to Uwe Hermann) - merged support for Cortex-M3 from cortex-m3 branch (thanks to Magnus Lundin) - added stellaris.[ch] missing from Cortex-M3 merge - added support for pseudo image type "mem", currently only used for etm analysis: "etm image <target#> <dummy base address> mem" - added support for Intel/Marvel PXA27x (XScale) targets - fixed endianness helper macros (thanks to obilix and wiml for finding and fixing this bug) - added support for Asix Presto JTAG interface (thanks to Pavel Chromy and Asix for making this addition possible) - reformat src/jtag/bitq.c (thanks to Pavel Chromy) - documentation fixes (thanks to Uwe Hermann) - restrict direct parallel port access to x86 platforms (thanks to Vincent Palatin) - calculate cycles since last executed instruction when cycle-accurate tracing is enabled - add missing configure.in change from last checkin - cleaned up cycle counting in ETM analysis - renamed M5960 USB JTAG to "flyswatter" - changed mingw host detection to *-mingw instead of *-*-mingw to work with i586-mingw32msvc-gcc - bumped version information - reworked presto.c to allow use of either FTD2XX or libftdi (libftdi not functional yet). Configure option changed from --enable-presto to - corrected automake script - fixed several bugs in flash writing code (thanks to Pavel Chromy) - update jtag_speed setting when changing it during runtime with a FT2232 based interface - renamed "xscale dump_trace_buffer" to "xscale dump_trace" and added code for it - update file size when writing to a fileio - correctly initialize start address for XScale trace buffer decodes in fill-once mode - added support for setting JTAG frequency on ASIX PRESTO (thanks to Pavel Chromy) Patch by Michael Schwingen that - fixed ETM configuration register decoding - use correct SCAN_N check value (disabled by default) - added tms470 flash support (thanks to Chris Kilgour for this patch) - fixed 'make distcheck' (thanks to Theodore A. Roth for this patch - ignore data aborts during gdb memory read packets by default, and return 0x0 instead - Fix problems with stuck telnet sessions. Thanks to Ãyvind Harboe for this patch. - add support for the majority of the Samsung ARM SoC family, S3C2410, S3C2412, S3C2413, S3C2440 and S3C2443 (thanks to Ben Dooks for this patch) - Use NAND extended geometry information (thanks to Ben Dooks for this patch) - fix for feroceon CP15 register access (thanks to Niolas Pitre for this patch) - fixes possible crash when GDB connection is closed while target is running due to log callback sending messages to connection which does not - concretize JTAG state transition rules (previously implied behaviour is now documented) - convert all files to unix line-ending - fix bug in ft2232 pathmove (thanks to Michael Bruck for the patch) - fix typo in ep93xx jtag driver to allow OpenOCD compilation on ARM (thanks to Uwe Hermann for the patch) - fix line-endings - Added coding style to README - fix warnings during configure cause by ecosboard. default to no, if host cpu isn't arm. - Flash auto-erase is disabled by default - fixed xsvf_add_statemove() - fix a off-by-one error in the buffer read/write code that checks for a address wrap duane (103): Test checkin from commandline jtag newtap change & huge manual update Fix for Hiroshi Ito discovery of mis-aligned memory allocation Manual tweak based on feedback from mailing list the iar dongle works Added Joern Kaipf link for oocdlink Test of commit email from duane Typos in config files found by Sergey Lapin Fix from Kees Jongenburger Fix from Kees Jongenburger (Part Duex) More fixes thanks to Kees Jongenburger Updates and fixes from Kees Jongenburger Typos found by miceal catudal Build Permutations with ftd2xx and libftdi addressed. Also added a new se of regression makefiles to build openocd in multiple ways Renamed build.tests to build.test1 Added documentation for build test case1 From Dirk Behme - Further docu fixes Warning removal from lou...@fi... Added dongle VSLLINK - from Simon Qian Quoteify the FT2232 description list, and a missed fix from Dirk Behme about jtag tapisenabled From Lou...@fi... Missed support for without --exec-prefix and ftd2xx stuff Some systems report linux as host, others linux-gnu... grrr From Dirk Behme - another set of typos Added note to user manual for packagers of OpenOCD Tweaks - old crusty code with some warnings & errors - minor stuff Missed the svn add on earlier commit, duh Warnings cleanup ... finish up earlier commit Added another test build configuration Updates from SimonQian Added HostOS variable Accept/create both A and Non-A ft2232 based descriptions Patch from Dimitar Dimitrov adding support for Olimex ARM-JTAG-EW Added VID/PID pair to olimex-jtag-tiny-a the non-a version already has the vid pid Commands: reg, profile, ocd_mem2array, ocd_array2mem, fast_load, etc only work *IF* there is an actual target Added -endstate to irscan and drscan to support beagleboard (omap3530) Commit OMAP3530 and TI_BEAGLEBOARD config files from Kees, Dick, Derk, and others Added eol-style props Remove warning commit test from Duane printf() warning fixes due to uint32_t change-over C99 Type updates, include inttypes.h - it is catagorically required C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes C99 printf() -Werror fixes Add a growable sprintf memory buffer library Add quick target - full cygwin builds take a long long long time, this shortens the edit/build/debug cycle Add support for ATMEL AT91SAM3U - CortexM3 Family Fixes from Oleksandr Tymoshenko "go...@bl..." Switch to strotk() grr.... Change from alloca() to malloc() Add Breakpoint/Watchpoint unique ID to help debug hardware debug register leakage Refactor code, create target_state_name() A bit more log detail about connections comming and going Remove extra newline from debug log message Simple warning fix kc8apf (94): AXM0432 layout for FDTI provided by Alan Carvalho de Assis (Freescale) Allow -expected-id to be specified multiple times when creating a jtag tap Change tap_state naming to be consistent with SVF documentation. Clean up references to old tap_state names Add JTAG tap events for enable/disable - Update tap_state_strings to correspond to SVF state names - rlink interface support from Lou Deluxe <lou...@fi...> Fix distcheck failure Fix to install manpage as part of 'make install' by Uwe Hermann <uw...@he...> Fix guess-rev.sh where the builtin echo doesn't support -n Fix handling of thumb disassembly in armv4_5 disassemble. Courtesy of Adam Dybkowski <ady...@wp...> SVF player courtesy of Simon Qian <sim...@Si...> imx21 config provided by Alan Carvalho de Assis <ac...@gm...> Fix support for ADuC702x flash. Courtesy of Michael Ashton <da...@gt...> Ignore src/svf/Makefile.in Fix 'make maintainer-clean' courtesy of Zach Welch <zw...@su...> Fixes for handling release versions Add axm0432 interface config courtesy of Alan Carvalho de Assis <ac...@gm...> AT91SAM9260 and Olimex changes by Dean Glazeski <dn...@gm...> Fix for incorrect filename in include for at91sam9260 in unknown-board-atmel-at91sam9260.cfg Add udev rules to contrib. Courtesy of Uwe Hermann <uw...@he...> vsllink support for stable clocks by Simon Qian <sim...@Si...> Add TRST support to xsvf tools. Courtesy of Dick Hollenbeck <di...@so...> Search path fixes for MinGW builds. Courtesy of Dimitar Dimitrov <di...@gm...> Fixes for svf player by Simon Qian <sim...@Si...> xvsf player fixes by Dick Hollenbeck <di...@so...> Add uncrustify config file and helper script Doxygen config file - Cable driver helper API courtesy of Dick Hollenbeck <di...@so...> A few more usages of TRUE and FALSE to remove Use C89/C99/C++ compliant boolean types refactor jlink_execute_queue courtesy of Zach Welch <zw...@su...> fix jtag run/idle state name courtesy of Jeff Williams <je...@ga...> and Zach Welch <zw...@su...> Fix use of wrong format conversion for size_t (%zu instead of %u) Add D2XX support for OS X courtesy of Piotr Esden-Tempski <pi...@es...> Shrink JLink buffer sizes to specified 2KB courtesy of Jeff Williams <je...@ga...> and Zach Welch <zw...@su...> Fix environ declaration for non-glibc systems Whitespace cleanup from David Brownell <da...@pa...> ETM/ETB documentation from David Brownell <da...@pa...> Consolidate target selection code into single get_target() that handles both names and numbers. Provided by David Brownell <da...@pa...> Fix logically inverted comment Relocate documentation on working area to better align with use of new syntax. Provided by David Brownell <da...@pa...> JTAG state table updates (short table still disabled). Provided by Dick Hollenbeck <di...@so...> PATCHES updates from David Brownell <da...@pa...> ftdi_set_interface correctness by Strontium <str...@gm...> Add jtag_queue_command() by Michael Bruck <mb...@di...> Add jtag_queue_command() by Michael Bruck <mb...@di...> [2/8] Add jtag_queue_command() by Michael Bruck <mb...@di...> [3/8] Add jtag_queue_command() by Michael Bruck <mb...@di...> [4/8] Add jtag_queue_command() by Michael Bruck <mb...@di...> [5/8] Add jtag_queue_command() by Michael Bruck <mb...@di...> [6/8] Add jtag_queue_command() by Michael Bruck <mb...@di...> [7/8] Add jtag_queue_command() by Michael Bruck <mb...@di...> [8/8] Change last_comand_pointer to last_command_pointer by Michael Bruck <mb...@di...> Fix fallout from r1818 FT2232 support for non-7-cycle state moves by Dick Hollenbeck <di...@so...> JLink support for non-7-cycle state moves by Dick Hollenbeck <di...@so...> Enable non-7-cycle state table for FT2232 and JLink Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Spencer Oliver <sp...@sp...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Michael Bruck <mb...@di...> Author: Holger Schurig <hs...@ma...> Author: Ãyvind Harboe <oyv...@zy...> Author: Thomas Kindler <ma...@t-...> Author: David Brownell <da...@pa...> Author: Michael Bruck <mb...@di...> Author: Rick Altherr <kc...@kc...> Author: David Brownell <da...@pa...> Author: Raúl Sánchez Siles <rsa...@in...> Author: Raúl Sánchez Siles <rsa...@in...> Author: Raúl Sánchez Siles <rsa...@in...> Author: Raúl Sánchez Siles <rsa...@in...> Author: Simon Qian <sim...@Si...> Author: Nicolas Pitre <ni...@ca...> Author: Nicolas Pitre <ni...@ca...> Fix eol-style on guess-rev.sh mifi (80): - added patch to display device information as INFO too - Fixing two compiler warnings - added patch from Dominic to unlock the ATMEL flash in cfi_read_atmel_pri_ext git-svn-id: svn://svn.berlios.de/openocd/trunk@228 b42882b7-edfa-0310-969c-e2dbd0fdcd60 Sorry, I have forgotten to add a description for the last version, where Corrected typo (to many brackets) - added the patch CFI-BE-Fixes-Blockwrite-Support.diff - initialize num_sectors and sectors in handle_flash_bank_command. - change error message for image_open error - removed some compiler warnings The changes allows the "script" command to be used from within - added patch to corrected argument of image_open in handle_flash_write_image_command - fixed relocation problems with image loading. Relocation is handled - only some cosmetic changes, convert \r\n to unix - added patch for new flash functionality like: - this patch allows OpenOCD running under eCos to access files via tftp - corrected working_area of LPC2129 script - added gdb flash fixes patch - added patch for faster start of OpenOCD - added patch "remove error handler as planned" - added patch to fix brocken STR9 line - added patch to fix crash in load_image on corrupt elf file or out of memory. - added patch to check some malloc problems. - added autoprobe functionality - added patch to solve the reset problem with arm9 and cortex which Spen had found. - added patch to solve problem with AT91SAM9260 (dirty register) - added patch to access cp15 register (XScale) - added patch to change pathmove handling - added starting point for development on a ngw100 eval board - removed "starting point" for ngw100, will add it again if it is working - added patch to Improving progress/error output for telnet & GDB monitor - added patch to stop DEBUG messages to be forwarded to telnet/gdb. - added patch which fixed big/small endian problems on non-x86 host CPUs. - added patch to make single-stepping more resilient - added patch to solve problem with AT91SAM7SE MCU have 3, rather than just 2 GPNVM bits. - cosmetic changes to print out version without line number/time - added patch to remove count and time information from log_printf - added a test document as a starting point - added STR710 example which I used for Eclipse debug testing - added test result for str710, and test description - added str912 test example, and test result - added lpc2148 test example, and test result - added lpc2294 test example, and test result - added sam7s256 test example, and test result - added sam7x256 test example, and test result - added at91r40008 test example, and test result - updated svn:eol-style prop to native for AT91R40008 - added example for testing the JTAG speed with a FT2232 device - removed warnings "xxxxx" might be used uninitialized in this function (arm_simulator.c) - added test result for r423 - added str912/str710_program.script - added new test results - added test results - remove AC_C_VARARRAYS and set check of autoconf back to 2.59 - added testing binaries - added test results for r592 - corrected typo in cfg file - smoketest for r651 - added support for ft2232/jtag_khz - corrected rounding in ft2232_khz - added/renamed interfaces, remove jtag_speed from the interface part - added patch from uwe hermann, thanks for the hint. - added arm-usb-ocd.cfg and signalyzer.cfg to the interface - added smoketest result for r657 - replaced JLINK_xxxx command defines by EMU_CMD_ from the - removed obsolete cmd JLINK_TAP_SEQUENCE_COMMAND, use EMU_CMD_HW_JTAG instead - corrected copy/paste type and renamed jlink_usb_read_result to jlink_usb_read_emu_result - swap processing of reset handling. First srst and than trst. - comment out usb_set_altinterface, because it is not working under Mac OS X. - changed some buffer defines to increase performance - renamed EMU_CMD_HW_JTAG to EMU_CMD_HW_JTAG3 - added check for max. value of jtag_speed in ft2232_khz. - added target and event script for the eir-sam7se512 target The following patches was applied: Added functionality to support jtag_khz for the jlink. Partially fix USBprog and JLink adapters on XScale target Added jtag_nsrst_delay 200 and jtag_ntrst_delay 200 to the LPC2294 target. Change the setting for the sam7se512 and sam7x256 Added the options calc_checksum to the flash driver. Set default for want_ftd2xx_highspeed to "no" instead of "maybe" mlu (25): Added patch for Luminar Micors Fury class devices (Joe Kroesche) - trying to remove a breakpoint with target running should not exit(-1) from OpenOCD - Support for AT91SAM7xx512 chips - Support for AT91SAM7xx512 chips - added ft2232_latency command - Fixed display of sector sizes in flash.c Updated list of LMI partnames Changed at91sam7_ecr working area to a valid SRAM adress for the AT91SAM7S/X target family Cortex-M3 cleanup and performance patch Slight improvement in run_algorithm register restore. Solve problem with single stepping. Improved (for humans) error reporting for flash programming errors. Fix str_to_buf problem, thanks Andy Chenee Break ft2232_execute_quie into smaller functions, follows restructure of jlink.c Fix ft2232 TX buffer overflow Corrected statement order Added arm_adi_v5.c/h, to replace cortex_swjdp.c/h. Better conformance to ARM Debug Interface rev 5 documentation and remoed code specific to the Cortex-M3 targets. Changed armv7m and cortexm3 to use nev arm_adi_v5 instead of cortex_swjdp. Deleted depreciated files ( new versions are arm_adi_v5.c/h ) Added dap baseaddr and dap apid commands Correctedout buffer size and missing jlink_tap_init() call. More error logging for DAP errors Clear FLASH_SR error flags after flash errors to avoid reset befor further flash operations. Small changes that might improve stability. Added (BUILD_JLINK==1) condition to us new tables with JLink ntfreak (297): - added support for ST flashlink cable - added support for Hitex comstick. -- corrected embedded ice definitions - added mingw elf patches from Vincent Palatin - str9xpec driver was using stricmp, changed to strcmp for posix compatibility - ST STM32x cortex support added - corrected stm32x_handle_options_write_command, incorrect options printed - motorola s19 file loader added - fix build issues when not using autoconf/automake to build - flash autoerase <on|off> cmd added, default is off - flash banks are calculated and erased prior to write (flash write_image only) - cleaned up str7, str9 and stm32 flash drivers - add verify_image command - corrected str91x bank1 programming issues - reset_run now works as expected on cortex-m3 - added support for Hitex STM32 Performance Stick - added patch by Ãyvind Harboe to Intel Hex Start Segment Address Record (Type 3) - removed flash write_image - binary compare function has been moved to verify_image command - fixed problem when write_image is called multiple times - minimum autoconf 2.59 is now required and verified - due to issues with AS_HELP_STRING - add support for extended gdb packet R (restart), requires gdb to be started with target extended-remote - rename flash_init and flash_erase to flash_init_drivers and flash_erase_address_range - stops conflicts with redboot. Thanks Ãyvind Harboe - added faster gdb packet handling (thanks to oyvind harboe for the patch) - _DEBUG_GDB_IO_ was left on by mistake - fix gdb packet retransmission omission - debug handler file not closed - (thanks to oyvind harboe for the patch) - add missing files from previous commit (tms470 flash driver) - add support for cortex_m3 target_request debugmsgs - updated docs for cfi command, added missing ft2232_layout names fixed incorrect elf segment size - Thanks Ãyvind Harboe Added patch to stop SEGFAULT with missing jtag config lines. Thanks Ãyvind Harboe - fixes issue with reset and arm926ejs core. Thanks Ãyvind Harboe - added synchronous reset patch, Thanks Ãyvind Harboe - added synchronous wait/resume patch. Thanks Ãyvind Harboe - add autoprobe support to the stm32 flash driver - stm32 flash driver now checks for correct target - telnet prompt behaves correctly for new synchronous halt/resume/reset commands - add autoprobe support to flash info command - added check for revA silicon in stm32 flash driver - fix programming issue with lpc2101/2 - fix xscale memory leak and warnings. Thanks Ãyvind Harboe - fix issue with telnet prompt while gdb running - cleanup and remove time() warning - solve lots of problems with stuck GDB connections, making it impossible to connect to GDB, handle timeout of acknowledgement, etc. - combine similar functions in telnet_server.c - Added a "User:" debug level. These are messages that are intended for the user and are part of normal operation. - add new non-cfi SST flash device. Thanks Ãyvind Harboe - removed a raft of unecessary exit() calls. Issuing a reset will solve these ails. - fix broken JTAG error handling - arg list now correctly released on error. Thanks Ãyvind Harboe - reapply fix with telnet prompt while running/halting gdb - Fixed bug in pathmove for XScale - add search paths via new arg -s (-search). Thanks Ted Roth - fix bug when using full paths to config files. Thanks Ted Roth - remove build warnings - code reformat (Thanks Pavel Chromy) - fix issue when target is already halted - correct line endings from previous commit - fix line-endings - added svn props - svn file props set to LF endings - update openocd.texi to fdl 1.2 - fix bug with emulated cortex_m3 dcc channel - added svn prop eol-style native - updated svn:eol-style prop to native - contrib directory added - added svn prop svn:eol-style native - added svn prop svn:eol-style native - correct spelling typo in stm32x flash driver - The elf loader incorrectly assumed that the program header always follows the ELF header. (Thanks Michael Bruck) - added more TARGET_HALTED checks for the read/write_memory handlers - add stm32 target script - 16 and 32 bit unaligned accesses supported - armv7m control register now set as dirty when switching context - changed jtag_add_reset errors to warnings - updated docs with new commands/features - gdb server was incorrectly sending null terminator on qXfer:features:read: packet - rename log functions to stop conflicts under win32 (wingdi) - added note to docs about gdb 6.8 and memory map support - add missing svn props - due to previous patch adding AC_C_VARARRAYS, autoconf v2.61 min required - single core context used, removed debug context as thought unnecessary. - added svn props for newly added parport.cfg - split str71x driver into banks - added new and missing target scripts - stm32stick and str730 - correct stm32stick config script - flash.c change stricmp to strcmp - update docs for flash write_image command - set erase flag on sector - set lpc288x[ch] svn file props - added stm32 stick and luminary eval boards interface configs - fix typo in openocd.texi - added svn props for newly added files - added svn props for newly added files - added svn props for newly added files - change str9 flash controller to read array after a level 1 protect - incorrect ram size for lm3s811 target script - luminary flash now loader polls when finished - added ARMV7_GDB_HACKS define to armv7m.h, enabling all gdb hacks to be enabled/disabled for testing - add cortex_m3 variant luminary to fix reset issue with asserting SRST - updated cortex_m3 docs regarding luminary reset behaviour - stm32x default to 128k if flash size failed. - added new device to luminary flash driver - add missing svn props - add -lusb to link for using libftdi under win32 - added info about libftdi support under win32 - updated docs for ft2232_vid_pid command - added svn props for newly added files - restored tabs and formatting - added jlink support, based on Jürgen Stuber patch - remove error message on shutdown - add support for newer high density stm32 parts - jlink jlink_execute_queue returns result - removed compiler warnings - update sectors on stm32x mass erase - added stellaris flash mass_erase command - updated docs for new stellaris mass_erase command - corrected error with stm32 page calculation - fix issue if jlink sends result in single usb in packet - fixed typo in wp command flash_write will attempt to pad image sections - moved flash erase_check target code to target.c - stellaris flash driver changed warning to info - added checksum_memory and blank_check_memory for xscale - str9 driver remove the duplicate target_free_working_area and reformat spaces to tabs. - luminary, stm32 and str7 flash driver error cleanup - fix jlink accessing incorrect buffer element - erase bank using bank erase rather than each sector - stm32 erase will use mass_erase if all banks selected - error message cleanup in jlink driver - probe incorrect for high density stm32 flash - removed duplicate cortex_m3_register_commands - added missing install entries for eir-sam7se512 target - fix compile errors when _DEBUG_INSTRUCTION_EXECUTION_ is defined - fix reset_halt issue with certain arm cores - address not set in embedded ice reg - added svn props for newly added files - update docs for new target_script events - allocate target_type_t structure for each target, fixes issue when multiple targets of the same type are located on the jtag chain - fixed line endings with commands.tcl - added jtag_khz to target scripts - added event scripts for str73x and str75x targets - added svn props for newly added files - added search for libdl - fixed build issues with win32 - fix typo in memory.tcl - fix duplicate log entry - command_run_line will only search once for the command, and execute if found - apply correct formatting to openocd.c - fix pre_resume script not being called - removed target_process_events as only used in handle_resume_command and events will be called anyway by poll - target_resume is now synchronous with 5sec timeout - only check normal resume, not debug resume - added luminary libftdi interface config - adding missing install entry for luminary-libftdi.cfg - added svn props for newly added files - configure check added for tclsh - remove requirement for file2c.tcl - fix issue when building in separate build dir - added svn props for newly added files - remove unused objcopy from configure.in - stm32 flash driver correctly handles early silicon - reverted resume_target to old behaviour - fix incorrectly registered function openocd_array2mem - remove build warning from keep_alive - updated texi for removed daemon_startup command - added svn props for newly added files - add missing quotes from CFLAGS_FOR_BUILD - fix bug with stm32 high density write protection - more fixes to high density stm32x flash driver - fix typo - fix typo in jtag_add_end_state - comment about dummy ack '+' char from gdb - merged mips target into svn trunk - added run_and_halt_time to deprecated/removed functions section - fix target_examine declaration - added svn props for previously added file - remove Jim_InitEmbedded warning - correct BUILD_ECOSBOARD definition is server.c - added svn props for newly added files - fix build issues under win32 (mingw) - added svn props for newly added files - added missing parport configs to texi - fix win32 build issues from previous jim patch - add support for new gdb QStartNoAckMode, which disables sending of ack's between remote packets - clear any existing breakpoints/watchpoints when restarting in gdb extended remote mode - added myself to copyright on files i remember adding large contributions for over the years - fix typo's - renamed x7926 driver to aduc702x to match other flash drivers - update docs for aduc702x flash driver - convert spaces to tabs in at91sam7.[ch] - at91sam7.c remove build warnings - remove build warnings - remove build warnings from mips_m4k.c and arm11.c - remove build warnings - fix tcl_port typo in docs - make docs more readable - update docs deprecated section to include links to new commands (if any) - remove texi warnings - add link in texi docs - fix native mingw build if gettimeofday not defined. - remove build warning - fix issue with jlink/libusb timeout under linux - remove build warnings - slight mips32 cleanup/reformat - fix crash when variant for mips32 target not given - correct the register hi/lo read - wrong way round - stops multiple calls to examine from allocating the breakpoint arrays - add support for hardware breakpoints to mips32 target - fox small typo in handle_irscan_command - preserve cortex_m3 C_MASKINTS during resume/step - fix issue with gdb_target_to_reg missing second byte - add new cortex_m3 maskisr cmd - correct corrupt target configs - fixes segfault using the targets cmd if multiple targets defined - stm32x flash driver: add support for low density devices - fix issue with luminary flash driver and tail bytes - change mips registers to std names - fix incorrect svn props from last commit - cleanup target config scripts - incorrect str9 irmask used in config files - str9xpec driver now working with new jtag tap config - update texi to describe str9xpec driver flow - fix illegal memory access in unregister_command function - typo with flash bank help command - added Axiom AXM-0432 to texi - incorrect url in last commit for usbjtag - check cortex_m3 FPB is enabled when setting hardware breakpoint - remove target specific variant and use target->variant member - add ability for openocd to communicate to gdb using pipes (stdin/stdout). - add missing svn props from r1243 commit - fix rlink build under native win32 (mingw) - add missing svn props from r1270 commit - fix missing/incorrect svn file props - add gdb pipe support to native win32 (--pipe option) - add missing svn props from r1299 commit - minor doc updates regarding tap creation and gdb connection using pipes - a few more docs tweaks Updates and fixes for the manpage from Uwe Hermann - added mips software breakpoint support - fix mips issues with newer versions of gdb - fix LDFLAGS typo in configure.in - add missing svn props and fix incorrect line endings from last commit - add missing svn props from 1323 commit - add missing bitq and rlink files to distribution - add guess-rev.sh and contrib/libdcc to dist - make guess-rev.sh work with msys - revert guess-rev.sh to using bash - remove unused includes, fixes build issues under FreeBSD - add --enable-release to docs - fix issue with configure when building srcdir != builddir - AC_CHECK_FILE not supported when cross-compiling - fix native win32 build issues - issue warning when flash image exceeds configured flash size. - guess-rev.sh now works as expected when build_dir is not the same as src_dir - stm32x flash driver - add support for stm32105/107 (connectivity line) - add missing svn props from previous commit - add svn props from previous commit - fix small typo in texi (section HostOS) - add support for standalone rlink - fix issue with cortex_m3 reset run. Thanks Perry Hung - fix incorrect stm32stick.cfg - remove build warnings - fix incorrect str9comstick cfg - revert texi changes from rev 1418 as it breaks build - docs patch from Thomas Kindler - add missing svn props from previous commit - fix another typo in str9comstick.cfg - update str9 and stm32 comstick configs - fix typo's in last commit - add missing usbprog config. patch from Uwe Hermann - add svn props from previous commit - add openocd coding style to texi - fix at91rm9200 warning. Thanks Zach Welch <zw...@su...> - remove environ warning under win32 build - fix signed/unsigned build errors under win32. Thanks Zach Welch <zw...@su...> - vsllink update from SimonQian [sim...@Si...] - fix win32 build after svn 1511 changes - fix win32 build - add missing svn props from svn 1565 commit - fix build issue when HAVE_ELF_H is not defined - add missing svn props from svn 1768 commit - add missing svn props from svn 1798 commit - add support for cortino jtag interface - hack added to fix a issue with v5/6 jlink - change signature for adi_jtag_dp_scan and adi_jtag_dp_scan_u32 to use swjdp_common_t *swjdp instead of arm_jtag_t *jtag_info - add support for different TAR autotincrement sizes as per ARM ADI spec. - fix texi/pdf issue created in svn r2039 - update openocd online doc url's - fix bug introduced during r1962 - fix break caused by r2208 when using --pipe option - correct configure ftd2xx highspeed test - fix issue when using gdb_port cmd - remove cygwin build warnings in at91sam3.c - correct stm32 connectivity line programming as per latest manual - add stm32 connectivity line tapid to stm32.cfg - fix build when using a cross compiler - do not try and run any host tools - change sleep to usleep - fixes issue under win32 build Gary Carlson <gca...@ca...> oharboe (1059): - added time command cosmetic fixes to debug output + phasing out printf() in favour of logging system. From Pavel Chromy <ch...@as...> added svn:ignore for files generated by bootstrap + build process. sharpend JTAG docs w.r.t. hw fifo implementations and retired jtag_cancel_queue() which is inheritely incompatible with a hw fifo concept. debug_level 3 now prints seconds since start of openocd disable cfi_write_words(). Broken for spansion, fallback - fixed target->type->poll() return value - added -c option that will execute an openocd command move options handling to separate file to better support embedded implementations of OpenOCD - added "xscale fast_memory_access" which speeds up memory Michael Bruck spotted an omission in svn 322 - "flash write_binary" is now "flash write_bank" to clarify the focus of the - using ERROR_COMMAND_SYNTAX_ERROR to print syntax in a couple of places dos2unix fix. committed bugfix from Michael Bruck From Michael Bruck - Fix target library path problem w/Windows Fix from Pavel Chromy. Pavel Chromy style fixes. formatting. Pavel Chromy - jtag minidriver work in progress Next step in the JTAG minidriver. This should be fairly close to the final thing, but jtag_add_reset() minidriver gaffe fixed. oopss.. another jtag minidriver reset gaffe. fix naming conflict under Windows. Nicolas Pitre listed some more devices. Uwe Hermann fixed some warnings. Uwe Hermann Add @dircategory and @direntry to the info page -- they're used to add the openocd info page to the global index of info pages in the system (usually /usr/share/info/dir). - Added TARGET_REQ_DEBUGCHAR target_request debugmsg. This eCos flash driver. lingering change for eCos flash driver jtag_add_shift() fn - minidriver work in progress. fix copyright. added some code that will be used in upcoming minidriver work. code to be used in upcoming minidriver work. fix from Pavel Chromy Pavel Chromy cleaned up checks for halted, error messages, etc. fix gaffe. Pavel Chromy - cleanup error messages small line ending cleanup. numerous fixes from Uwe Hermann Uwe Hermann: Simplify the manpage by removing lots of redundant information which is Pavel Chromy spotted a leak Pavel Chromy spotted duplicated newlines gaffe from yours sincerely. fixed newline gaffe in OUTPUT() changed to eCos license. Michael Bruck: Michael Bruck: Summary: passing of variable argument list reduced, strings sent to logging are now formatted just once - more efficient. Pavel Chromy: clarify error messages do not write single chars to log file. - clean up target output strings a bit - image.c and fileio.c now uses logging to propagate error strings. remove warnings. formatting fixes from Pavel Chromy lingering patch from Pavel Chromy. Uwe Hermann: mproves the manpage text a bit and adds the Pavel Chromy: add missing newlines. Uwe Hermann: Uwe Hermann: Updated version which applies cleanly after the recent whitespace fixes. Pavel Chromy fix: the guess-rev.sh scripts to retrieve SVN revision returns the result including new line Uwe Hermann: Add a --version switch for openocd. Tweaked logging output. fixed stack corruption. Introduced when _check_value was phased out. added an #error in case anybody tries to compile that broken code. error handling fix. wip. fixed gaffe in jtag_add_shift() log_remove_callback Now uses jtag_add_shift() via embeddedice_write_reg_inner(). improve DCC bulk write performance by using jtag_add_shift() + tweaked embedded ICE communication. backed out jtag_add_shift() fix memory corruption regression introduced in 335 wrote up explaining why tests are done on committed code. wrote up explaining why tests are done on committed code. target scripts for test suite. fixed FSF address. Uwe Hermann. Uwe Hermann tightned up comments, etc. to follow OpenOCD policy some comments from Dominic added at91sam9260.cfg, nslu2.cfg, pxa255.cfg, pxa255_sst.cfg added fill_malloc test. Not quite sure what to do here yet, but it would be good to have something... I fixed all the targets even though Michael Bruck: Michael Bruck: fix warnings. Michael Bruck - fix warnings. Fixed GDB timeout crash - regression introduced back when log_add/remove_callback was added. Bogus error message in GDB removed telnet_port can now be invoked multiple times * fixed malloc corruption in target->debug_reason Pavel Chromy: memory leak in at91sam7 flash driver, possible incorrect pointer conversion in gpnvm command handling, added jtag_add_dr_out(). Better for hw fifo, same for software fifo. - This speeds up dcc arm7_9 bulk write a little bit and exercises the jtag_add_dr_out() codepath warnings & comments fixes. make debug code w.r.t. incorrect args for bypass stricter. Michael Bruck: 64 bit va_list fix for crash Michael Bruck: Pavel Chromy: performance tweak of gdb_put_packet_inner() removing malloc and avoiding memcpy of larger blocks of data, Pavel Chromy: faster alloc_printf() comment. tms is never referenced, confusing old code left behind probably. use jtag_execute_queue() instead of jtag->execute_queue() retired Pavel Chromy: va_copy should always be paired with va_end. Cosmetic fixes from Uwe Hermann removed excessive debug output. Perhaps a debug_level 4 should be introduced? Hopefully it can be avoided as this was the only case where debug output was going through the roof. Removed code that inserted prompt after printing asynchronous information. Current implementation was broken beyond repair. wi-9c target scripts alloc_printf and alloc_vprintf Pavel Chromy, the patch fixes an issue with PRESTO & FTD2XX under Linux. minor corrections for target scripts. Added some timeout handling to XScale so OpenOCD doesn't get Edgar Grimberg, fix arm926ejs_examine_debug_reason return value. Michael Bruck: fixed warnings Asynchronous output information from e.g. a halt is now displayed again. - Improves error handling upon GDB connect typo. Michael Bruck: fix warning added stm32.cfg to install list - LOG_SILENT can be used to silence the log(needed in upcoming patches) - Fixed various error handling when looking for memory leaks - the jtag chain is examined and validated after GDB & telnet servers - fixed a problem with big endian XScale and GDB register packets. prettier async output Pavel Chromy: the attached patch refines PRESTO support and makes it work with libftdi. Pavel Chromy: hopefully perfection for async output and prompt/partially typed command line handling. more target scripts wip. more target scripts wip. backed out changes from 483. Pavel Chromy: telnet line buffer size checking, history does not store repeating lines, improved history printing, log callback tweak - fixed jtag_add_reset(). It no longer causes jtag_execute_queue() to JTAG_END_STATE is now retired. It is no longer queued. retire unused code. - retired unused jtag events. The code was incorrect tidy up output a bit. No longer show "accepted connection" inside Telnet session. With the recent changes the TRST needs to happen for every reset. reduce compare noise. If someone should be crazy enough to try to run OpenOCD under eCos, then they'v got some hooks to point them in the general direction. tinkered a bit with testing matrix. Corrections from Dominic more info about latest working version fixed regression in XScale introduce in 297 This moves common code into functions so as to make it clear The bitbang driver leaves the TCK 0 when in idle xscale now passes w/bitbang in 505 Dominic undid some of my damage. CLK should now be set as intended in all cases. marked infinite loop in code w/TODO and fixed warning. XScale excessive waiting fix. print ms in debug_level 3 logs. Seconds is not enough. - adds two speeds to jtag_speed. reset and post reset speed. Default added jtag_khz for use with target library clarified jtag_khz command. Michael Bruck: fixed warnings reset and post reset speed & jtag_khz command documented. added profile command. It was added to simplify evaluation by testers. hooks for multithreading. Disable nagle TAP_SD/SI are now forbidden end states. Edgar Grimberg: added needed delays make jtag_add_statemove() internal to the driver. Removed exit()'s. A reset is usually enough to work around these, reducing cycle times target_call_timer_callbacks_now() now invokes periodic callbacks immediately Do not assert trst in srst_only case even if srst_pulls_trst. - fixes for jtag_khz committed. optional count argument to mwX Added timeout(instead of infinite loop) to soft_reset_halt fix flash info - now reports erased state properly Edgar Grimberg sharpened the str912 target script. - Work on fixing erase check. Many implementations are plain broken. added query of reset speed - reverted some of the changes that possibly broke arm926ejs. Waiting - the reset mode parameter is now DEPRECATED. It is implemented avoid patch trouble by isolating troublesome line... at91eb40a.elf moved to src/target/ecos - only if "reset halt" or "reset init" are issued will the reset vector be set up Spen fixed various issues w.r.t. setting up the sockets for optimal performance. The endstate now reports the endstate of the queue instead of Pavel pointed out that jtag_add_tlr() is better than jtag_add_tms(). added a couple of LOG_ERROR() messages to improve logfile. lm3s6965.cfg contributed by Edwin Olson Edwin Olson found bug & tested fix for flash write_image for stellaris. use jtag.c's cur/end_state global variables. - added "init" command. "init" and "reset" at end of startup script is equivalent Don Porges fixed c99 issues. back out Don Porges workaround for some device with manufcaturer # 0x1a2 target lib wip stop using variable sized arrays. That's something that belongs to C++ and not C. Improved XScale performance for embedded hosted OpenOCD added target->type->examine(). Eventually this will allow for bringing up telnet/gdb *before* jtag chain has been validated + it might fix some reset halt problems seen as examine() needs to run after TRST has been asserted. Wip - split target setup and target examination Reset wip. Just adding hooks. This is just to reduce the size of the actual change, no change in behaviour. Reset wip. Just adding hooks. This is just to reduce the size of the actual change, no change in behaviour. fixed gaffe for default examine implementation found two more gaffes for reset wip - Set up ICE registers after TRST allows launching OpenOCD w/telnet+gdb server w/the allows launching OpenOCD w/telnet+gdb server w/the A dummy driver to test codepath w/no contact w/target. More robust handling of unknown target state for step/continue packet. TRST is asserted *before* target->type->assert_reset() is invoked. Removed old code. Added a few tweaks while playing with texi. moved out stuff that wasn't already moved from openocd.pdf to the target library. retired fast_memory_access. It's always fast now. target read/write is no longer attempted for target_xxx() functions when the target has not been examined(fails w/error). Added checks for target->type->read/write_memory, soft_reset_halt and run_algorithm that the target has been examined. - sw_bkpts fails if the target is not halted. The side effect is fix SEGFAULT regression in cortex after TRST fixes Edgar Grimberg added some missing scripts from the install Update Embedded ICE registers explicitly during target->type->examine() instead fix for gaffe in 555 that stopped JTAG chain examine + validate from running. Edwin Olsen: improves breakpoint handling on cortex-m3 parts. Specifically, this patch allows expressions to be evaluated in GDB that contain function calls. Nicolas Pitre fixed regression. Enabled auto erase, gdb memory map and gdb flash programming by default. retired auto_erase, added optional erase arg to flash write_image. Karl RobinSod <kar...@gm...> added lpc288x support. Some work remaining, committing for test/collaboration purposes. deleted obsolete stuff. wip on reporting bugs. Andre Renaud support for the am29sl800db CFI flash chip (id: 0x0004, 0x226b). added fast option. fixed doc for GDB memory map and flash program defaults to follow code Tim Hudson: removed setting jtag_speed directly (which should not be done). regions outside flash are now read/write nocache by default. GDB 6.8 would mark non-flash areas as inacessible by default. Tim Hudson contributed at91sam9260 target config files + some interface definitions. Pavel Chromy's on chip flash loader Edgar's new test cases. Edgar's new test cases. Close dangling file handle make debug_level 3 useful again... the log just drowns. perhaps introduce debug_level 4? wip instructions for building Cortex toolchain set communication speeds Edgar Grimberg added a new rule for target scripts. Flash + verify must succeed. Edgar's added support for printing jtag_khz Edgar's naming convention fixes. lpc2148 fixes from Edgar Grimberg now compiles again. Tim Hudson worked on English language. add missing reset script The target library is now the authorotative source of config examples Edgar Grimberg found tiny memory leak increase packet size to 16kBytes. Very slightly faster. Edgar Grimberg plugged a leak found w/Valgrind. This matters for embedded devices, but is probably not observably better for PC hosted OpenOCD. print available memory in log_level 3 disable code that prints available mem under windows. Does not compile. Michael Fischer spotted a problem in the reset routines for srst_pulls_trst. It is a bit of a mystery why this was only visible w/LPC2148. printing available memory fails on win + mac. Disable for now until a robust way of doing this can be found. added stack trace. updated guidelines. Michael Fischer found and Edgar Grimberg fixed generic crash in timers reproduceable with at91fr40008 fix mode output when illegal arm mode is detected. Now prints illegal mode for index -1. Michael Fischer found this bogus warning. Fixed. print out an error if srst_pulls_trst is not specified for Fix crash when mode number fetched from the target is invalid. reverted change in 658 and simply removed the busted warning for now. Edgar Grimberg fixes some memory handling issues and moved srst_pulls_trst check into arm7_9_common.c. Not tested yet, if it is broken it should "only" print bogus warnings or not print a warning when it should have. comment. jtag_exexcute_queue() now logs error when it is invoked before 'init' command. clock 1/0 in idle now configurable. found out why str912 reset halt failed. Fredrik Hederstierna: fix leak + clean up return codes Fredrik Hederstierna: fix leak + clean up return codes Pavel Chromy: fix logging syntax error + formatting & removing obsolete comments. Pavel Chromy: TCK returns to zero before state of reset line is changed. Nicolas Pitre: Feroceon fixes GDB timeout fix. If a script takes a long time and does not produce any output, ping between every command. fallback for no implementation of multi word CFI write. Successful codepath not affected. Spen spotted a bug in warning for missing srst_pulls_trst Pavel Chromy: TAP state changed to TLR when SRST goes active with srst_pulls_trst, as in all other drivers Pavel Chromy: Pavel Chromy: added pre/post_reset scripts based on Pieter Conradie's ideas. Fixed... [truncated message content] |
From: David B. <dbr...@us...> - 2009-10-21 05:11:05
|
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 418cc2f148b29e602f99fda97629434d5c5759bb (commit) from a754617d5764c697e66eb7d68efdf758a89d54a3 (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 418cc2f148b29e602f99fda97629434d5c5759bb Author: David Brownell <dbr...@us...> Date: Tue Oct 20 20:04:36 2009 -0700 XSVF: use svf_add_statemove() XSVF improvements: - Layer parts of XSVF directly over SVF, calling svf_add_statemove() instead of expecting jtag_add_statemove() to conform to the SVF/XSVF requirements (which it doesn't). This should improve XSTATE handling a lot; it removes most users of jtag_add_statemove(), and the comments about how it should really do what svf_add_statemove() does. - Update XSTATE logic to be a closer match to the XSVF spec. The main open issue here is (still) that this implementation doesn't know how to build and submit paths from single-state transitions ... but now it will report that error case. - Update the User's Guide to mention the two utility scripts for working with XSVF, and to mention the five extension opcodes. Handling of state transition paths is, overall, still a mess. I think they should all be specified as paths not unlike SVF uses, and compiled to the bitstrings later ... so that we can actually make sense of the paths. (And see the extra clocks, detours through RUN, etc.) Signed-off-by: David Brownell <dbr...@us...> diff --git a/doc/openocd.texi b/doc/openocd.texi index 107441d..500faf9 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -6096,6 +6096,8 @@ with handlers for that event. @deffn Command {pathmove} start_state [next_state ...] Start by moving to @var{start_state}, which must be one of the @emph{stable} states. +Unless it is the only state given, this will often be the +current state, so that no TCK transitions are needed. Then, in a series of single state transitions (conforming to the JTAG state machine) shift to each @var{next_state} in sequence, one per TCK cycle. @@ -6130,8 +6132,8 @@ Default is enabled. The @var{tap_state} names used by OpenOCD in the @command{drscan}, @command{irscan}, and @command{pathmove} commands are the same -as those used in SVF boundary scan documents, except that some -versions of SVF use @sc{idle} instead of @sc{run/idle}. +as those used in SVF boundary scan documents, except that +SVF uses @sc{idle} instead of @sc{run/idle}. @itemize @bullet @item @b{RESET} ... @emph{stable} (with TMS high); @@ -6222,6 +6224,27 @@ Unless the @option{quiet} option is specified, messages are logged for comments and some retries. @end deffn +The OpenOCD sources also include two utility scripts +for working with XSVF; they are not currently installed +after building the software. +You may find them useful: + +@itemize +@item @emph{svf2xsvf} ... converts SVF files into the extended XSVF +syntax understood by the @command{xsvf} command; see notes below. +@item @emph{xsvfdump} ... converts XSVF files into a text output format; +understands the OpenOCD extensions. +@end itemize + +The input format accepts a handful of non-standard extensions. +These include three opcodes corresponding to SVF extensions +from Lattice Semiconductor (LCOUNT, LDELAY, LDSR), and +two opcodes supporting a more accurate translation of SVF +(XTRST, XWAITSTATE). +If @emph{xsvfdump} shows a file is using those opcodes, it +probably will not be usable with other XSVF tools. + + @node TFTP @chapter TFTP @cindex TFTP diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index 5085445..7253c3e 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -536,29 +536,7 @@ extern void jtag_add_pathmove(int num_states, const tap_state_t* path); * @return ERROR_OK on success, or an error code on failure. * * Moves from the current state to the goal \a state. - * - * This needs to be handled according to the xsvf spec, see the XSTATE - * command description. From the XSVF spec, pertaining to XSTATE: - * - * For special states known as stable states (Test-Logic-Reset, - * Run-Test/Idle, Pause-DR, Pause- IR), an XSVF interpreter follows - * predefined TAP state paths when the starting state is a stable state - * and when the XSTATE specifies a new stable state. See the STATE - * command in the [Ref 5] for the TAP state paths between stable - * states. - * - * For non-stable states, XSTATE should specify a state that is only one - * TAP state transition distance from the current TAP state to avoid - * undefined TAP state paths. A sequence of multiple XSTATE commands can - * be issued to transition the TAP through a specific state path. - * - * @note Unless @c tms_bits holds a path that agrees with [Ref 5] in the - * above spec, then this code is not fully conformant to the xsvf spec. - * This puts a burden on tap_get_tms_path() function from the xsvf spec. - * If in doubt, you should confirm that that burden is being met. - * - * Otherwise, @a goal_state must be immediately reachable in one clock - * cycle, and does not need to be a stable state. + * Both states must be stable. */ extern int jtag_add_statemove(tap_state_t goal_state); diff --git a/src/svf/svf.c b/src/svf/svf.c index ecb0ffa..dfbbde4 100644 --- a/src/svf/svf.c +++ b/src/svf/svf.c @@ -31,8 +31,8 @@ #include "config.h" #endif -#include "svf.h" #include "jtag.h" +#include "svf.h" #include "time_support.h" @@ -311,7 +311,7 @@ static const char* tap_state_svf_name(tap_state_t state) return ret; } -static int svf_add_statemove(tap_state_t state_to) +int svf_add_statemove(tap_state_t state_to) { tap_state_t state_from = cmd_queue_cur_state; uint8_t index; @@ -619,9 +619,10 @@ static int svf_parse_cmd_string(char *str, int len, char **argus, int *num_of_ar return ERROR_OK; } -static int svf_tap_state_is_stable(tap_state_t state) +bool svf_tap_state_is_stable(tap_state_t state) { - return ((TAP_RESET == state) || (TAP_IDLE == state) || (TAP_DRPAUSE == state) || (TAP_IRPAUSE == state)); + return (TAP_RESET == state) || (TAP_IDLE == state) + || (TAP_DRPAUSE == state) || (TAP_IRPAUSE == state); } static int svf_tap_state_is_valid(tap_state_t state) @@ -1082,6 +1083,7 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str) field.num_bits = i; field.out_value = &svf_tdi_buffer[svf_buffer_index]; field.in_value = &svf_tdi_buffer[svf_buffer_index]; + /* NOTE: doesn't use SVF-specified state paths */ jtag_add_plain_dr_scan(1, &field, svf_para.dr_end_state); svf_buffer_index += (i + 7) >> 3; @@ -1177,6 +1179,7 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str) field.num_bits = i; field.out_value = &svf_tdi_buffer[svf_buffer_index]; field.in_value = &svf_tdi_buffer[svf_buffer_index]; + /* NOTE: doesn't use SVF-specified state paths */ jtag_add_plain_ir_scan(1, &field, svf_para.ir_end_state); svf_buffer_index += (i + 7) >> 3; @@ -1278,10 +1281,13 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str) // run_state and end_state is checked to be stable state // TODO: do runtest #if 1 + /* FIXME handle statemove failures */ + int retval; + // enter into run_state if necessary if (cmd_queue_cur_state != svf_para.runtest_run_state) { - svf_add_statemove(svf_para.runtest_run_state); + retval = svf_add_statemove(svf_para.runtest_run_state); } // call jtag_add_clocks @@ -1290,7 +1296,7 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str) // move to end_state if necessary if (svf_para.runtest_end_state != svf_para.runtest_run_state) { - svf_add_statemove(svf_para.runtest_end_state); + retval = svf_add_statemove(svf_para.runtest_end_state); } #else if (svf_para.runtest_run_state != TAP_IDLE) @@ -1337,8 +1343,10 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str) free(path); return ERROR_FAIL; } + /* OpenOCD refuses paths containing TAP_RESET */ if (TAP_RESET == path[i]) { + /* FIXME last state MUST be stable! */ if (i > 0) { jtag_add_pathmove(i, path); @@ -1378,10 +1386,10 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str) state = svf_find_string_in_array(argus[1], (char **)svf_tap_state_name, dimof(svf_tap_state_name)); if (svf_tap_state_is_stable(state)) { - // TODO: move to state + LOG_DEBUG("\tmove to %s by svf_add_statemove", + svf_tap_state_name[state]); + /* FIXME handle statemove failures */ svf_add_statemove(state); - - LOG_DEBUG("\tmove to %s by svf_add_statemove", svf_tap_state_name[state]); } else { diff --git a/src/svf/svf.h b/src/svf/svf.h index 822cad2..83123fc 100644 --- a/src/svf/svf.h +++ b/src/svf/svf.h @@ -24,4 +24,25 @@ extern int svf_register_commands(struct command_context_s *cmd_ctx); +/** + * svf_add_statemove() moves from the current state to @a goal_state. + * + * @param goal_state The final TAP state. + * @return ERROR_OK on success, or an error code on failure. + * + * The current and goal states must satisfy svf_tap_state_is_stable(). + * State transition paths used by this routine are those given in the + * SVF specification for single-argument STATE commands (and also used + * for various other state transitions). + */ +extern int svf_add_statemove(tap_state_t goal_state); + +/** + * svf_tap_state_is_stable() returns true for stable non-SHIFT states + * + * @param state The TAP state in question + * @return true iff the state is stable and not a SHIFT state. + */ +extern bool svf_tap_state_is_stable(tap_state_t state); + #endif /* SVF_H */ diff --git a/src/xsvf/Makefile.am b/src/xsvf/Makefile.am index 847fb80..fd9f8c3 100644 --- a/src/xsvf/Makefile.am +++ b/src/xsvf/Makefile.am @@ -1,6 +1,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/server \ -I$(top_srcdir)/src/helper \ + -I$(top_srcdir)/src/svf \ -I$(top_srcdir)/src/jtag METASOURCES = AUTO diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c index 083e6e3..d00c47c 100644 --- a/src/xsvf/xsvf.c +++ b/src/xsvf/xsvf.c @@ -42,6 +42,7 @@ #include "xsvf.h" #include "jtag.h" +#include "svf.h" /* XSVF commands, from appendix B of xapp503.pdf */ @@ -432,7 +433,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha /* See page 19 of XSVF spec regarding opcode "XSDR" */ if (xruntest) { - jtag_add_statemove(TAP_IDLE); + result = svf_add_statemove(TAP_IDLE); if (runtest_requires_tck) jtag_add_clocks(xruntest); @@ -440,7 +441,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha jtag_add_sleep(xruntest); } else if (xendir != TAP_DRPAUSE) /* we are already in TAP_DRPAUSE */ - jtag_add_statemove(xenddr); + result = svf_add_statemove(xenddr); } break; @@ -499,32 +500,37 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha LOG_DEBUG("XSTATE 0x%02X %s", uc, tap_state_name(mystate)); - /* there is no need for the lookahead code that was here since we - queue up the jtag commands anyway. This is a simple way to handle - the XSTATE. - */ + /* NOTE: the current state is SVF-stable! */ + + /* no change == NOP */ + if (mystate == cmd_queue_cur_state + && mystate != TAP_RESET) + break; - if (jtag_add_statemove(mystate) != ERROR_OK) + /* Hand off to SVF? */ + if (svf_tap_state_is_stable(mystate)) { - /* For special states known as stable states - (Test-Logic-Reset, Run-Test/Idle, Pause-DR, Pause- IR), - an XSVF interpreter follows predefined TAP state paths - when the starting state is a stable state and when the - XSTATE specifies a new stable state (see the STATE - command in the [Ref 5] for the TAP state paths between - stable states). For non-stable states, XSTATE should - specify a state that is only one TAP state transition - distance from the current TAP state to avoid undefined - TAP state paths. A sequence of multiple XSTATE commands - can be issued to transition the TAP through a specific - state path. - */ - - LOG_ERROR("XSTATE %s is not reachable from current state %s in one clock cycle", - tap_state_name(mystate), - tap_state_name(cmd_queue_cur_state) -); + result = svf_add_statemove(mystate); + if (result != ERROR_OK) + unsupported = 1; + break; } + + /* + * A sequence of XSTATE transitions, each TAP + * state adjacent to the previous one. + * + * NOTE: OpenOCD requires something that XSVF + * doesn't: the last TAP state in the path + * must be stable. + * + * FIXME Implement path collection; submit via + * jtag_add_pathmove() after teaching it to + * report errors. + */ + LOG_ERROR("XSVF: 'XSTATE %s' ... NYET", + tap_state_name(mystate)); + unsupported = 1; } break; @@ -708,9 +714,10 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha } else { - jtag_add_statemove(wait_state); + /* FIXME handle statemove errors ... */ + result = svf_add_statemove(wait_state); jtag_add_sleep(delay); - jtag_add_statemove(end_state); + result = svf_add_statemove(end_state); } } break; @@ -755,19 +762,22 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha * be issuing a number of clocks in this state. This set of allowed states is also * determined by the SVF RUNTEST command's allowed states. */ - if (wait_state != TAP_IRPAUSE && wait_state != TAP_DRPAUSE && wait_state != TAP_RESET && wait_state != TAP_IDLE) + if (!svf_tap_state_is_stable(wait_state)) { - LOG_ERROR("illegal XWAITSTATE wait_state: \"%s\"", tap_state_name(wait_state)); + LOG_ERROR("illegal XWAITSTATE wait_state: \"%s\"", + tap_state_name(wait_state)); unsupported = 1; + /* REVISIT "break" so we won't run? */ } - jtag_add_statemove(wait_state); + /* FIXME handle statemove errors ... */ + result = svf_add_statemove(wait_state); jtag_add_clocks(clock_count); jtag_add_sleep(usecs); - jtag_add_statemove(end_state); + result = svf_add_statemove(end_state); } break; @@ -806,6 +816,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha break; } + /* NOTE: loop_state must be stable! */ loop_state = xsvf_to_tap(state); loop_clocks = be_to_h_u32(clock_buf); loop_usecs = be_to_h_u32(usecs_buf); @@ -839,7 +850,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha { scan_field_t field; - jtag_add_statemove(loop_state); + result = svf_add_statemove(loop_state); jtag_add_clocks(loop_clocks); jtag_add_sleep(loop_usecs); @@ -917,8 +928,8 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha LOG_DEBUG("xsvf failed, setting taps to reasonable state"); /* upon error, return the TAPs to a reasonable state */ - jtag_add_statemove(TAP_IDLE); - jtag_execute_queue(); + result = svf_add_statemove(TAP_IDLE); + result = jtag_execute_queue(); break; } } ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 27 ++++++++++++++++- src/jtag/jtag.h | 24 +-------------- src/svf/svf.c | 26 +++++++++++------ src/svf/svf.h | 21 +++++++++++++ src/xsvf/Makefile.am | 1 + src/xsvf/xsvf.c | 79 ++++++++++++++++++++++++++++--------------------- 6 files changed, 110 insertions(+), 68 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-10-20 15:55:25
|
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 a754617d5764c697e66eb7d68efdf758a89d54a3 (commit) from 1c8177d78ea2b24159ef4e3647c947a1ad7e02ed (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 a754617d5764c697e66eb7d68efdf758a89d54a3 Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Oct 20 15:54:53 2009 +0200 Removed unused interface_jtag_set_end_state and wrote down some notes on TCP/IP client/server scheme. diff --git a/TODO b/TODO index a57ed24..0d88812 100644 --- a/TODO +++ b/TODO @@ -95,6 +95,13 @@ interface support: The following tasks have been suggested for adding new JTAG interfaces: - TCP driver: allow client/server for remote JTAG interface control. +This requires a client and a server. The server is built into the +normal OpenOCD and takes commands from the client and executes +them on the interface returning the result of TCP/IP. The client +is an OpenOCD which is built with a TCP/IP minidriver. The use +of a minidriver is required to capture all the jtag_add_xxx() +fn's at a high enough level and repackage these cmd's as +TCP/IP packets handled by the server. @section thelistswd Serial Wire Debug diff --git a/src/jtag/minidriver.h b/src/jtag/minidriver.h index 07fed01..b7c01ab 100644 --- a/src/jtag/minidriver.h +++ b/src/jtag/minidriver.h @@ -120,7 +120,6 @@ extern int interface_jtag_add_runtest(int num_cycles, tap_state_t endstate); * approperiate */ extern int interface_jtag_add_reset(int trst, int srst); -extern int interface_jtag_set_end_state(tap_state_t endstate); extern int interface_jtag_add_sleep(uint32_t us); extern int interface_jtag_add_clocks(int num_cycles); extern int interface_jtag_execute_queue(void); diff --git a/src/jtag/minidummy/minidummy.c b/src/jtag/minidummy/minidummy.c index 3c08435..2cab0f5 100644 --- a/src/jtag/minidummy/minidummy.c +++ b/src/jtag/minidummy/minidummy.c @@ -59,12 +59,6 @@ int interface_jtag_execute_queue(void) extern int jtag_check_value(uint8_t *captured, void *priv); -int interface_jtag_set_end_state(tap_state_t state) -{ - return ERROR_OK; -} - - int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state) { /* synchronously do the operation here */ diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index e56f6d2..f45bff5 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -532,12 +532,6 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_ } } -int interface_jtag_set_end_state(tap_state_t state) -{ - return ERROR_OK; -} - - int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state) { ----------------------------------------------------------------------- Summary of changes: TODO | 7 +++++++ src/jtag/minidriver.h | 1 - src/jtag/minidummy/minidummy.c | 6 ------ src/jtag/zy1000/zy1000.c | 6 ------ 4 files changed, 7 insertions(+), 13 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-10-20 12:25:26
|
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 1c8177d78ea2b24159ef4e3647c947a1ad7e02ed (commit) via 176e80eec3a840ed2c5479308ee290831b08aaaa (commit) from 6eb09d6e6d65b33c26a4f609e2ba4c20bfd5902b (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 1c8177d78ea2b24159ef4e3647c947a1ad7e02ed Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Oct 20 12:22:55 2009 +0200 Added the faux flash driver and target. Used for testing. diff --git a/src/flash/Makefile.am b/src/flash/Makefile.am index 27846d7..d448197 100644 --- a/src/flash/Makefile.am +++ b/src/flash/Makefile.am @@ -38,6 +38,7 @@ libflash_la_SOURCES = \ mflash.c \ pic32mx.c \ avrf.c \ + faux.c \ mx3_nand.c noinst_HEADERS = \ diff --git a/src/flash/ecos.c b/src/flash/ecos.c index 76859df..8583544 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -148,7 +148,7 @@ static int ecosflash_flash_bank_command(struct command_context_s *cmd_ctx, char info->driverPath = strdup(args[6]); /* eCos flash sector sizes are not exposed to OpenOCD, use 0x10000 as - * a way to improve impeadance matach between OpenOCD and eCos flash + * a way to improve impedance match between OpenOCD and eCos flash * driver. */ int i = 0; diff --git a/src/flash/faux.c b/src/flash/faux.c new file mode 100644 index 0000000..c5928ad --- /dev/null +++ b/src/flash/faux.c @@ -0,0 +1,153 @@ +/*************************************************************************** + * Copyright (C) 2009 Ã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 * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "flash.h" +#include "image.h" + + +static int faux_register_commands(struct command_context_s *cmd_ctx); +static int faux_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); +static int faux_erase(struct flash_bank_s *bank, int first, int last); +static int faux_protect(struct flash_bank_s *bank, int set, int first, int last); +static int faux_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count); +static int faux_probe(struct flash_bank_s *bank); +static int faux_protect_check(struct flash_bank_s *bank); +static int faux_info(struct flash_bank_s *bank, char *buf, int buf_size); + +flash_driver_t faux_flash = +{ + .name = "faux", + .register_commands = faux_register_commands, + .flash_bank_command = faux_flash_bank_command, + .erase = faux_erase, + .protect = faux_protect, + .write = faux_write, + .probe = faux_probe, + .auto_probe = faux_probe, + .erase_check = default_flash_blank_check, + .protect_check = faux_protect_check, + .info = faux_info +}; + +typedef struct faux_flash_bank_s +{ + struct target_s *target; + uint8_t *memory; + uint32_t start_address; +} faux_flash_bank_t; + +static const int sectorSize = 0x10000; + + +/* flash bank faux <base> <size> <chip_width> <bus_width> <target#> <driverPath> + */ +static int faux_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +{ + faux_flash_bank_t *info; + + if (argc < 6) + { + LOG_WARNING("incomplete flash_bank faux configuration"); + return ERROR_FLASH_BANK_INVALID; + } + + info = malloc(sizeof(faux_flash_bank_t)); + if (info == NULL) + { + LOG_ERROR("no memory for flash bank info"); + return ERROR_FAIL; + } + info->memory = malloc(bank->size); + if (info == NULL) + { + free(info); + LOG_ERROR("no memory for flash bank info"); + return ERROR_FAIL; + } + bank->driver_priv = info; + + /* Use 0x10000 as a fixed sector size. */ + int i = 0; + uint32_t offset = 0; + bank->num_sectors = bank->size/sectorSize; + bank->sectors = malloc(sizeof(flash_sector_t) * bank->num_sectors); + for (i = 0; i < bank->num_sectors; i++) + { + bank->sectors[i].offset = offset; + bank->sectors[i].size = sectorSize; + offset += bank->sectors[i].size; + bank->sectors[i].is_erased = -1; + bank->sectors[i].is_protected = 0; + } + + info->target = get_target(args[5]); + if (info->target == NULL) + { + LOG_ERROR("target '%s' not defined", args[5]); + free(info->memory); + free(info); + return ERROR_FAIL; + } + return ERROR_OK; +} + +static int faux_register_commands(struct command_context_s *cmd_ctx) +{ + return ERROR_OK; +} + +static int faux_erase(struct flash_bank_s *bank, int first, int last) +{ + faux_flash_bank_t *info = bank->driver_priv; + memset(info->memory + first*sectorSize, 0xff, sectorSize*(last-first + 1)); + return ERROR_OK; +} + +static int faux_protect(struct flash_bank_s *bank, int set, int first, int last) +{ + LOG_USER("set protection sector %d to %d to %s", first, last, set?"on":"off"); + return ERROR_OK; +} + +static int faux_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count) +{ + faux_flash_bank_t *info = bank->driver_priv; + memcpy(info->memory + offset, buffer, count); + return ERROR_OK; +} + +static int faux_protect_check(struct flash_bank_s *bank) +{ + return ERROR_OK; +} + +static int faux_info(struct flash_bank_s *bank, char *buf, int buf_size) +{ + snprintf(buf, buf_size, "faux flash driver"); + return ERROR_OK; +} + +static int faux_probe(struct flash_bank_s *bank) +{ + return ERROR_OK; +} diff --git a/src/flash/flash.c b/src/flash/flash.c index 87eec6e..db04e6e 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -64,6 +64,7 @@ extern flash_driver_t ecosflash_flash; extern flash_driver_t ocl_flash; extern flash_driver_t pic32mx_flash; extern flash_driver_t avr_flash; +extern flash_driver_t faux_flash; flash_driver_t *flash_drivers[] = { &lpc2000_flash, @@ -83,6 +84,7 @@ flash_driver_t *flash_drivers[] = { &ocl_flash, &pic32mx_flash, &avr_flash, + &faux_flash, NULL, }; diff --git a/tcl/target/faux.cfg b/tcl/target/faux.cfg new file mode 100644 index 0000000..cc09ee3 --- /dev/null +++ b/tcl/target/faux.cfg @@ -0,0 +1,29 @@ +#Script for faux target - used for testing + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME at91eb40a +} + +if { [info exists ENDIAN] } { + set _ENDIAN $ENDIAN +} else { + set _ENDIAN little +} + +if { [info exists CPUTAPID ] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x00000000 +} + + +jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID + +#target configuration +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4 + +#dummy flash driver +flash bank faux 0x01000000 0x200000 2 2 0 commit 176e80eec3a840ed2c5479308ee290831b08aaaa Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Oct 20 12:03:36 2009 +0200 Added 'unlock' option to flash write_image diff --git a/doc/openocd.texi b/doc/openocd.texi index 7ebe457..107441d 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -3537,7 +3537,7 @@ The @var{num} parameter is a value shown by @command{flash banks}. @end deffn @anchor{flash write_image} -@deffn Command {flash write_image} [erase] filename [offset] [type] +@deffn Command {flash write_image} [erase] [unlock] filename [offset] [type] Write the image @file{filename} to the current target's flash bank(s). A relocation @var{offset} may be specified, in which case it is added to the base address for each section in the image. @@ -3546,8 +3546,9 @@ explicitly as @option{bin} (binary), @option{ihex} (Intel hex), @option{elf} (ELF file), @option{s19} (Motorola s19). @option{mem}, or @option{builder}. The relevant flash sectors will be erased prior to programming -if the @option{erase} parameter is given. -The flash bank to use is inferred from the @var{address} of +if the @option{erase} parameter is given. If @option{unlock} is +provided, then the flash banks are unlocked before erase and +program. The flash bank to use is inferred from the @var{address} of each image segment. @end deffn diff --git a/src/flash/flash.c b/src/flash/flash.c index d1b023c..87eec6e 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -43,6 +43,7 @@ static int handle_flash_write_bank_command(struct command_context_s *cmd_ctx, ch static int handle_flash_write_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); static int handle_flash_fill_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); static int handle_flash_protect_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); +static int flash_write_unlock(target_t *target, image_t *image, uint32_t *written, int erase, bool unlock); /* flash drivers */ @@ -199,7 +200,7 @@ int flash_init_drivers(struct command_context_s *cmd_ctx) register_command(cmd_ctx, flash_cmd, "write_bank", handle_flash_write_bank_command, COMMAND_EXEC, "write binary data to <bank> <file> <offset>"); register_command(cmd_ctx, flash_cmd, "write_image", handle_flash_write_image_command, COMMAND_EXEC, - "write_image [erase] <file> [offset] [type]"); + "write_image [erase] [unlock] <file> [offset] [type]"); register_command(cmd_ctx, flash_cmd, "protect", handle_flash_protect_command, COMMAND_EXEC, "set protection of sectors at <bank> <first> <last> <on | off>"); } @@ -697,13 +698,26 @@ static int handle_flash_write_image_command(struct command_context_s *cmd_ctx, c /* flash auto-erase is disabled by default*/ int auto_erase = 0; + bool auto_unlock = false; - if (strcmp(args[0], "erase") == 0) + for (;;) { - auto_erase = 1; - args++; - argc--; - command_print(cmd_ctx, "auto erase enabled"); + if (strcmp(args[0], "erase") == 0) + { + auto_erase = 1; + args++; + argc--; + command_print(cmd_ctx, "auto erase enabled"); + } else if (strcmp(args[0], "unlock") == 0) + { + auto_unlock = true; + args++; + argc--; + command_print(cmd_ctx, "auto unlock enabled"); + } else + { + break; + } } if (argc < 1) @@ -738,7 +752,7 @@ static int handle_flash_write_image_command(struct command_context_s *cmd_ctx, c return retval; } - retval = flash_write(target, &image, &written, auto_erase); + retval = flash_write_unlock(target, &image, &written, auto_erase, auto_unlock); if (retval != ERROR_OK) { image_close(&image); @@ -994,7 +1008,8 @@ flash_bank_t *get_flash_bank_by_addr(target_t *target, uint32_t addr) } /* erase given flash region, selects proper bank according to target and address */ -int flash_erase_address_range(target_t *target, uint32_t addr, uint32_t length) +static int flash_iterate_address_range(target_t *target, uint32_t addr, uint32_t length, + int (*callback)(struct flash_bank_s *bank, int first, int last)) { flash_bank_t *c; int first = -1; @@ -1016,7 +1031,7 @@ int flash_erase_address_range(target_t *target, uint32_t addr, uint32_t length) if (addr != c->base) return ERROR_FLASH_DST_BREAKS_ALIGNMENT; - return flash_driver_erase(c, 0, c->num_sectors - 1); + return callback(c, 0, c->num_sectors - 1); } /* check whether it fits */ @@ -1039,11 +1054,29 @@ int flash_erase_address_range(target_t *target, uint32_t addr, uint32_t length) if (first == -1 || last == -1) return ERROR_OK; - return flash_driver_erase(c, first, last); + return callback(c, first, last); +} + + + +int flash_erase_address_range(target_t *target, uint32_t addr, uint32_t length) +{ + return flash_iterate_address_range(target, addr, length, &flash_driver_erase); +} + +static int flash_driver_unprotect(struct flash_bank_s *bank, int first, int last) +{ + return flash_driver_protect(bank, 0, first, last); } +static int flash_unlock_address_range(target_t *target, uint32_t addr, uint32_t length) +{ + return flash_iterate_address_range(target, addr, length, &flash_driver_unprotect); +} + + /* write (optional verify) an image to flash memory of the given target */ -int flash_write(target_t *target, image_t *image, uint32_t *written, int erase) +static int flash_write_unlock(target_t *target, image_t *image, uint32_t *written, int erase, bool unlock) { int retval = ERROR_OK; @@ -1166,10 +1199,17 @@ int flash_write(target_t *target, image_t *image, uint32_t *written, int erase) retval = ERROR_OK; - if (erase) + if (unlock) + { + retval = flash_unlock_address_range(target, run_address, run_size); + } + if (retval == ERROR_OK) { - /* calculate and erase sectors */ - retval = flash_erase_address_range(target, run_address, run_size); + if (erase) + { + /* calculate and erase sectors */ + retval = flash_erase_address_range(target, run_address, run_size); + } } if (retval == ERROR_OK) @@ -1195,6 +1235,11 @@ int flash_write(target_t *target, image_t *image, uint32_t *written, int erase) return retval; } +int flash_write(target_t *target, image_t *image, uint32_t *written, int erase) +{ + return flash_write_unlock(target, image, written, erase, false); +} + int default_flash_mem_blank_check(struct flash_bank_s *bank) { target_t *target = bank->target; ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 7 +- src/flash/Makefile.am | 1 + src/flash/ecos.c | 2 +- src/flash/faux.c | 153 ++++++++++++++++++++++++++ src/flash/flash.c | 75 ++++++++++--- tcl/target/{samsung_s3c4510.cfg => faux.cfg} | 14 ++- 6 files changed, 229 insertions(+), 23 deletions(-) create mode 100644 src/flash/faux.c copy tcl/target/{samsung_s3c4510.cfg => faux.cfg} (65%) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-10-20 09:47:13
|
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 6eb09d6e6d65b33c26a4f609e2ba4c20bfd5902b (commit) from 31f73654ae14b9e17f778694ee2a9587d34f5df4 (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 6eb09d6e6d65b33c26a4f609e2ba4c20bfd5902b Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Oct 20 09:46:23 2009 +0200 More svn to git version string fixes. diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index dc0efb0..e56f6d2 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -32,7 +32,7 @@ #define ZYLIN_DATE __DATE__ #define ZYLIN_TIME __TIME__ #define ZYLIN_OPENOCD GIT_OPENOCD_VERSION -#define ZYLIN_OPENOCD_VERSION "Zylin JTAG ZY1000 " ZYLIN_VERSION " " ZYLIN_DATE " " ZYLIN_TIME +#define ZYLIN_OPENOCD_VERSION "ZY1000 " ZYLIN_VERSION " " ZYLIN_DATE /* low level command set */ @@ -280,6 +280,10 @@ static int jim_zy1000_version(Jim_Interp *interp, int argc, Jim_Obj *const *argv { version_str = ZYLIN_DATE; } + else if (strcmp("time", str) == 0) + { + version_str = ZYLIN_TIME; + } else if (strcmp("pcb", str) == 0) { #ifdef CYGPKG_HAL_NIOS2 ----------------------------------------------------------------------- Summary of changes: src/jtag/zy1000/zy1000.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-20 08:33:30
|
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 31f73654ae14b9e17f778694ee2a9587d34f5df4 (commit) via b3ca737be1da12ea1bbdf80d2676ac0c6d270790 (commit) via 0d9f8d3e0de907259ac23871cd56864bd46c02ee (commit) via 78e5f20f6055564081d34bac63b7e725d85834bb (commit) from aa8a95ad7b37e6b3123ec70c0ddc3d2d9ccb97ec (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 31f73654ae14b9e17f778694ee2a9587d34f5df4 Author: David Brownell <dbr...@us...> Date: Mon Oct 19 23:33:08 2009 -0700 SVF: better spec conformance for STATE switch Don't add extra TCK in current state; exit from RESET had four extras. Only IDLE --> IDLE needs such an extra clock. (At least one TCK must be issued.) Allow entry to RESET; SVF allows it, so must we (despite those entries being commented out of the statemove table). When entering RESET, always use TLR ... we might end up with extra clocks in reset that way, which is harmless, but we'll never end up in any other state than RESET, which is useful paranoia. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/svf/svf.c b/src/svf/svf.c index 5b96971..ecb0ffa 100644 --- a/src/svf/svf.c +++ b/src/svf/svf.c @@ -316,30 +316,28 @@ static int svf_add_statemove(tap_state_t state_to) tap_state_t state_from = cmd_queue_cur_state; uint8_t index; + /* when resetting, be paranoid and ignore current state */ + if (state_to == TAP_RESET) { + jtag_add_tlr(); + return ERROR_OK; + } + for (index = 0; index < dimof(svf_statemoves); index++) { if ((svf_statemoves[index].from == state_from) && (svf_statemoves[index].to == state_to)) { - if (TAP_RESET == state_from) - { - jtag_add_tlr(); - if (svf_statemoves[index].num_of_moves > 1) - { - jtag_add_pathmove(svf_statemoves[index].num_of_moves - 1, svf_statemoves[index].paths + 1); - } - } + /* recorded path includes current state ... avoid extra TCKs! */ + if (svf_statemoves[index].num_of_moves > 1) + jtag_add_pathmove(svf_statemoves[index].num_of_moves - 1, + svf_statemoves[index].paths + 1); else - { - if (svf_statemoves[index].num_of_moves > 0) - { - jtag_add_pathmove(svf_statemoves[index].num_of_moves, svf_statemoves[index].paths); - } - } + jtag_add_pathmove(svf_statemoves[index].num_of_moves, + svf_statemoves[index].paths); return ERROR_OK; } } - LOG_ERROR("can not move to %s", tap_state_svf_name(state_to)); + LOG_ERROR("SVF: can not move to %s", tap_state_svf_name(state_to)); return ERROR_FAIL; } commit b3ca737be1da12ea1bbdf80d2676ac0c6d270790 Author: David Brownell <dbr...@us...> Date: Mon Oct 19 22:50:51 2009 -0700 davinci: add watchdog reset method Lightly tested on dm365. Signed-off-by: David Brownell <dbr...@us...> diff --git a/tcl/target/davinci.cfg b/tcl/target/davinci.cfg index 658e7fe..e1eb48f 100644 --- a/tcl/target/davinci.cfg +++ b/tcl/target/davinci.cfg @@ -33,7 +33,7 @@ proc mmw {reg setbits clearbits} { # # PLL version 0x02: tested on dm355 -# REVISIT: On dm6446 and dm357 the PLLRST polarity is different. +# REVISIT: On dm6446/dm357 the PLLRST polarity is different. proc pll_v02_setup {pll_addr mult config} { set pll_ctrl_addr [expr $pll_addr + 0x100] set pll_ctrl [mrw $pll_ctrl_addr] @@ -174,3 +174,64 @@ proc psc_go {} { # wait for PTSTAT.go to clear (again ignoring DSP power domain) while { [expr [mrw $ptstat_addr] & 0x01] != 0 } { sleep 1 } } + +# +# A reset using only SRST is a "Warm Reset", resetting everything in the +# chip except ARM emulation (and everything _outside_ the chip that hooks +# up to SRST). But many boards don't expose SRST via their JTAG connectors +# (it's not present on TI-14 headers). +# +# From the chip-only perspective, a "Max Reset" is a "Warm" reset ... except +# without any board-wide side effects, since it's triggered using JTAG using +# either (a) ARM watchdog timer, or (b) ICEpick. +# +proc davinci_wdog_reset {} { + set timer2_phys 0x01c21c00 + + # NOTE -- on entry + # - JTAG communication with the ARM *must* be working OK; this + # may imply using adaptive clocking or disabling WFI-in-idle + # - current target must be the DaVinci ARM + # - that ARM core must be halted + # - timer2 clock is still enabled (PSC 29 on most chips) + + # + # Part I -- run regardless of being halted via JTAG + # + # NOTE: for now, we assume there's no DSP that could control the + # watchdog; or, equivalently, SUSPSRC.TMR2SRC says the watchdog + # suspend signal is controlled via ARM emulation suspend. + # + + # EMUMGT_CLKSPEED: write FREE bit to run despite emulation halt + arm926ejs mww_phys [expr $timer2_phys + 0x28] 0x00004000 + + # + # Part II -- in case watchdog hasn't been set up + # + + # TCR: disable, force internal clock source + arm926ejs mww_phys [expr $timer2_phys + 0x20] 0 + + # TGCR: reset, force to 64-bit wdog mode, un-reset ("initial" state) + arm926ejs mww_phys [expr $timer2_phys + 0x24] 0 + arm926ejs mww_phys [expr $timer2_phys + 0x24] 0x110b + + # clear counter (TIM12, TIM34) and period (PRD12, PRD34) registers + # so watchdog triggers ASAP + arm926ejs mww_phys [expr $timer2_phys + 0x10] 0 + arm926ejs mww_phys [expr $timer2_phys + 0x14] 0 + arm926ejs mww_phys [expr $timer2_phys + 0x18] 0 + arm926ejs mww_phys [expr $timer2_phys + 0x1c] 0 + + # WDTCR: put into pre-active state, then active + arm926ejs mww_phys [expr $timer2_phys + 0x28] 0xa5c64000 + arm926ejs mww_phys [expr $timer2_phys + 0x28] 0xda7e4000 + + # + # Part III -- it's ready to rumble + # + + # WDTCR: write invalid WDKEY to trigger reset + arm926ejs mww_phys [expr $timer2_phys + 0x28] 0x00004000 +} commit 0d9f8d3e0de907259ac23871cd56864bd46c02ee Author: David Brownell <dbr...@us...> Date: Mon Oct 19 22:50:51 2009 -0700 jtag_add_statemove() always uses TLR to get to RESET As decided a while back, this isn't a transition we want to chance. Whenever someone wants to got to RESET, force it. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/jtag/core.c b/src/jtag/core.c index 415d1e8..7c85839 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -567,12 +567,14 @@ int jtag_add_statemove(tap_state_t goal_state) tap_state_name(goal_state)); - if (goal_state == cur_state) - ; /* nothing to do */ - else if (goal_state == TAP_RESET) - { + /* If goal is RESET, be paranoid and force that that transition + * (e.g. five TCK cycles, TMS high). Else trust "cur_state". + */ + if (goal_state == TAP_RESET) jtag_add_tlr(); - } + else if (goal_state == cur_state) + /* nothing to do */ ; + else if (tap_is_state_stable(cur_state) && tap_is_state_stable(goal_state)) { unsigned tms_bits = tap_get_tms_path(cur_state, goal_state); commit 78e5f20f6055564081d34bac63b7e725d85834bb Author: David Brownell <dbr...@us...> Date: Mon Oct 19 22:50:51 2009 -0700 SVF/XSVF: comment and whitespace fixes SVF: comment the predefined/default paths; make them static const SVF, XSVF: whitespace fixes, mostly so copyrights display sanely Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/svf/svf.c b/src/svf/svf.c index a25b358..5b96971 100644 --- a/src/svf/svf.c +++ b/src/svf/svf.c @@ -1,22 +1,21 @@ -/*************************************************************************** - * Copyright (C) 2009 by Simon Qian * - * Sim...@Si... * - * * - * 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 * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ +/* + * Copyright (C) 2009 by Simon Qian + * Sim...@Si... + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ /* The specification for SVF is available here: @@ -98,7 +97,22 @@ typedef struct tap_state_t paths[8]; }svf_statemove_t; -svf_statemove_t svf_statemoves[] = +/* + * These paths are from the SVF specification for the STATE command, to be + * used when the STATE command only includes the final state. The first + * element of the path is the "from" (current) state, and the last one is + * the "to" (target) state. + * + * All specified paths are the shortest ones in the JTAG spec, and are thus + * not (!!) exact matches for the paths used elsewhere in OpenOCD. Note + * that PAUSE-to-PAUSE transitions all go through UPDATE and then CAPTURE, + * which has specific effects on the various registers; they are not NOPs. + * + * Paths to RESET are disabled here. As elsewhere in OpenOCD, and in XSVF + * and many SVF implementations, we don't want to risk missing that state. + * To get to RESET, always we ignore the current state. + */ +static const svf_statemove_t svf_statemoves[] = { // from to num_of_moves, paths[8] // {TAP_RESET, TAP_RESET, 1, {TAP_RESET}}, diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c index b193509..083e6e3 100644 --- a/src/xsvf/xsvf.c +++ b/src/xsvf/xsvf.c @@ -1,31 +1,30 @@ -/*************************************************************************** - * Copyright (C) 2005 by Dominic Rath * - * Dom...@gm... * - * * - * Copyright (C) 2007,2008 Ãyvind Harboe * - * oyv...@zy... * - * * - * Copyright (C) 2008 Peter Hettkamp * - * pet...@ht... * - * * - * Copyright (C) 2009 SoftPLC Corporation. http://softplc.com * - * Dick Hollenbeck <di...@so...> * - * * - * 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 * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ +/* + * Copyright (C) 2005 by Dominic Rath + * Dom...@gm... + * + * Copyright (C) 2007,2008 Ãyvind Harboe + * oyv...@zy... + * + * Copyright (C) 2008 Peter Hettkamp + * pet...@ht... + * + * Copyright (C) 2009 SoftPLC Corporation. http://softplc.com + * Dick Hollenbeck <di...@so...> + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ /* The specification for SVF is available here: @@ -186,7 +185,7 @@ static int xsvf_read_buffer(int num_bits, int fd, uint8_t* buf) static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { - uint8_t *dr_out_buf = NULL; /* from host to device (TDI) */ + uint8_t *dr_out_buf = NULL; /* from host to device (TDI) */ uint8_t *dr_in_buf = NULL; /* from device to host (TDO) */ uint8_t *dr_in_mask = NULL; @@ -197,7 +196,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha tap_state_t xendir = TAP_IDLE; /* see page 8 of the SVF spec, initial xendir to be TAP_IDLE */ tap_state_t xenddr = TAP_IDLE; - uint8_t opcode; + uint8_t opcode; uint8_t uc; long file_offset = 0; @@ -206,14 +205,14 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha int loop_clocks = 0; int loop_usecs = 0; - int do_abort = 0; - int unsupported = 0; - int tdo_mismatch = 0; - int result; + int do_abort = 0; + int unsupported = 0; + int tdo_mismatch = 0; + int result; int verbose = 1; char* filename; - int runtest_requires_tck = 0; /* a flag telling whether to clock TCK during waits, or simply sleep, controled by virt2 */ + int runtest_requires_tck = 0; /* a flag telling whether to clock TCK during waits, or simply sleep, controled by virt2 */ /* use NULL to indicate a "plain" xsvf file which accounts for @@ -500,7 +499,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha LOG_DEBUG("XSTATE 0x%02X %s", uc, tap_state_name(mystate)); - /* there is no need for the lookahead code that was here since we + /* there is no need for the lookahead code that was here since we queue up the jtag commands anyway. This is a simple way to handle the XSTATE. */ @@ -654,7 +653,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha case XCOMMENT: { unsigned int ndx = 0; - char comment[128]; + char comment[128]; do { @@ -687,7 +686,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha tap_state_t wait_state; tap_state_t end_state; - int delay; + int delay; if (read(xsvf_fd, &wait, 1) < 0 || read(xsvf_fd, &end, 1) < 0 @@ -723,7 +722,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha */ uint8_t clock_buf[4]; - uint8_t usecs_buf[4]; + uint8_t usecs_buf[4]; uint8_t wait; uint8_t end; tap_state_t wait_state; ----------------------------------------------------------------------- Summary of changes: src/jtag/core.c | 12 ++++--- src/svf/svf.c | 82 +++++++++++++++++++++++++++-------------------- src/xsvf/xsvf.c | 77 ++++++++++++++++++++++----------------------- tcl/target/davinci.cfg | 63 ++++++++++++++++++++++++++++++++++++- 4 files changed, 154 insertions(+), 80 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Zach W. <zw...@us...> - 2009-10-20 05:03: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 aa8a95ad7b37e6b3123ec70c0ddc3d2d9ccb97ec (commit) from 620d7bb2b6fdcc86b645ec34cb1b348d4441ad34 (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 aa8a95ad7b37e6b3123ec70c0ddc3d2d9ccb97ec Author: Zachary T Welch <zw...@su...> Date: Mon Oct 19 19:59:02 2009 -0700 Improve Makefile rules for XScale debug handler; fixes 'make distcheck'. diff --git a/src/target/Makefile.am b/src/target/Makefile.am index bdef58c..f62ba1d 100644 --- a/src/target/Makefile.am +++ b/src/target/Makefile.am @@ -11,9 +11,15 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/xsvf BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD) -DEBUG_HANDLER = $(top_srcdir)/src/target/xscale/debug_handler.bin -xscale_debug.h: $(BIN2C) $(DEBUG_HANDLER) +DEBUG_HANDLER = $(srcdir)/xscale/debug_handler.bin +EXTRA_DIST = $(DEBUG_HANDLER) + +DEBUG_HEADER = xscale_debug.h +BUILT_SOURCES = $(DEBUG_HEADER) +CLEANFILES = $(DEBUG_HEADER) + +$(DEBUG_HEADER): $(BIN2C) $(DEBUG_HANDLER) $(BIN2C) < $(DEBUG_HANDLER) xscale_debug_handler > xscale_debug.h METASOURCES = AUTO @@ -61,9 +67,6 @@ libtarget_la_SOURCES = \ mips_ejtag.c \ avrt.c -BUILT_SOURCES = \ - xscale_debug.h - noinst_HEADERS = \ target.h \ target_type.h \ ----------------------------------------------------------------------- Summary of changes: src/target/Makefile.am | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-20 02:57: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 620d7bb2b6fdcc86b645ec34cb1b348d4441ad34 (commit) via 550c44a800eaedc06405d3d611763830b567845d (commit) from 454c85a28a9c95c195602ff157f33c52e0a1049c (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 620d7bb2b6fdcc86b645ec34cb1b348d4441ad34 Author: Redirect 'Slash' NIL <red...@gm...> Date: Mon Oct 19 17:55:40 2009 -0700 MinGW: always use "-D__USE_MINGW_ANSI_STDIO" This is unfortunately needed to make stdio work like OpenOCD expects -- matching the ANSI-C standard, instead of MS-Windows. I tested it in both MinGW-W64 on Vista 64 and MinGW-W32 on XP, and I don't see any adverse effects to enabling it for all MinGW versions. diff --git a/configure.in b/configure.in index 8e2881c..1d3f0ec 100644 --- a/configure.in +++ b/configure.in @@ -481,6 +481,8 @@ case $host in AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts]) fi parport_use_giveio=yes + + CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO" AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.]) AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.]) commit 550c44a800eaedc06405d3d611763830b567845d Author: Redirect 'Slash' NIL <red...@gm...> Date: Mon Oct 19 17:48:19 2009 -0700 MinGW: use WinSock2 After reading a bit further, it appears that ws2_32 (Windows Sockets 2) is included in all versions of Windows and backwards compatible with wsock32, at least according to http://msdn.microsoft.com/en-us/library/ms740673%28VS.85%29.aspx. Only Win95 seems to require a manual installation; is not a big deal. So I think we can drop this whole business of detecting 64 bit MinGW and just use -lws2_32 for all MinGW platforms. diff --git a/src/Makefile.am b/src/Makefile.am index a223f95..6717910 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -43,7 +43,7 @@ libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS) libopenocd_la_LDFLAGS = $(all_libraries) if IS_MINGW -MINGWLDADD = -lwsock32 +MINGWLDADD = -lws2_32 else MINGWLDADD = endif ----------------------------------------------------------------------- Summary of changes: configure.in | 2 ++ src/Makefile.am | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-19 23:46:57
|
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 454c85a28a9c95c195602ff157f33c52e0a1049c (commit) from 6308af523a5dcbcea59561925f8f63a6ee29e3ed (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 454c85a28a9c95c195602ff157f33c52e0a1049c Author: David Brownell <dbr...@us...> Date: Mon Oct 19 14:45:43 2009 -0700 Doc: jtag_init must validate scan chain too Same requirement as like init_reset, and for the same reason: we need to start with a known and working state. diff --git a/doc/openocd.texi b/doc/openocd.texi index 6d33d56..7ebe457 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -1573,6 +1573,11 @@ which uses only a lightweight JTAG reset before examining the scan chain. If that fails, it tries again, using a harder reset from the overridable procedure @command{init_reset}. + +Implementations must have verified the JTAG scan chain before +they return. +This is done by calling @command{jtag arp_init} +(or @command{jtag arp_init-reset}). @end deffn @anchor{TCP/IP Ports} ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-10-19 22:04:46
|
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 6308af523a5dcbcea59561925f8f63a6ee29e3ed (commit) from 3b95d0e079c6a0c6c1fdd2cc2ef381753baafc28 (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 6308af523a5dcbcea59561925f8f63a6ee29e3ed Author: Nicolas Pitre <ni...@fl...> Date: Mon Oct 19 15:49:46 2009 -0400 fix single step of bx instruction going into Thumb mode Without this fix, the following code cannot be single stepped: add ip, pc, #1 bx ip [thumb code here] diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c index 93fb3dd..e2f49c3 100644 --- a/src/target/arm_simulator.c +++ b/src/target/arm_simulator.c @@ -358,7 +358,7 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si if (dry_run_pc) { - *dry_run_pc = target; + *dry_run_pc = target & ~1; return ERROR_OK; } else ----------------------------------------------------------------------- Summary of changes: src/target/arm_simulator.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-19 18:54:35
|
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 3b95d0e079c6a0c6c1fdd2cc2ef381753baafc28 (commit) from 783c28ccaa7307ddbfb59425f67d8194636eba98 (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 3b95d0e079c6a0c6c1fdd2cc2ef381753baafc28 Author: David Brownell <dbr...@us...> Date: Mon Oct 19 09:53:45 2009 -0700 Ignore openocd.exe for "git status" diff --git a/.gitignore b/.gitignore index ec8c9a7..c0aba19 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ doc/openocd.vr doc/texinfo.tex doc/version.texi src/openocd +src/openocd.exe # configure/autotools output aclocal.m4 ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-19 18:49:53
|
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 783c28ccaa7307ddbfb59425f67d8194636eba98 (commit) from 3c6bb4bce8a3a85495f3297d0e4d2f8a958da662 (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 783c28ccaa7307ddbfb59425f67d8194636eba98 Author: Redirect 'Slash' NIL <red...@gm...> Date: Mon Oct 19 09:49:34 2009 -0700 corrective fix for MinGW GNU C99 printf compliance Compilation on cygwin, using gcc v3 with option -mno-cygwin, currently produces a large number of the following warnings: warning: `gnu_printf' is an unrecognized format function type These have been introduced with the recent MinGW GNU C99 printf compliance patch, as gnu_printf was only introduced with gcc v4.4 and is not recognized with earlier versions. The attached fix adds gcc version detection to the previous patch to avoid the problem. diff --git a/src/helper/command.h b/src/helper/command.h index c574efd..ba825bc 100644 --- a/src/helper/command.h +++ b/src/helper/command.h @@ -35,9 +35,10 @@ #include "jim.h" #endif -/* To achieve C99 printf compatibility in MinGW, gnu_printf should */ -/* be used for __attribute__((format( ... ))) */ -#ifdef IS_MINGW +/* To achieve C99 printf compatibility in MinGW, gnu_printf should be + * used for __attribute__((format( ... ))), with GCC v4.4 or later + */ +#if (defined(IS_MINGW) && (((__GNUC__ << 16) + __GNUC_MINOR__) >= 0x00040004)) #define PRINTF_ATTRIBUTE_FORMAT gnu_printf #else #define PRINTF_ATTRIBUTE_FORMAT printf diff --git a/src/helper/log.h b/src/helper/log.h index 8f6ac77..f43e1e6 100644 --- a/src/helper/log.h +++ b/src/helper/log.h @@ -28,9 +28,10 @@ #include "command.h" -/* To achieve C99 printf compatibility in MinGW, gnu_printf should */ -/* be used for __attribute__((format( ... ))) */ -#ifdef IS_MINGW +/* To achieve C99 printf compatibility in MinGW, gnu_printf should be + * used for __attribute__((format( ... ))), with GCC v4.4 or later + */ +#if (defined(IS_MINGW) && (((__GNUC__ << 16) + __GNUC_MINOR__) >= 0x00040004)) #define PRINTF_ATTRIBUTE_FORMAT gnu_printf #else #define PRINTF_ATTRIBUTE_FORMAT printf ----------------------------------------------------------------------- Summary of changes: src/helper/command.h | 7 ++++--- src/helper/log.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-10-19 15:17: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 3c6bb4bce8a3a85495f3297d0e4d2f8a958da662 (commit) from 60b66deb4f75efb325dbdf7de7f8bf7c6518376d (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 3c6bb4bce8a3a85495f3297d0e4d2f8a958da662 Author: oyvind <oyvind@titan.(none)> Date: Mon Oct 19 15:16:42 2009 +0200 Sync with official Jim Tcl repository. diff --git a/src/helper/jim-eventloop.c b/src/helper/jim-eventloop.c index edeeae7..fae46e8 100644 --- a/src/helper/jim-eventloop.c +++ b/src/helper/jim-eventloop.c @@ -52,8 +52,7 @@ #define __JIM_EVENTLOOP_CORE__ #ifdef __ECOS #include <pkgconf/jimtcl.h> -#endif -#ifdef __ECOS +#include <sys/time.h> #include <cyg/jimtcl/jim.h> #include <cyg/jimtcl/jim-eventloop.h> #else diff --git a/src/helper/jim.c b/src/helper/jim.c index dfee1dd..117ec56 100644 --- a/src/helper/jim.c +++ b/src/helper/jim.c @@ -53,6 +53,9 @@ #include <pkgconf/jimtcl.h> #include <stdio.h> #include <stdlib.h> + +typedef CYG_ADDRWORD intptr_t; + #include <string.h> #include <stdarg.h> #include <ctype.h> diff --git a/src/helper/jim.h b/src/helper/jim.h index 0aa0c93..089ccc1 100644 --- a/src/helper/jim.h +++ b/src/helper/jim.h @@ -87,7 +87,7 @@ extern "C" { #endif /* _MSC_VER */ /* Long Long type and related issues */ -#ifdef HAVE_LONG_LONG_INT +#if !defined(__ECOS) && defined(HAVE_LONG_LONG_INT) # ifdef _MSC_VER /* MSC compiler */ # define jim_wide _int64 # ifndef LLONG_MAX @@ -119,7 +119,7 @@ extern "C" { * LIBC specific fixes * ---------------------------------------------------------------------------*/ -#ifdef HAVE_LONG_LONG_INT +#if !defined(__ECOS) && defined(HAVE_LONG_LONG_INT) # if defined(_MSC_VER) || defined(__MSVCRT__) || defined(__MINGW32__) # define JIM_WIDE_MODIFIER "I64d" # else ----------------------------------------------------------------------- Summary of changes: src/helper/jim-eventloop.c | 3 +-- src/helper/jim.c | 3 +++ src/helper/jim.h | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-10-19 15:15:45
|
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 60b66deb4f75efb325dbdf7de7f8bf7c6518376d (commit) from 06fd6e7d67ab31d6cf23461e01d0bbe225bbf488 (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 60b66deb4f75efb325dbdf7de7f8bf7c6518376d Author: oyvind <oyvind@titan.(none)> Date: Mon Oct 19 15:08:52 2009 +0200 Switch from svn to git version string handling. diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index cb008a7..dc0efb0 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -23,15 +23,15 @@ #include "embeddedice.h" #include "minidriver.h" #include "interface.h" +#include "zy1000_version.h" #include <cyg/hal/hal_io.h> // low level i/o #include <cyg/hal/hal_diag.h> - -#define ZYLIN_VERSION "1.55" +#define ZYLIN_VERSION GIT_ZY1000_VERSION #define ZYLIN_DATE __DATE__ #define ZYLIN_TIME __TIME__ -#define ZYLIN_OPENOCD "$Revision$" +#define ZYLIN_OPENOCD GIT_OPENOCD_VERSION #define ZYLIN_OPENOCD_VERSION "Zylin JTAG ZY1000 " ZYLIN_VERSION " " ZYLIN_DATE " " ZYLIN_TIME /* low level command set @@ -270,10 +270,7 @@ static int jim_zy1000_version(Jim_Interp *interp, int argc, Jim_Obj *const *argv const char *str = Jim_GetString(argv[1], NULL); if (strcmp("openocd", str) == 0) { - int revision; - revision = atol(ZYLIN_OPENOCD + strlen("XRevision: ")); - sprintf(buff, "%d", revision); - version_str = buff; + version_str = ZYLIN_OPENOCD; } else if (strcmp("zy1000", str) == 0) { ----------------------------------------------------------------------- Summary of changes: src/jtag/zy1000/zy1000.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-10-18 22:27: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 06fd6e7d67ab31d6cf23461e01d0bbe225bbf488 (commit) from c7941f3aa02cc53e741b0a42531098aded64a5db (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 06fd6e7d67ab31d6cf23461e01d0bbe225bbf488 Author: Dean Glazeski <dn...@gm...> Date: Sun Oct 18 22:26:38 2009 +0200 SDRAM and clock configuration for the SAM9-L9260 board from Olimex diff --git a/tcl/board/olimex_sam9_l9260.cfg b/tcl/board/olimex_sam9_l9260.cfg index fbd8f5c..b5cd10e 100644 --- a/tcl/board/olimex_sam9_l9260.cfg +++ b/tcl/board/olimex_sam9_l9260.cfg @@ -1,10 +1,89 @@ -## -# Olimex SAM9-L9260 board configuration file +################################################################################ +# Olimex SAM9-L9260 Development Board # -# Date Author Change -# ---- ----- ----- -# 17/Jan/2009 Dean Glazeski Initial Creation +# http://www.olimex.com/dev/sam9-L9260.html # -## +# Atmel AT91SAM9260 : PLLA = 198.656 MHz, MCK = 99.328 MHz +# PMC configured for external 18.432 MHz crystal +# +# 32-bit SDRAM : 2 x Samsung K4S561632J-UC75, 4M x 16Bit x 4 Banks +# 8-bit NAND Flash : 1 x Samsung K9F4G08U0M, 512M x 8Bit +# Dataflash : 1 x Atmel AT45DB161D, 16Mbit +# +################################################################################ source [find target/at91sam9260.cfg] + +# NTRST_E jumper is enabled by default, so we don't need to override the reset +# config. +#reset_config srst_only + +$_TARGETNAME configure -event reset-start { + # At reset, CPU runs at 32.768 kHz. JTAG frequency must be 6 times slower if + # RCLK is not supported. + jtag_rclk 5 + halt + + # RSTC_MR : enable user reset, reset length is 64 slow clock cycles. MMU may + # be enabled... use physical address. + arm926ejs mww_phys 0xfffffd08 0xa5000501 +} + +$_TARGETNAME configure -event reset-init { + mww 0xfffffd44 0x00008000 # WDT_MR : disable watchdog + + ## + # Clock configuration for 99.328 MHz main clock. + ## + mww 0xfffffc20 0x00004001 # CKGR_MOR : enable main oscillator, 512 slow clock startup + sleep 20 # wait 20 ms (need 15.6 ms for startup) + mww 0xfffffc30 0x00000001 # PMC_MCKR : switch to main oscillator (18.432 MHz) + sleep 10 # wait 10 ms + mww 0xfffffc28 0x2060bf09 # CKGR_PLLAR : 18.432 MHz / 9 * 97 = 198.656 MHz, 63 slow clock startup + sleep 20 # wait 20 ms (need 1.9 ms for startup) + mww 0xfffffc30 0x00000101 # PMC_MCKR : no scale on proc clock, master is proc / 2 + sleep 10 # wait 10 ms + mww 0xfffffc30 0x00000102 # PMC_MCKR : switch to PLLA (99.328 MHz) + + # Increase JTAG speed to 6 MHz if RCLK is not supported. + jtag_rclk 6000 + + arm7_9 dcc_downloads enable # Enable faster DCC downloads. + + ## + # SDRAM configuration for 2 x Samsung K4S561632J-UC75, 4M x 16Bit x 4 Banks. + ## + mww 0xfffff870 0xffff0000 # PIOC_ASR : select peripheral function for D15..D31 + mww 0xfffff804 0xffff0000 # PIOC_PDR : disable PIO function for D15..D31 + + mww 0xffffef1c 0x00010002 # EBI_CSA : assign EBI CS1 to SDRAM, VDDIOMSEL set for +3V3 memory + + mww 0xffffea08 0x85237259 # SDRAMC_CR : configure SDRAM for Samsung chips + + mww 0xffffea00 0x1 # SDRAMC_MR : issue NOP command + mww 0x20000000 0 + mww 0xffffea00 0x2 # SDRAMC_MR : issue an 'All Banks Precharge' command + mww 0x20000000 0 + mww 0xffffea00 0x4 # SDRAMC_MR : issue 8 x 'Auto-Refresh' command + mww 0x20000000 0 + mww 0xffffea00 0x4 + mww 0x20000000 0 + mww 0xffffea00 0x4 + mww 0x20000000 0 + mww 0xffffea00 0x4 + mww 0x20000000 0 + mww 0xffffea00 0x4 + mww 0x20000000 0 + mww 0xffffea00 0x4 + mww 0x20000000 0 + mww 0xffffea00 0x4 + mww 0x20000000 0 + mww 0xffffea00 0x4 + mww 0x20000000 0 + mww 0xffffea00 0x3 # SDRAMC_MR : issue a 'Load Mode Register' command + mww 0x20000000 0 + mww 0xffffea00 0x0 # SDRAMC_MR : normal mode + mww 0x20000000 0 + + mww 0xffffea04 0x2b6 # SDRAMC_TR : set refresh timer count to 7 us +} ----------------------------------------------------------------------- Summary of changes: tcl/board/olimex_sam9_l9260.cfg | 91 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 85 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-18 07:18:57
|
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 c7941f3aa02cc53e741b0a42531098aded64a5db (commit) from d0e1b14ef6a4465eaad750d2d4def1ad8e76f6fc (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 c7941f3aa02cc53e741b0a42531098aded64a5db Author: Redirect 'Slash' NIL <red...@gm...> Date: Sat Oct 17 22:18:38 2009 -0700 safer conversion to HANDLER on MinGW-W64 Assign to "intptr_t", which on some versions of MS-Windows will widen the variable; then cast to HANDLE. diff --git a/src/helper/replacements.c b/src/helper/replacements.c index 77e4ee7..ef20e77 100644 --- a/src/helper/replacements.c +++ b/src/helper/replacements.c @@ -169,7 +169,7 @@ int win_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct time /* build an array of handles for non-sockets */ for (i = 0; i < max_fd; i++) { if (SAFE_FD_ISSET(i, rfds) || SAFE_FD_ISSET(i, wfds) || SAFE_FD_ISSET(i, efds)) { - long handle = _get_osfhandle(i); + intptr_t handle = (intptr_t) _get_osfhandle(i); handles[n_handles] = (HANDLE)handle; if (handles[n_handles] == INVALID_HANDLE_VALUE) { /* socket */ @@ -244,7 +244,7 @@ int win_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct time if (WAIT_OBJECT_0 == WaitForSingleObject(handles[i], 0)) { if (SAFE_FD_ISSET(handle_slot_to_fd[i], rfds)) { DWORD dwBytes; - long handle = _get_osfhandle(handle_slot_to_fd[i]); + intptr_t handle = (intptr_t) _get_osfhandle(handle_slot_to_fd[i]); if (PeekNamedPipe((HANDLE)handle, NULL, 0, NULL, &dwBytes, NULL)) { ----------------------------------------------------------------------- Summary of changes: src/helper/replacements.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-18 03:50:49
|
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 d0e1b14ef6a4465eaad750d2d4def1ad8e76f6fc (commit) via c758cfbd6c14f153b49a70d2b0b466110b2e4404 (commit) from 7db3d860386591599bb62e908e9b32ce25cf3168 (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 d0e1b14ef6a4465eaad750d2d4def1ad8e76f6fc Author: David Brownell <dbr...@us...> Date: Sat Oct 17 17:50:23 2009 -0700 Ignore two more generated files On Windows the name is "bin2char.exe". All operating systems now have "xscale_handler.h". diff --git a/.gitignore b/.gitignore index f092697..ec8c9a7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,13 @@ *.lo *.la *.in + startup_tcl.c +xscale_debug.h + bin2char +bin2char.exe + doc/openocd.aux doc/openocd.cp doc/openocd.cps commit c758cfbd6c14f153b49a70d2b0b466110b2e4404 Author: Redirect 'Slash' NIL <red...@gm...> Date: Sat Oct 17 17:47:52 2009 -0700 More MinGW C99 printf compliance Passing "--std=gun99" is unfortunately not sufficient to make current MinGW compilers conform with respect to checking printf format strings. (The C runtime seems not to have problems.) Fix by using a "gnu_printf" format specifier not "printf". diff --git a/src/helper/command.h b/src/helper/command.h index 2b9f1a1..c574efd 100644 --- a/src/helper/command.h +++ b/src/helper/command.h @@ -35,6 +35,14 @@ #include "jim.h" #endif +/* To achieve C99 printf compatibility in MinGW, gnu_printf should */ +/* be used for __attribute__((format( ... ))) */ +#ifdef IS_MINGW +#define PRINTF_ATTRIBUTE_FORMAT gnu_printf +#else +#define PRINTF_ATTRIBUTE_FORMAT printf +#endif + enum command_mode { COMMAND_EXEC, @@ -85,12 +93,12 @@ extern command_context_t* command_init(void); extern int command_done(command_context_t *context); extern void command_print(command_context_t *context, const char *format, ...) - __attribute__ ((format (printf, 2, 3))); + __attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 2, 3))); extern void command_print_sameline(command_context_t *context, const char *format, ...) - __attribute__ ((format (printf, 2, 3))); + __attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 2, 3))); extern int command_run_line(command_context_t *context, char *line); extern int command_run_linef(command_context_t *context, const char *format, ...) - __attribute__ ((format (printf, 2, 3))); + __attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 2, 3))); extern void command_output_text(command_context_t *context, const char *data); extern void process_jim_events(void); diff --git a/src/helper/log.h b/src/helper/log.h index 7fc5a88..8f6ac77 100644 --- a/src/helper/log.h +++ b/src/helper/log.h @@ -28,6 +28,14 @@ #include "command.h" +/* To achieve C99 printf compatibility in MinGW, gnu_printf should */ +/* be used for __attribute__((format( ... ))) */ +#ifdef IS_MINGW +#define PRINTF_ATTRIBUTE_FORMAT gnu_printf +#else +#define PRINTF_ATTRIBUTE_FORMAT printf +#endif + /* logging priorities * LOG_LVL_SILENT - turn off all output. In lieu of try + catch this can be used as a * feeble ersatz. @@ -52,10 +60,10 @@ enum log_levels extern void log_printf(enum log_levels level, const char *file, int line, const char *function, const char *format, ...) -__attribute__ ((format (printf, 5, 6))); +__attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 5, 6))); extern void log_printf_lf(enum log_levels level, const char *file, int line, const char *function, const char *format, ...) -__attribute__ ((format (printf, 5, 6))); +__attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 5, 6))); extern int log_register_commands(struct command_context_s *cmd_ctx); extern int log_init(struct command_context_s *cmd_ctx); extern int set_log_output(struct command_context_s *cmd_ctx, FILE *output); diff --git a/src/target/arm11.h b/src/target/arm11.h index 61c5f7f..9afff23 100644 --- a/src/target/arm11.h +++ b/src/target/arm11.h @@ -33,8 +33,9 @@ type * variable = calloc(1, sizeof(type) * items) /* For MinGW use 'I' prefix to print size_t (instead of 'z') */ +/* Except if __USE_MINGW_ANSI_STDIO is defined with MinGW */ -#ifndef __MSVCRT__ +#if (!defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)) #define ZU "%zu" #else #define ZU "%Iu" ----------------------------------------------------------------------- Summary of changes: .gitignore | 5 +++++ src/helper/command.h | 14 +++++++++++--- src/helper/log.h | 12 ++++++++++-- src/target/arm11.h | 3 ++- 4 files changed, 28 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-17 21:54:16
|
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 7db3d860386591599bb62e908e9b32ce25cf3168 (commit) via 1b28e0337dfdf34a3f700722c7c2b7304adb7f2e (commit) from 0bd885f539dc6e085a2b16851ab4e5173aa22a6c (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 7db3d860386591599bb62e908e9b32ce25cf3168 Author: Redirect \"Slash\" NIL <red...@gm...> Date: Sat Oct 17 12:15:13 2009 -0700 jim-eventloop for MinGW-w64 Use JIM_WIDE_MODIFIER for the sscanf format, and apply it for MINGW32 as well as other Windows environments. (Microsoft doesn't conform to the C99 standard, and uses "%I64d" not "%lld" for "long long".) NB: __MINGW32__ should work on both w32 and w64,. diff --git a/src/helper/jim-eventloop.c b/src/helper/jim-eventloop.c index 5da00c9..edeeae7 100644 --- a/src/helper/jim-eventloop.c +++ b/src/helper/jim-eventloop.c @@ -498,7 +498,7 @@ static int JimELAfterCommand(Jim_Interp *interp, int argc, int tlen ; jim_wide remain = 0; const char *tok = Jim_GetString(argv[2], &tlen); - if (sscanf(tok,"after#%lld",&id) == 1) { + if (sscanf(tok,"after#%" JIM_WIDE_MODIFIER, &id) == 1) { remain = Jim_DeleteTimeHandler(interp, id); if (remain > -2) { Jim_SetResult(interp, Jim_NewIntObj(interp, remain)); diff --git a/src/helper/jim.h b/src/helper/jim.h index 82d987f..0aa0c93 100644 --- a/src/helper/jim.h +++ b/src/helper/jim.h @@ -120,7 +120,7 @@ extern "C" { * ---------------------------------------------------------------------------*/ #ifdef HAVE_LONG_LONG_INT -# if defined(_MSC_VER) || defined(__MSVCRT__) +# if defined(_MSC_VER) || defined(__MSVCRT__) || defined(__MINGW32__) # define JIM_WIDE_MODIFIER "I64d" # else # define JIM_WIDE_MODIFIER "lld" commit 1b28e0337dfdf34a3f700722c7c2b7304adb7f2e Author: David Brownell <dbr...@us...> Date: Sat Oct 17 12:14:19 2009 -0700 build tweak for bin2char Work better when building outside the source tree. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/Makefile.am b/src/target/Makefile.am index ea1641e..bdef58c 100644 --- a/src/target/Makefile.am +++ b/src/target/Makefile.am @@ -10,10 +10,11 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/jtag \ -I$(top_srcdir)/src/xsvf -BIN2C = $(top_srcdir)/src/helper/bin2char$(EXEEXT_FOR_BUILD) +BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD) +DEBUG_HANDLER = $(top_srcdir)/src/target/xscale/debug_handler.bin -xscale_debug.h: $(BIN2C) xscale/debug_handler.bin - $(BIN2C) < xscale/debug_handler.bin xscale_debug_handler > xscale_debug.h +xscale_debug.h: $(BIN2C) $(DEBUG_HANDLER) + $(BIN2C) < $(DEBUG_HANDLER) xscale_debug_handler > xscale_debug.h METASOURCES = AUTO noinst_LTLIBRARIES = libtarget.la ----------------------------------------------------------------------- Summary of changes: src/helper/jim-eventloop.c | 2 +- src/helper/jim.h | 2 +- src/target/Makefile.am | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-16 22:53: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 0bd885f539dc6e085a2b16851ab4e5173aa22a6c (commit) from 82c1c78d5e26351fb15c06410ad519a9b175d30c (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 0bd885f539dc6e085a2b16851ab4e5173aa22a6c Author: David Brownell <dbr...@us...> Date: Fri Oct 16 13:52:40 2009 -0700 xscale: better fix for debug_handler.bin Generate a C struct with the data, and use that, instead of an assembly language file. The assembly language causes issues on Darwin and MS-Windows, which don't necessarily use GNU AS; or if they do, don't necessarily use its ELF syntax. It's also better in two other ways: fewer global symbols; and the init-time size check gets optimized away at compile time. (Unless it fails, in which case bigger chunks of the file vanish.) Signed-off-by: David Brownell <dbr...@us...> diff --git a/configure.in b/configure.in index 84574be..8e2881c 100644 --- a/configure.in +++ b/configure.in @@ -16,7 +16,6 @@ AC_LANG_C AC_PROG_CC AC_PROG_CC_C99 AM_PROG_CC_C_O -AM_PROG_AS AC_PROG_RANLIB dnl disable checks for C++, Fortran and GNU Java Compiler diff --git a/src/helper/Makefile.am b/src/helper/Makefile.am index 7047253..67250a1 100644 --- a/src/helper/Makefile.am +++ b/src/helper/Makefile.am @@ -52,12 +52,16 @@ noinst_HEADERS = \ startup.tcl \ bin2char.c -bin2char$(EXEEXT_FOR_BUILD): bin2char.c +BIN2C = bin2char$(EXEEXT_FOR_BUILD) + +BUILT_SOURCES = $(BIN2C) + +$(BIN2C): bin2char.c ${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} $(srcdir)/bin2char.c -o $@ # Convert .tcl to cfile -startup_tcl.c: startup.tcl bin2char$(EXEEXT_FOR_BUILD) - ./bin2char$(EXEEXT_FOR_BUILD) startup_tcl < $(srcdir)/startup.tcl > $@ +startup_tcl.c: startup.tcl $(BIN2C) + ./$(BIN2C) startup_tcl < $(srcdir)/startup.tcl > $@ # add startup_tcl.c to make clean list CLEANFILES = startup_tcl.c bin2char$(EXEEXT_FOR_BUILD) diff --git a/src/target/Makefile.am b/src/target/Makefile.am index a2c34f0..ea1641e 100644 --- a/src/target/Makefile.am +++ b/src/target/Makefile.am @@ -10,11 +10,10 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/jtag \ -I$(top_srcdir)/src/xsvf -# ideally this would be specific to xscale_debug.S ... -libtarget_la_CCASFLAGS = \ - -Wa,-I$(top_srcdir)/src/target \ - $(AM_CCASFLAGS) +BIN2C = $(top_srcdir)/src/helper/bin2char$(EXEEXT_FOR_BUILD) +xscale_debug.h: $(BIN2C) xscale/debug_handler.bin + $(BIN2C) < xscale/debug_handler.bin xscale_debug_handler > xscale_debug.h METASOURCES = AUTO noinst_LTLIBRARIES = libtarget.la @@ -41,7 +40,6 @@ libtarget_la_SOURCES = \ feroceon.c \ etb.c \ xscale.c \ - xscale_debug.S \ arm_simulator.c \ image.c \ armv7m.c \ @@ -62,6 +60,9 @@ libtarget_la_SOURCES = \ mips_ejtag.c \ avrt.c +BUILT_SOURCES = \ + xscale_debug.h + noinst_HEADERS = \ target.h \ target_type.h \ @@ -85,6 +86,7 @@ noinst_HEADERS = \ arm926ejs.h \ etb.h \ xscale.h \ + xscale_debug.h \ arm_simulator.h \ image.h \ armv7m.h \ diff --git a/src/target/xscale.c b/src/target/xscale.c index dd16b35..640eb01 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -69,6 +69,17 @@ static int xscale_unset_breakpoint(struct target_s *, breakpoint_t *); static int xscale_read_trace(target_t *); +/* This XScale "debug handler" is loaded into the processor's + * mini-ICache, which is 2K of code writable only via JTAG. + * + * FIXME the OpenOCD "bin2char" utility currently doesn't handle + * binary files cleanly. It's string oriented, and terminates them + * with a NUL character. Better would be to generate the constants + * and let other code decide names, scoping, and other housekeeping. + */ +static /* unsigned const char xscale_debug_handler[] = ... */ +#include "xscale_debug.h" + static char *const xscale_reg_list[] = { "XSCALE_MAINID", /* 0 */ @@ -1594,7 +1605,7 @@ static int xscale_deassert_reset(target_t *target) * force that, so writing new contents is reliable... */ address = xscale->handler_address; - for (unsigned binary_size = xscale_debug_handler_size; + for (unsigned binary_size = sizeof xscale_debug_handler - 1; binary_size > 0; binary_size -= buf_cnt, buffer += buf_cnt) { @@ -3030,7 +3041,7 @@ static int xscale_target_create(struct target_s *target, Jim_Interp *interp) { xscale_common_t *xscale; - if (xscale_debug_handler_size > 0x800) { + if (sizeof xscale_debug_handler - 1 > 0x800) { LOG_ERROR("debug_handler.bin: larger than 2kb"); return ERROR_FAIL; } diff --git a/src/target/xscale.h b/src/target/xscale.h index 9d92550..a5d83ee 100644 --- a/src/target/xscale.h +++ b/src/target/xscale.h @@ -170,10 +170,4 @@ enum #define ERROR_XSCALE_NO_TRACE_DATA (-1500) -/* This XScale "debug handler" is loaded into the processor's - * mini-ICache, which is 2K of code writable only via JTAG. - */ -extern const uint8_t xscale_debug_handler[]; -extern const uint32_t xscale_debug_handler_size; - #endif /* XSCALE_H */ diff --git a/src/target/xscale_debug.S b/src/target/xscale_debug.S deleted file mode 100644 index 0a7b87d..0000000 --- a/src/target/xscale_debug.S +++ /dev/null @@ -1,13 +0,0 @@ - .section .rodata - - .align 4 - .global xscale_debug_handler -xscale_debug_handler: - .incbin "xscale/debug_handler.bin" - .size xscale_debug_handler, . - xscale_debug_handler - - .align 4 - .global xscale_debug_handler_size -xscale_debug_handler_size: - .word . - xscale_debug_handler - .size xscale_debug_handler_size, 4 ----------------------------------------------------------------------- Summary of changes: configure.in | 1 - src/helper/Makefile.am | 10 +++++++--- src/target/Makefile.am | 12 +++++++----- src/target/xscale.c | 15 +++++++++++++-- src/target/xscale.h | 6 ------ src/target/xscale_debug.S | 13 ------------- 6 files changed, 27 insertions(+), 30 deletions(-) delete mode 100644 src/target/xscale_debug.S hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-15 05:24:50
|
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 82c1c78d5e26351fb15c06410ad519a9b175d30c (commit) from ab3e9131136963201cedbd40afef010bea6b31c0 (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 82c1c78d5e26351fb15c06410ad519a9b175d30c Author: David Brownell <dbr...@us...> Date: Wed Oct 14 20:24:31 2009 -0700 another portability update Just use "%p" instead of consing up some integral type for pointer printf. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/flash/mflash.c b/src/flash/mflash.c index 208125e..63ba054 100644 --- a/src/flash/mflash.c +++ b/src/flash/mflash.c @@ -474,8 +474,8 @@ static int mg_mflash_read_sects(void *buff, uint32_t sect_num, uint32_t sect_cnt residue = sect_cnt % 256; for (i = 0; i < quotient; i++) { - LOG_DEBUG("mflash: sect num : %" PRIu32 " buff : 0x%0lx", sect_num, - (unsigned long)buff_ptr); + LOG_DEBUG("mflash: sect num : %" PRIu32 " buff : %p", + sect_num, buff_ptr); ret = mg_mflash_do_read_sects(buff_ptr, sect_num, 256); if (ret != ERROR_OK) return ret; @@ -485,8 +485,8 @@ static int mg_mflash_read_sects(void *buff, uint32_t sect_num, uint32_t sect_cnt } if (residue) { - LOG_DEBUG("mflash: sect num : %" PRIx32 " buff : %0lx", sect_num, - (unsigned long)buff_ptr); + LOG_DEBUG("mflash: sect num : %" PRIx32 " buff : %p", + sect_num, buff_ptr); return mg_mflash_do_read_sects(buff_ptr, sect_num, residue); } ----------------------------------------------------------------------- Summary of changes: src/flash/mflash.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-15 05:05: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 ab3e9131136963201cedbd40afef010bea6b31c0 (commit) from 1a9c531938e55c6b05c1d02a895a2300c7ac1a55 (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 ab3e9131136963201cedbd40afef010bea6b31c0 Author: David Brownell <dbr...@us...> Date: Wed Oct 14 20:04:33 2009 -0700 portability updates Based on some patches from <red...@gm...> for preliminary Win64 compilation. More such updates are needed, but they need work. Compile tested on 64 and 32 bit Linuxes, and Cygwin. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/helper/jim.c b/src/helper/jim.c index 48e21e9..dfee1dd 100644 --- a/src/helper/jim.c +++ b/src/helper/jim.c @@ -4754,7 +4754,7 @@ const char *Jim_GetSharedString(Jim_Interp *interp, const char *str) Jim_AddHashEntry(&interp->sharedStrings, strCopy, (void*)1); return strCopy; } else { - long refCount = (long) he->val; + intptr_t refCount = (intptr_t) he->val; refCount++; he->val = (void*) refCount; @@ -4764,13 +4764,13 @@ const char *Jim_GetSharedString(Jim_Interp *interp, const char *str) void Jim_ReleaseSharedString(Jim_Interp *interp, const char *str) { - long refCount; + intptr_t refCount; Jim_HashEntry *he = Jim_FindHashEntry(&interp->sharedStrings, str); if (he == NULL) Jim_Panic(interp,"Jim_ReleaseSharedString called with " "unknown shared string '%s'", str); - refCount = (long) he->val; + refCount = (intptr_t) he->val; refCount--; if (refCount == 0) { Jim_DeleteHashEntry(&interp->sharedStrings, str); diff --git a/src/jtag/core.c b/src/jtag/core.c index 564b93f..415d1e8 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -991,8 +991,9 @@ static bool jtag_examine_chain_match_tap(const struct jtag_tap_s *tap) return true; /* Loop over the expected identification codes and test for a match */ - uint8_t ii; - for (ii = 0; ii < tap->expected_ids_cnt; ii++) + unsigned ii, limit = tap->expected_ids_cnt; + + for (ii = 0; ii < limit; ii++) { if (tap->idcode == tap->expected_ids[ii]) return true; @@ -1005,11 +1006,11 @@ static bool jtag_examine_chain_match_tap(const struct jtag_tap_s *tap) /* If none of the expected ids matched, warn */ jtag_examine_chain_display(LOG_LVL_WARNING, "UNEXPECTED", tap->dotted_name, tap->idcode); - for (ii = 0; ii < tap->expected_ids_cnt; ii++) + for (ii = 0; ii < limit; ii++) { char msg[32]; - snprintf(msg, sizeof(msg), "expected %hhu of %hhu", - ii + 1, tap->expected_ids_cnt); + + snprintf(msg, sizeof(msg), "expected %u of %u", ii + 1, limit); jtag_examine_chain_display(LOG_LVL_ERROR, msg, tap->dotted_name, tap->expected_ids[ii]); } diff --git a/src/target/arm11.c b/src/target/arm11.c index 94d5fb1..289d64c 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -1656,10 +1656,10 @@ int arm11_run_algorithm(struct target_s *target, int num_mem_params, mem_param_t // return ERROR_FAIL; // Save regs - for (size_t i = 0; i < 16; i++) + for (unsigned i = 0; i < 16; i++) { context[i] = buf_get_u32((uint8_t*)(&arm11->reg_values[i]),0,32); - LOG_DEBUG("Save %zi: 0x%" PRIx32 "",i,context[i]); + LOG_DEBUG("Save %u: 0x%" PRIx32 "", i, context[i]); } cpsr = buf_get_u32((uint8_t*)(arm11->reg_values + ARM11_RC_CPSR),0,32); diff --git a/src/target/armv4_5.h b/src/target/armv4_5.h index 3c8411f..7ea3826 100644 --- a/src/target/armv4_5.h +++ b/src/target/armv4_5.h @@ -74,7 +74,7 @@ typedef struct armv4_5_common_s { int common_magic; reg_cache_t *core_cache; - enum armv4_5_mode core_mode; + int /* armv4_5_mode */ core_mode; enum armv4_5_state core_state; bool is_armv4; int (*full_context)(struct target_s *target); ----------------------------------------------------------------------- Summary of changes: src/helper/jim.c | 6 +++--- src/jtag/core.c | 11 ++++++----- src/target/arm11.c | 4 ++-- src/target/armv4_5.h | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-15 00:18: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 1a9c531938e55c6b05c1d02a895a2300c7ac1a55 (commit) from 251b5efa04fd3a34f174c2ce91544c39391b4fbd (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 1a9c531938e55c6b05c1d02a895a2300c7ac1a55 Author: David Brownell <dbr...@us...> Date: Wed Oct 14 15:18:00 2009 -0700 doc updates to match "help" better This makes the documentation a closer match to "help" output: - "pathmove" somehow was not documented in the User's Guide - "jtag_nsrst_assert_width" and "jtag_ntrst_assert_width" are new; both needed descriptions. - Removed two undocumented and fairly useless script mechanisms: * production/production_info/production_test ... using it, requires replacing everything; so having it adds no value. * cpu ... way out of date; hopeless to keep that current Note that anyone using that "production" stuff already defines their own procedures, and can keep using them with no change. Signed-off-by: David Brownell <dbr...@us...> diff --git a/doc/openocd.texi b/doc/openocd.texi index fd4f9f7..6d33d56 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -2221,6 +2221,12 @@ needing to cope with both architecture and board specific constraints. @section Commands for Handling Resets +@deffn {Command} jtag_nsrst_assert_width milliseconds +Minimum amount of time (in milliseconds) OpenOCD should wait +after asserting nSRST (active-low system reset) before +allowing it to be deasserted. +@end deffn + @deffn {Command} jtag_nsrst_delay milliseconds How long (in milliseconds) OpenOCD should wait after deasserting nSRST (active-low system reset) before starting new JTAG operations. @@ -2228,6 +2234,12 @@ When a board has a reset button connected to SRST line it will probably have hardware debouncing, implying you should use this. @end deffn +@deffn {Command} jtag_ntrst_assert_width milliseconds +Minimum amount of time (in milliseconds) OpenOCD should wait +after asserting nTRST (active-low JTAG TAP reset) before +allowing it to be deasserted. +@end deffn + @deffn {Command} jtag_ntrst_delay milliseconds How long (in milliseconds) OpenOCD should wait after deasserting nTRST (active-low JTAG TAP reset) before starting new JTAG operations. @@ -6075,6 +6087,15 @@ TAP @code{post-reset} events are delivered to all TAPs with handlers for that event. @end deffn +@deffn Command {pathmove} start_state [next_state ...] +Start by moving to @var{start_state}, which +must be one of the @emph{stable} states. +Then, in a series of single state transitions +(conforming to the JTAG state machine) shift to +each @var{next_state} in sequence, one per TCK cycle. +The final state must also be stable. +@end deffn + @deffn Command {runtest} @var{num_cycles} Move to the @sc{run/idle} state, and execute at least @var{num_cycles} of the JTAG clock (TCK). @@ -6102,23 +6123,30 @@ Default is enabled. @cindex TAP state names The @var{tap_state} names used by OpenOCD in the @command{drscan}, -and @command{irscan} commands are: +@command{irscan}, and @command{pathmove} commands are the same +as those used in SVF boundary scan documents, except that some +versions of SVF use @sc{idle} instead of @sc{run/idle}. @itemize @bullet -@item @b{RESET} ... acts as if TRST were pulsed -@item @b{RUN/IDLE} ... don't assume this always means IDLE +@item @b{RESET} ... @emph{stable} (with TMS high); +acts as if TRST were pulsed +@item @b{RUN/IDLE} ... @emph{stable}; don't assume this always means IDLE @item @b{DRSELECT} @item @b{DRCAPTURE} -@item @b{DRSHIFT} ... TDI/TDO shifting through the data register +@item @b{DRSHIFT} ... @emph{stable}; TDI/TDO shifting +through the data register @item @b{DREXIT1} -@item @b{DRPAUSE} ... data register ready for update or more shifting +@item @b{DRPAUSE} ... @emph{stable}; data register ready +for update or more shifting @item @b{DREXIT2} @item @b{DRUPDATE} @item @b{IRSELECT} @item @b{IRCAPTURE} -@item @b{IRSHIFT} ... TDI/TDO shifting through the instruction register +@item @b{IRSHIFT} ... @emph{stable}; TDI/TDO shifting +through the instruction register @item @b{IREXIT1} -@item @b{IRPAUSE} ... instruction register ready for update or more shifting +@item @b{IRPAUSE} ... @emph{stable}; instruction register ready +for update or more shifting @item @b{IREXIT2} @item @b{IRUPDATE} @end itemize diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl index b12d02b..2c90972 100644 --- a/src/helper/startup.tcl +++ b/src/helper/startup.tcl @@ -291,59 +291,10 @@ proc ocd_process_reset_inner { MODE } { } } -# stubs for targets scripts that do not have production procedure -proc production_info {} { - return "Imagine an explanation here..." -} -add_help_text production_info "Displays information on production procedure for target script. Implement this procedure in target script." - -proc production {firmwarefile serialnumber} { - puts "Imagine production procedure running successfully. Programmed $firmwarefile with serial number $serialnumber" -} - -add_help_text production "<serialnumber> - Runs production procedure. Throws exception if procedure failed. Prints progress messages. Implement this procedure in the target script." - -proc production_test {} { - puts "Imagine nifty test procedure having run to completion here." -} -add_help_text production_test "Runs test procedure. Throws exception if procedure failed. Prints progress messages. Implement in target script." - -add_help_text cpu "<name> - prints out target options and a comment on CPU which matches name" - -# A list of names of CPU and options required -set ocd_cpu_list { - { - name IXP42x - options {xscale -variant IXP42x} - comment {IXP42x cpu} - } - { - name arm7 - options {arm7tdmi -variant arm7tdmi} - comment {vanilla ARM7} - } -} - -# Invoked from Tcl code -proc ocd_cpu {args} { - set name $args - set result "" - global ocd_cpu_list - foreach a [lsort $ocd_cpu_list] { - if {[string length $args]==0||[string first [string toupper $name] [string toupper "$a(name)$a(options)$a(comment)"]]!=-1} { - lappend result $a - } - } - return $result -} +######### -proc cpu {args} { - # 0123456789012345678901234567890123456789012345678901234567890123456789 - puts "CPU Options Comment" - foreach a [lsort [ocd_cpu $args]] { - puts [format "%-20s%-40s%s" $a(name) $a(options) $a(comment)] - } -} +# REVISIT power_restore, power_dropout, srst_deasserted, srst_asserted +# are currently neither documented nor supported except on ZY1000. proc power_restore {} { puts "Sensed power restore." @@ -366,6 +317,8 @@ proc srst_asserted {} { puts "Sensed nSRST asserted." } +######### + # catch any exceptions, capture output and return output proc capture_catch {a} { catch { ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 42 +++++++++++++++++++++++++++++------ src/helper/startup.tcl | 57 ++++------------------------------------------- 2 files changed, 40 insertions(+), 59 deletions(-) hooks/post-receive -- Main OpenOCD repository |