On Wednesday 11 November 2009, David Brownell wrote:
> Framework updates to provide ETM access on ARM cores other
> than the current set of just ARM7 and ARM9 based cores:
The only real comment was to split it into smaller chunks,
so that's what I did ... it's merged now, in five chunks.
On Thu, Nov 12, 2009 at 12:14 AM, David Brownell wrote:
> On Wednesday 11 November 2009, Řyvind Harboe wrote:
>> > And what happened to that more standard Tcl model I mentioned a
>> > while back ... a series of interpreters, with the current target
>> > object at the front of the series, and more
On Wednesday 11 November 2009, Zach Welch wrote:
>
> > On the other hand ... for big things, it's best to avoid
> > turning fuzzy ideas into C. There's a risk of tha fuzziness
> > getting committed, and then getting hard to remove.
>
> Ah, but with git, it can be committed! Refrain from pushing
On Wednesday 11 November 2009, Øyvind Harboe wrote:
> > And what happened to that more standard Tcl model I mentioned a
> > while back ... a series of interpreters, with the current target
> > object at the front of the series, and more global stuff back at
> > the end?
>
> I don't understand this
On Wednesday 11 November 2009, Øyvind Harboe wrote:
> I must admit I have not read up on the embedded trace capability,
> much, but one of the things that I've heard it can do is to
> set a breakpoint and then capture the PC for N instructions
> going forward.
Depends on what you have hooked up to
Pushed on top of the command help cleanup series.
--Z
On Tue, 2009-11-10 at 23:22 -0800, Zachary T Welch wrote:
> Without this patch, running "openocd -c 'jtag interface'" segfaults.
> Now, it returns the string "undefined" when the interface is unset.
> ---
> Is there a better value that could b
On Wed, 2009-11-11 at 12:32 -0800, Zachary T Welch wrote:
> This series begins to improve the built-in command help:
>
> * provides a full list of all registered commands, not just those that
> define a handler function).
> * allows arbitrary command nesting
> * eliminates duplicate code, improv
On Wed, Nov 11, 2009 at 11:26 PM, David Brownell wrote:
> On Wednesday 11 November 2009, Zach Welch wrote:
>> Please restate this in the form of a problem that needs solving.
>> You have stated a solution. What was the original problem?
>> Are there other possible solutions? How does this solve
On Wed, 2009-11-11 at 15:26 -0700, David Brownell wrote:
> On Wednesday 11 November 2009, Zach Welch wrote:
> > Please restate this in the form of a problem that needs solving.
> > You have stated a solution. What was the original problem?
> > Are there other possible solutions? How does this sol
On Wednesday 11 November 2009, Zach Welch wrote:
> Please restate this in the form of a problem that needs solving.
> You have stated a solution. What was the original problem?
> Are there other possible solutions? How does this solve it better than
> other alternatives?
And what happened to tha
On Wed, 2009-11-11 at 21:32 +, Andrew Rogers wrote:
> Hi All,
>
> I am working a few hours a week trying to get SWD working for the STM32
> Primer2 (R-Link interface). I am happy making changes to the source code
> to accomplish this. The problem is that my changes span many files
> because Op
On Wed, Nov 11, 2009 at 11:00 PM, Zach Welch wrote:
> On Wed, 2009-11-11 at 21:49 +0100, Øyvind Harboe wrote:
>> Here is an idea:
>>
>> make mdw/mww family of commands a method on the
>> target.
>>
>> foo.cpu mdw => returns array
>>
>> write a small mdw proc in Tcl that invokes the above method
>>
On Wednesday 11 November 2009, Andrew Rogers wrote:
> Hi All,
>
> I am working a few hours a week trying to get SWD working for the STM32
> Primer2 (R-Link interface). I am happy making changes to the source code
> to accomplish this. The problem is that my changes span many files
> because OpenOC
Hi All,
I am working a few hours a week trying to get SWD working for the STM32
Primer2 (R-Link interface). I am happy making changes to the source code
to accomplish this. The problem is that my changes span many files
because OpenOCD is pretty well married up to JTAG. I am taking the
opportunity
On Wed, 2009-11-11 at 21:49 +0100, Øyvind Harboe wrote:
> Here is an idea:
>
> make mdw/mww family of commands a method on the
> target.
>
> foo.cpu mdw => returns array
>
> write a small mdw proc in Tcl that invokes the above method
> on the currently active target.
>
> Consider the mrc/mcr ca
On Wed, Nov 11, 2009 at 10:47 PM, Zach Welch wrote:
> On Wed, 2009-11-11 at 21:40 +0100, Øyvind Harboe wrote:
>> On Wed, Nov 11, 2009 at 9:32 PM, Zachary T Welch
>> wrote:
>> > This series begins to improve the built-in command help:
>> >
>> > * provides a full list of all registered commands, n
On Wed, 2009-11-11 at 13:54 -0700, David Brownell wrote:
> On Wednesday 11 November 2009, Zachary T Welch wrote:
> > + for (cc = *head; cc && cc->next; cc = cc->next) ;
>
> Style point: such unadorned empty statements are worth avoiding.
> They're not quickly apparent when scanning code ...
On Wed, 2009-11-11 at 21:40 +0100, Øyvind Harboe wrote:
> On Wed, Nov 11, 2009 at 9:32 PM, Zachary T Welch
> wrote:
> > This series begins to improve the built-in command help:
> >
> > * provides a full list of all registered commands, not just those that
> > define a handler function).
> > * al
On Tuesday 10 November 2009, Jonas Horberg wrote:
> I do not know why you belive that jtag_speed is a NOP for parport
> interfaces. Perhaps it is by code inspection and the following
> nasty thing confused you:
Right; looking more closely, I see how it did its thing.
So we'll be wanting that parp
I must admit I have not read up on the embedded trace capability,
much, but one of the things that I've heard it can do is to
set a breakpoint and then capture the PC for N instructions
going forward.
The trick is how to present that in a GUI
Could we modify the GDB server to be able to "step
On Wednesday 11 November 2009, Zachary T Welch wrote:
> + for (cc = *head; cc && cc->next; cc = cc->next) ;
Style point: such unadorned empty statements are worth avoiding.
They're not quickly apparent when scanning code ... either their
presence or their absence. That translates to being
Here is an idea:
make mdw/mww family of commands a method on the
target.
foo.cpu mdw => returns array
write a small mdw proc in Tcl that invokes the above method
on the currently active target.
Consider the mrc/mcr case. If we treat it in the same
way, then we're in "c land" when we're trying t
Framework updates to provide ETM access on ARM cores other
than the current set of just ARM7 and ARM9 based cores:
- Rename "struct armv4_5_common_s" as "struct arm". It
needs a bit more work to be properly generic, but it's
the best start we have at that today.
- In "struct arm" provide
On Wed, Nov 11, 2009 at 9:32 PM, Zachary T Welch wrote:
> This series begins to improve the built-in command help:
>
> * provides a full list of all registered commands, not just those that
> define a handler function).
> * allows arbitrary command nesting
What does this mean?
Shouldn't we move
Eliminate duplicate code for linking commands into a list.
Adds a check to ensure the command does not already exist;
if it does, return that one instead of creating a duplicate.
Signed-off-by: Zachary T Welch
---
src/helper/command.c | 75 +
1
Add help for commands regardless of whether a handler is involved.
With this, all sorts of new commands can be found in 'help' text.
Hopefully, all of them have been documented
Sadly, the lsort function appears to handle nested lists poorly, such
that sub-commands do not group with their paren
The command_name function returns a malloced string for a given
command and its parents. This can be used to display a message
to the user, but it is used internally to handle registration
and syntax errors. This helps permit arbitrary command nesting.
Signed-off-by: Zachary T Welch
---
src/he
Use continuation characters to wrap the help command into 80 columns.
Signed-off-by: Zachary T Welch
---
src/helper/startup.tcl | 26 +-
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl
index 2c90972..73c4cf
Add helpers to manage adding entries to the helptext list.
Adds support for arbitrarily nested commands.
Signed-off-by: Zachary T Welch
---
src/helper/command.c | 61 -
1 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/src/helper/c
This series begins to improve the built-in command help:
* provides a full list of all registered commands, not just those that
define a handler function).
* allows arbitrary command nesting
* eliminates duplicate code, improves error checking, fixes wrapping
Based on the current master, though
On Wed, 2009-11-11 at 06:11 -0800, Zachary T Welch wrote:
> These patches perform a bunch of random cleanups that fell out of
> the next series.
I have pushed these patches to SF.net, except I got an error from the
post-commit hook:
sendmail: Could not find password entry for UID 15
error:
On Wed, 2009-11-11 at 12:09 -0700, David Brownell wrote:
> On Wednesday 11 November 2009, Zachary T Welch wrote:
> > - nand->controller_priv = info;
> > + device->controller_priv = info;
>
> Given there are so many different devices involved,
> it's better to use descriptive names ("na
On Wed, 2009-11-11 at 12:04 -0700, David Brownell wrote:
> > +#define CALL_COMMAND_HANDLER(name, extra...) \
> > + name(cmd_ctx, cmd, args, argc, ##extra)
>
> That one I don't like. It relies on lexical capture
> for most parameters, and doesn't even use "name".
name is right up there
On Wednesday 11 November 2009, Balbir Singh Dhanoa wrote:
>
> Hi,
>
> Does anyone know if Openocd configuration files exist for the
> OMAP-L137 and OMAP-L138.
I don't believe anyone's posted such yet. They'd look much like
the target/ti_dm6446.cfg file though ... key differences being
they ha
On Wed, 2009-11-11 at 11:57 -0700, David Brownell wrote:
> Yeah, I like those patches ... as you could tell! :)
>
> The "static" stuff also lets the compiler generate more
> compact code; it enables inlining and some broader-scoped
> optimizations. And that's on top of making it clear that
> suc
On Wed, 2009-11-11 at 11:54 -0700, David Brownell wrote:
> On Wednesday 11 November 2009, Zachary T Welch wrote:
> > Subsequent patches expect all command handlers to use a uniform
> > parameter naming scheme. In the entire tree, these two files used
> > non-standard 'argv' instead of 'args'. Thi
On Wed, 2009-11-11 at 18:03 +, John Devereux wrote:
> Zach Welch writes:
>
> > On Wed, 2009-11-11 at 08:40 +0100, Øyvind Harboe wrote:
> >> I've read over the branch and improving types is always a good thing,
> >> even if I don't have a specific opinions on whether to use
> >> unsigned or in
On Wednesday 11 November 2009, Zachary T Welch wrote:
> - nand->controller_priv = info;
> + device->controller_priv = info;
Given there are so many different devices involved,
it's better to use descriptive names ("nand") not
generic ones ("device").
__
> +#define CALL_COMMAND_HANDLER(name, extra...) \
> + name(cmd_ctx, cmd, args, argc, ##extra)
That one I don't like. It relies on lexical capture
for most parameters, and doesn't even use "name".
Lexical capture is one of the classic Things To Avoid
for C macros ... a Dirty Trick, wh
Yeah, I like those patches ... as you could tell! :)
The "static" stuff also lets the compiler generate more
compact code; it enables inlining and some broader-scoped
optimizations. And that's on top of making it clear that
such-and-such a routine has no other callers.
_
On Wednesday 11 November 2009, Zachary T Welch wrote:
> Subsequent patches expect all command handlers to use a uniform
> parameter naming scheme. In the entire tree, these two files used
> non-standard 'argv' instead of 'args'. This patch reduces noise
> required to unify all command handlers wi
Thomas Kindler wrote:
> Hi!
>
> Now that the reset problem is solved for me, I'm trying to optimize my
> eclipse setup for my STM32 target.
>
> Basically, I'm using gnuarmeclipse.sf.net for project settings and
> makefile generation, CodeSourcery Lite as the toolchain, and the
> "Eclipse C/C++
Hi,
Does anyone know if Openocd configuration files exist for the OMAP-L137 and
OMAP-L138.
I'm using
- OMAP-L137 evm board from TI & Spectrum Digital Inc.
- Zoom OMAP-L138 evm board from Logic.
- Amontec JTAGKey2 and JTAGKey.
I haven't found the config files yet, and have not received any inf
Zach Welch writes:
> On Wed, 2009-11-11 at 08:40 +0100, Øyvind Harboe wrote:
>> I've read over the branch and improving types is always a good thing,
>> even if I don't have a specific opinions on whether to use
>> unsigned or int for iteration variables, etc.
>
> There is almost always a correct
Removes forward declarations by moving command registration after
defintion of the command handlers.
Signed-off-by: Zachary T Welch
---
src/flash/lpc288x.c | 11 ---
src/flash/mx3_nand.c | 47 ---
src/pld/pld.c| 35 ++
The hello module provides the 'hello' command, printing a greetings
to the command console. It can grow to serve as pedagogical example
of services that OpenOCD developers should use: a runnable style guide.
Signed-off-by: Zachary T Welch
---
src/Makefile.am |4 ++-
src/hello.c | 57 +
Documenting command handler parameters is redundant and pointless.
Signed-off-by: Zachary T Welch
---
src/flash/flash.h |6 --
src/flash/lpc2900.c | 44 +---
2 files changed, 1 insertions(+), 49 deletions(-)
diff --git a/src/flash/flash.h b/sr
The number of command arguments will always be 0 or more, so use
the right type in handlers. This has a cascading effect up through
the layers, but the new COMMAND_HANDLER macros prevented total chaos.
Signed-off-by: Zachary T Welch
---
src/flash/cfi.c |5 +
src/flash/nand.c
This documentation update provides an introduction to the command
handling facilities provided by command.[ch]. A primer walks the user
through the elements of a pointedly pedantic module: src/hello.c.
A summary of the API is provided in the OpenOCD Architecture section.
Signed-off-by: Zachary T
The command_name function returns a malloced string for a given
command and its parents. This can be used to display a message
to the user, but it is used internally to handle syntax errors.
Signed-off-by: Zachary T Welch
---
src/helper/command.c | 38 +++---
s
Prevents the command name from being modified in command handlers.
Again, this has cascading effects, but the patches are fairly minimal.
Signed-off-by: Zachary T Welch
---
src/helper/command.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/helper/command.h b/src/h
This patch removes 'cmd' from the list of direct parameters, moving
that pointer to args[-1] (by way of the new COMMAND_NAME macro).
Signed-off-by: Zachary T Welch
---
src/helper/command.c | 16 +---
src/helper/command.h |6 +++---
2 files changed, 12 insertions(+), 10 deletion
By introducing the COMMAND_NAME macro, this parameter may be integrated
as args[-1] in command.[ch], without touching any other call sites.
Signed-off-by: Zachary T Welch
---
src/flash/flash.c |2 +-
src/helper/command.h |6 ++
src/jtag/tcl.c |2 +-
src/target/arm7
By using CALL_COMMAND_HANDLER, parameters can be reordered, added, or
even removed in inherited signatures, without requiring revisiting
all of the various call sites.
Signed-off-by: Zachary T Welch
---
src/flash/flash.c |3 ++-
src/flash/nand.c |3 ++-
src/jtag/tcl.c
This patch prevents command handlers from modifying the strings passed
in the 'args' array.
Signed-off-by: Zachary T Welch
---
src/helper/command.c | 10 ++
src/helper/command.h |2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/helper/command.c b/src/helper/
Defines all flash_bank_command handlers using the new macro.
Signed-off-by: Zachary T Welch
---
src/flash/aduc702x.c |2 +-
src/flash/at91sam3.c |7 +--
src/flash/at91sam7.c |2 +-
src/flash/avrf.c |2 +-
src/flash/cfi.c |2 +-
src/flash/ecos.c |2 +
Update virtex module to use abstracted PLD command handling.
Signed-off-by: Zachary T Welch
---
src/pld/pld.h |7 ++-
src/pld/virtex2.c |6 +++---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/pld/pld.h b/src/pld/pld.h
index 3db4bad..22f2c13 100644
--- a/src/
Define the numerous helpers that inherit command handler parameters
using the COMMAND_HELPER macro.
Signed-off-by: Zachary T Welch
---
src/server/server.c |3 +--
src/server/server.h | 12 ++--
src/target/arm11.c |5 ++---
src/target/etm.c|7 +++
src/target/target.
Abstracts the extended NAND command handling to allow the function
signature to be controlled by __COMMAND_HANDLER.
Signed-off-by: Zachary T Welch
---
src/flash/davinci_nand.c|6 ++
src/flash/lpc3180_nand_controller.c |2 +-
src/flash/mx3_nand.c|4 +---
Add S3C24XX_DEVICE_COMMAND macros to abstract common command handler
conventions.
Signed-off-by: Zachary T Welch
---
src/flash/s3c2410_nand.c |6 +-
src/flash/s3c2412_nand.c |6 +-
src/flash/s3c2440_nand.c |6 +-
src/flash/s3c2443_nand.c |6 +-
src/flash/s3c24xx_n
The COMMAND_HANDLER and COMMAND_HELPER macros allow commands to be
defined in a manner that decouples them from the exact order and type of
their parameters. Once converted, incremental changes to the command
handler type can be addressed in incremental patches that do not need to
touch the entire
The FLASH_BANK_COMMAND_HANDLER provides an extended command handler
using the __COMMAND_HANDLER macro, whereby changing that macro is
sufficient to update flash handlers with the new signature. It also
enforces uniform style and scope when implementing this handler.
Signed-off-by: Zachary T Welch
Rewrites the dap_* command helpers to use the COMMAND_HELPER paradigm.
Uses CALL_COMMAND_HELPER to hide inherited calling conventions.
Signed-off-by: Zachary T Welch
---
src/target/arm_adi_v5.c | 12
src/target/arm_adi_v5.h | 15 +++
src/target/armv7a.c |8 ++
Signed-off-by: Zachary T Welch
---
src/helper/command.c |3 ++-
src/helper/command.h | 11 ---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/helper/command.c b/src/helper/command.c
index c632702..fb9faaa 100644
--- a/src/helper/command.c
+++ b/src/helper/comma
This patch adds new typedefs for command handler callback functions.
Users of this type signature were updated to use these new types.
It uses the new __COMMAND_HANDLER macro to prevent duplication.
Signed-off-by: Zachary T Welch
---
src/helper/command.c |4 +++-
src/helper/command.h |9
This series systematically updates the command handlers signature:
int (*foo)(cmd_ctx, cmd, args, argc)
to
int (*foo)(cmd_ctx, args, argc)
It does this by unifying all definitions of the signature to a single
location in command.h, using a set of relatively simple macros.
It fil
Signed-off-by: Zachary T Welch
---
src/target/cortex_a8.c | 188 +---
src/target/cortex_a8.h |6 --
2 files changed, 82 insertions(+), 112 deletions(-)
diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c
index 141b439..a8cb37d 100644
---
Add 'const' keyword to 'char *' parameters to allow command handlers to
pass constant string arguments. These changes allow the 'args' command
handler to be changed to 'const' in a subsequent patch.
Signed-off-by: Zachary T Welch
---
src/flash/flash.c |2 +-
src/flash/flash.h |2
Use unsigned type for number of arguments.
Signed-off-by: Zachary T Welch
---
src/helper/command.c |8
src/helper/command.h |3 ++-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/helper/command.c b/src/helper/command.c
index 2b8f646..c632702 100644
--- a/src/
Use unsigned type for line number in log_callback_fn signature.
Signed-off-by: Zachary T Welch
---
src/helper/command.c |4 ++--
src/helper/log.h |2 +-
src/server/gdb_server.c|4 ++--
src/server/telnet_server.c |2 +-
4 files changed, 6 insertions(+), 6 delet
Subsequent patches expect all command handlers to use a uniform
parameter naming scheme. In the entire tree, these two files used
non-standard 'argv' instead of 'args'. This patch reduces noise
required to unify all command handlers with a single definition.
Signed-off-by: Zachary T Welch
---
This patch also improves the signature of run_command function.
Signed-off-by: Zachary T Welch
---
src/helper/command.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/helper/command.c b/src/helper/command.c
index 5f3c88d..2b8f646 100644
--- a/src/helper/command
Update timeval_add_time to use long int; implement timeval_add with it.
Update timeval_ms to check gettimeofday return value, return int64_t.
Signed-off-by: Zachary T Welch
---
src/helper/time_support.c | 37 +
src/helper/time_support.h |4 ++--
2 files
Separates various groups of files to be built in logical succession.
In each layer, the core module (target.c, nand.c, etc.) is built _after_
their helper modules (e.g. image.c, nand_ecc.c) but _before_ any of
their drivers (e.g. arm966e.c, mx3_nand.c).
This allows problems introduced at the botto
These patches perform a bunch of random cleanups that fell out of
the next series.
Cheers,
Zach
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development
On Wed, Nov 11, 2009 at 1:58 PM, Zach Welch wrote:
> On Wed, 2009-11-11 at 08:40 +0100, Øyvind Harboe wrote:
>> I've read over the branch and improving types is always a good thing,
>> even if I don't have a specific opinions on whether to use
>> unsigned or int for iteration variables, etc.
>
> T
On Wed, 2009-11-11 at 08:40 +0100, Øyvind Harboe wrote:
> I've read over the branch and improving types is always a good thing,
> even if I don't have a specific opinions on whether to use
> unsigned or int for iteration variables, etc.
There is almost always a correct choice. Most of the time, t
On Wed, Nov 11, 2009 at 1:30 PM, Thomas Kindler wrote:
> Hi!
>
> Now that the reset problem is solved for me, I'm trying to optimize my
> eclipse setup for my STM32 target.
>
> Basically, I'm using gnuarmeclipse.sf.net for project settings and
> makefile generation, CodeSourcery Lite as the toolch
Hi!
Now that the reset problem is solved for me, I'm trying to optimize my
eclipse setup for my STM32 target.
Basically, I'm using gnuarmeclipse.sf.net for project settings and
makefile generation, CodeSourcery Lite as the toolchain, and the
"Eclipse C/C++ GDB Hardware Debugging" Plug-In from
> It is merely an additional feature that does not preclude anyone from
> integrating arm11 into the openocd etm/etb drivers.
We're very much appreciative of the time you put into getting
the low level stuff sorted here.
Really what I wanted to get committed was the tested low level
stuff as I ti
On Tue, Nov 10, 2009 at 21:38, Øyvind Harboe wrote:
> On Tue, Nov 10, 2009 at 9:35 PM, David Brownell wrote:
>> On Tuesday 10 November 2009, Øyvind Harboe wrote:
>>> On Tue, Nov 10, 2009 at 8:14 PM, David Brownell wrote:
>>> > On Tuesday 10 November 2009, Ųyvind Harboe wrote:
>>> >> I've pushed
81 matches
Mail list logo