On Fri, Dec 17, 2010 at 5:33 PM, Peter Stuge <pe...@stuge.se> wrote:
> Øyvind Harboe wrote:
>> > In my opinion the if/then version makes it easier for new users
>> > to customize cfg files.  And since most users will need to
>> > customize at least one cfg file, I think simplicity trumps short
>> > files.
>>
>> I think you raise important enough points that unless they are
>> addressed, we should keep it as is.
>
> It is an important point, but the if/else construct is just daft. I
> did know a bit of Tcl before coming to OpenOCD the first time I saw
> that construct I thought "there *MUST* be a better way to do that,
> whatever that thing is doing".

I agree that there must be a better way to do this, but
there are some good points to the current approach: it's
verbose and doesn't use proc's with lots of strange
conventions.

I think it would be helpful to get rid of the "arguments to scripts"
to make things less messy.

Perhaps scripts should be defined to export proc's that have
to be explicitly executed, rather than setting variables that
scripts use.

>> Understanding *one* target script should not be made harder.
>
> Good procedure names and good documentation in the right places is
> the answer IMO.
>
> It is also important to keep in mind that the different .tcl files
> have very different purposes.  An OpenOCD *user* should only have to
> deal with board/ files, while target/ or interface/ plumbing is one
> step up on the OpenOCD developer ladder.

I was also thinking about creating some tables for targets...

Perhaps dictionary of settings each target could drive a target
script?

A range of targets could probably be tabularized as:

- jtag clock (before after reset)
- init script
- single tap jtag id
- working memory, if any


-- 
Øyvind Harboe

Can Zylin Consulting help on your project?

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
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to