On Fri, Aug 1, 2008 at 3:27 PM, Magnus Lundin <[EMAIL PROTECTED]> wrote:
> Øyvind Harboe wrote:
>>> This is in contrast to Öyvinds preference that add_breakpoint should not
>>> touch the hardware. I would rather say that the meaning of add
>>> breakpoint is to touch the hardware as soon as possible.
>>>
>>
>> Let me refine that: any configuration that must happen in the target
>> configuration script must be possible with a powered down/disconnected
>> target. This is the crucial bit to me.
>>
>>
> Agreed !
>
> I really don't want to split hairs but the crucial word here is "must".
> What must happen in a configuration script, is it necessary to add
> breakpoints in a configuration script ?

Let me first define config script vs. normal execution:

Configuration stage is up until the "init" command has been run. After
this we're in normal execution. That is to say a startup script can contain
first configuration, then init, and subsequently it can talk to the target
w/e.g. reset, flash programming, etc.

So a *startup script* can add breakpoints *when* the target is powered
up, but that would be *post* "init" command and hence not part of
the configuration stage.

For a particular target, whether it is running or not, we can *know* beforehand
that the "right" type of breakpoints are software breakpoints. It should
be possible to add a configuration statement in the target configuration
script(before init and the target is powered up) that the "right" thing to
use for this target is software breakpoints.

> Or is the right way to configure a startup script that should run when
> the target is actually powered up.

The targets have an examine() function where they can talk to the
target and set up things correctly. E.g. the precise set of embedded
ice registers can depend on the actual type of the target which is
determined automatically by querying the target.

> I think breakpoint configuration is an init script thing, not a config
> script thing.

Agreed.


> Default breakpoint type configuration on the other hand is more of a
> config option.

Yes.

-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to