[Openocd-development] Flashing AT91SAM7S256

2009-12-03 Thread Beema, Vishnu (IE10)
Hi, I am using Open OCD tool chain to debug the code and H-JTAG to flash the AT91SAM7S256 (Atmel - ARM based) controller. I have two queries on flashing the code into AT91SAM7S256 1. There are two locations where I can flash the code. One is at 0x00 and the other is at 0x10. What

Re: [Openocd-development] [PATCH] minidriver: allow jtag_add_dr_out() to be inlined into inner loops

2009-12-03 Thread Øyvind Harboe
So the minidriver (including classic API) must have control over whether or not the following fn's gets inlined or not. These fn's really are in the inner loops and boil away to *nothing* on a low performance low latency system. Note that I'm not keen on the idea of an ABI for OpenOCD, we need

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Zach Welch
On Thu, 2009-12-03 at 08:23 +0100, Øyvind Harboe wrote: I would like to see this merged. Any objections? Go for it! --Z ___ Openocd-development mailing list Openocd-development@lists.berlios.de

Re: [Openocd-development] [PATCH] minidriver: allow jtag_add_dr_out() to be inlined into inner loops

2009-12-03 Thread Zach Welch
On Thu, 2009-12-03 at 09:20 +0100, Øyvind Harboe wrote: The public API _must_ be a non-inline version of the API that calls the inline version. Period. You don't explain why this is necessary and I don't agree. I believe you assume that it is impossible to allow the minidriver to inline

Re: [Openocd-development] [PATCH] minidriver: allow jtag_add_dr_out() to be inlined into inner loops

2009-12-03 Thread Zach Welch
On Thu, 2009-12-03 at 09:53 +0100, Øyvind Harboe wrote: So the minidriver (including classic API) must have control over whether or not the following fn's gets inlined or not. These fn's really are in the inner loops and boil away to *nothing* on a low performance low latency system. And they

Re: [Openocd-development] [PATCH] feroceon.c should be part of ARM7_9_SRC

2009-12-03 Thread Øyvind Harboe
Pushed. -- Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer ___ Openocd-development mailing list

Re: [Openocd-development] [PATCH] minidriver: allow jtag_add_dr_out() to be inlined into inner loops

2009-12-03 Thread Zach Welch
On Thu, 2009-12-03 at 10:22 +0100, Øyvind Harboe wrote: (Ref. discussion I think we've settled that the minidriver can either implement an ABI or use inlining for performance.) On Thu, Dec 3, 2009 at 10:11 AM, Zach Welch z...@superlucidity.net wrote: On Thu, 2009-12-03 at 09:53 +0100,

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Zach Welch
On Thu, 2009-12-03 at 08:23 +0100, Øyvind Harboe wrote: I would like to see this merged. Any objections? Actually, I did just find two things: 1) The header is missing from the Makefile.am 2) The header is missing a copyright header and #ifdef wrapper --Z

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Øyvind Harboe
I added a missing #include sys/stat.h, but it is not quite ready to commit yet I think. Does it build under Windows? Perhaps it does, I didn't try. I don't think we should try to make this work under anything but POSIX API for now, but the build should not fail. Autotools magic? Some docs to

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Zach Welch
On Thu, 2009-12-03 at 10:39 +0100, Øyvind Harboe wrote: I added a missing #include sys/stat.h, but it is not quite ready to commit yet I think. Does it build under Windows? Perhaps it does, I didn't try. I don't think we should try to make this work under anything but POSIX API for now,

Re: [Openocd-development] libopenocd... again

2009-12-03 Thread Zach Welch
On Tue, 2009-12-01 at 21:08 -0800, Zach Welch wrote: Hi all, Assuming a split between policy and mechanism can be addressed, OpenOCD will become much more usable as a proper library. One of the questions that needs resolution is how to install our header files. The answer that we chose

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Igor Skochinsky
Hello Nicolas, Thursday, December 3, 2009, 7:58:05 AM, you wrote: NP Semihosting enables code running on an ARM target to use the I/O NP facilities on the host computer. The target application must be linked NP against a library that forwards operation requests by using the SVC NP instruction

Re: [Openocd-development] [PATCH] minidriver: allow jtag_add_dr_out() to be inlined into inner loops

2009-12-03 Thread Øyvind Harboe
On Thu, Dec 3, 2009 at 10:36 AM, Zach Welch z...@superlucidity.net wrote: On Thu, 2009-12-03 at 10:22 +0100, Øyvind Harboe wrote: (Ref. discussion I think we've settled that the minidriver can either implement an ABI or use inlining for performance.) On Thu, Dec 3, 2009 at 10:11 AM, Zach

Re: [Openocd-development] [PATCH] minidriver: allow jtag_add_dr_out() to be inlined into inner loops

2009-12-03 Thread Øyvind Harboe
(Ref. discussion I think we've settled that the minidriver can either implement an ABI or use inlining for performance.) On Thu, Dec 3, 2009 at 10:11 AM, Zach Welch z...@superlucidity.net wrote: On Thu, 2009-12-03 at 09:53 +0100, Øyvind Harboe wrote: So the minidriver (including classic API)

Re: [Openocd-development] [PATCH] minidriver: allow jtag_add_dr_out() to be inlined into inner loops

2009-12-03 Thread Zach Welch
On Thu, 2009-12-03 at 10:51 +0100, Øyvind Harboe wrote: On Thu, Dec 3, 2009 at 10:36 AM, Zach Welch z...@superlucidity.net wrote: On Thu, 2009-12-03 at 10:22 +0100, Øyvind Harboe wrote: (Ref. discussion I think we've settled that the minidriver can either implement an ABI or use inlining

Re: [Openocd-development] libopenocd... again

2009-12-03 Thread Zach Welch
On Thu, 2009-12-03 at 01:50 -0800, Zach Welch wrote: On Tue, 2009-12-01 at 21:08 -0800, Zach Welch wrote: Hi all, Assuming a split between policy and mechanism can be addressed, OpenOCD will become much more usable as a proper library. One of the questions that needs resolution is how

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Nicolas Pitre
On Thu, 3 Dec 2009, Zach Welch wrote: On Thu, 2009-12-03 at 10:39 +0100, Øyvind Harboe wrote: I added a missing #include sys/stat.h, but it is not quite ready to commit yet I think. Does it build under Windows? Perhaps it does, I didn't try. I don't think we should try to make this

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Nicolas Pitre
On Thu, 3 Dec 2009, Øyvind Harboe wrote: I added a missing #include sys/stat.h, but it is not quite ready to commit yet I think. Does it build under Windows? Perhaps it does, I didn't try. It probably does. We maintain both a Linux and Windows build internally and I didn't get any

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Nicolas Pitre
On Thu, 3 Dec 2009, Igor Skochinsky wrote: Hello Nicolas, Thursday, December 3, 2009, 7:58:05 AM, you wrote: NP Semihosting enables code running on an ARM target to use the I/O NP facilities on the host computer. The target application must be linked NP against a library that forwards

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Øyvind Harboe
I think it makes sense to wrap up this patch and get it pushed. Zach had some suggestions to the C code and a tiny bit of docs and I think we're good to go. -- Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Zach Welch
On Thu, 2009-12-03 at 12:27 -0500, Nicolas Pitre wrote: On Thu, 3 Dec 2009, Zach Welch wrote: On Thu, 2009-12-03 at 10:39 +0100, Øyvind Harboe wrote: I added a missing #include sys/stat.h, but it is not quite ready to commit yet I think. Does it build under Windows? Perhaps

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Nicolas Pitre
On Thu, 3 Dec 2009, Zach Welch wrote: On Thu, 2009-12-03 at 12:27 -0500, Nicolas Pitre wrote: On Thu, 3 Dec 2009, Zach Welch wrote: On Thu, 2009-12-03 at 10:39 +0100, Øyvind Harboe wrote: I added a missing #include sys/stat.h, but it is not quite ready to commit yet I think.

[Openocd-development] [PATCH v2] basic ARM semihosting support

2009-12-03 Thread Nicolas Pitre
Semihosting enables code running on an ARM target to use the I/O facilities on the host computer. The target application must be linked against a library that forwards operation requests by using the SVC instruction that is trapped at the SWI vector by the debugger. The hosted library version

Re: [Openocd-development] [PUSHED 7/7] split the 'init' command

2009-12-03 Thread David Brownell
Another issue: runtest is broken now too ... your target: factor init to 'target init' patch broke it by previnting JTAG event handlers from using methods like runtest (which is essential for some platforms). I'm checking in the following patch, since it fixes the regression, but I'm not sure

[Openocd-development] [patch 2/3] ARM11: use shared DSCR bit names

2009-12-03 Thread David Brownell
For the bits now defined in arm_dpm.h, switch to the shared DSCR_* symbol and remove the ARM11_DSCR_* version. Define DSCR_INT_DIS and use it instead of the ARM11_DSCR_* sibling symbol. (Note: for both ARM11 and Cortex-A8, this should arguably be enabled by default when single stepping.)

[Openocd-development] [patch 1/3] ARM DPM: make DSCR bit defs sharable

2009-12-03 Thread David Brownell
Move the symbols for these bits from armv7a.h to arm_dpm.h, where they can be seen and used not just by Cortex-A but also by the ARM11 (armv6) code. Change them from bit numbers to bit masks ... this matches the usage in ARM11 code, and also makes it easier to read. Rename DSCR_EXT_INT_EN as

[Openocd-development] [patch 3/3] ARM DPM: share debug reason logic

2009-12-03 Thread David Brownell
No point in both ARM11 and Cortex-A8 having private copies of the logic sorting out e.g. DBG_REASON_WATCHPOINT. Add and use a shared routine for this ... there's actually a bunch more debug entry logic that could be shared, this is just a start on that. Note that this routine fixes a bug

Re: [Openocd-development] everything must be used before init ??

2009-12-03 Thread David Brownell
On Sunday 29 November 2009, Zach Welch wrote: Broken how?  It's worked as advertised, as far as I know. It was allowing all commands to run during CONFIG stage, regardless of whether they were marked EXEC-only.  Broken. The key instant seems to be when JTAG starts. Once that starts,

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread David Brownell
Cool! On Thursday 03 December 2009, Nicolas Pitre wrote: Some docs to openocd.texi would be great. It sure would.  ;-) More like essential. ;) Also, NEWS; and surely a few TODO list updates (like that mapping table, etc). What's the story on how one would *use* this? Must target code be

Re: [Openocd-development] everything must be used before init ??

2009-12-03 Thread Zach Welch
On Thu, 2009-12-03 at 15:00 -0800, David Brownell wrote: On Sunday 29 November 2009, Zach Welch wrote: Broken how? It's worked as advertised, as far as I know. It was allowing all commands to run during CONFIG stage, regardless of whether they were marked EXEC-only. Broken. The

Re: [Openocd-development] [PATCH v2] basic ARM semihosting support

2009-12-03 Thread David Brownell
On Thursday 03 December 2009, Nicolas Pitre wrote: Semihosting enables code running on an ARM target to use the I/O facilities on the host computer. The target application must be linked against a library that forwards operation requests by using the SVC instruction that is trapped at the SWI

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread Nicolas Pitre
On Thu, 3 Dec 2009, David Brownell wrote: Cool! On Thursday 03 December 2009, Nicolas Pitre wrote: Some docs to openocd.texi would be great. It sure would.  ;-) More like essential. ;) I provided the minimum in version 2 of the patch. For improved prose I'll defer to those

Re: [Openocd-development] [PATCH v2] basic ARM semihosting support

2009-12-03 Thread Nicolas Pitre
On Thu, 3 Dec 2009, David Brownell wrote: On Thursday 03 December 2009, Nicolas Pitre wrote: Semihosting enables code running on an ARM target to use the I/O facilities on the host computer. The target application must be linked against a library that forwards operation requests by using

Re: [Openocd-development] AT91SAM9 NAND Driver

2009-12-03 Thread David Brownell
On Monday 23 November 2009, Dean Glazeski wrote: point.  The new play area is http://repo.or.cz/w/openocd/dnglaze.git.  I've I merged a few more of those patches, including one bit of patch merging I had requested. For the NAND refactoring stuff, please fix the error handling so it doesn't

[Openocd-development] [PATCH 1/4] switch 'rm' command away from using Jim

2009-12-03 Thread Zachary T Welch
Commands that do not need to use Jim should be registered as high-level command handlers. Signed-off-by: Zachary T Welch z...@superlucidity.net --- src/helper/ioutil.c | 29 +++-- 1 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/helper/ioutil.c

[Openocd-development] [PATCH 4/4] add flash/nor/core.[ch]

2009-12-03 Thread Zachary T Welch
The newly moved flash TCL routines access the internals of the module too much. Fix the layering issues by adding new core NOR flash APIs: flash/nor/core.h: - flash_driver_find_by_name() - self-descriptive flash/nor/imp.h: - flash_bank_add()- encapsulates adding banks to bank

[Openocd-development] [PATCH 2/4] separate Jim from jtag/core.c

2009-12-03 Thread Zachary T Welch
After previous efforts, only one Jim routine remained in jtag/core.c, and moving it to jtag/tcl.c painlessly finishes separating these layers. The headers need separating, but the implementation is clean. Signed-off-by: Zachary T Welch z...@superlucidity.net --- src/jtag/core.c | 11

[Openocd-development] [PATCH 0/4] split nor flash core/tcl

2009-12-03 Thread Zachary T Welch
Hi all, The first two patches work to eliminate some Jim handling in the helper and JTAG modules, with the later being nearly purged. If the command layer provides some wrappers for Jim's return handling mechanisms, then all handlers can be converted to use the high-level command mechanisms --

Re: [Openocd-development] [PATCH] basic ARM semihosting support

2009-12-03 Thread David Brownell
On Thursday 03 December 2009, Nicolas Pitre wrote: I'll let someone else modify the NEWS.  As to the TODO items: they're already commented in the code.  So please just commit v2 as is now and let's put incremental improvements on top.  I want other people to get involved too!  ;-) OK, I

Re: [Openocd-development] [PATCH 1/4] switch 'rm' command away from using Jim

2009-12-03 Thread Øyvind Harboe
On Fri, Dec 4, 2009 at 3:04 AM, Zachary T Welch z...@superlucidity.net wrote: Commands that do not need to use Jim should be registered as high-level command handlers. Why is that? Nb! ls *does* need to use jim to return a list of directory names used by other jim commands. -- Øyvind Harboe

[Openocd-development] Error: The 'init' command must be used before 'init'.

2009-12-03 Thread Øyvind Harboe
I thought a fix for this one was pushed yesterday? Still happens... With dummy driver even. oyv...@titan:~/workspace/build$ openocd -f interface/dummy.cfg -f board/at91eb40a.cfg Open On-Chip Debugger 0.4.0-dev-00845-g24551b7 (2009-12-04-08:26) For bug reports, read