On Wed, Jun 10, 2009 at 8:52 PM, Zach Welch<[email protected]> wrote:
> On Wed, 2009-06-10 at 09:19 +0200, Øyvind Harboe wrote:
>> Committed.
>>
>> Does OMAP/BeagleBoard need this?
>>
>> This "pathmove" command is ready for testing & feedback.
>> I've done some quick smoketests and it reveals some interesting
>> points in terms of where error checking should go... Discussed
>> yesterday.
>
> Cool.  Except that -- for all its error checking -- it does not catch
> all of the possible errors.  Specifically, jtag_add_statemove and
> jtag_add_pathmove both can set jtag_error (without returning an error
> directly).

which jtag_execute_queue() catches.

jtag_execute_queue() has two purposes:

- execute queued commands(if the minidriver is asynchronous)
- report any errors accrued during synchronous minidriver execution

>
> Personally, I think jtag_error should be removed, and all routines pass
> back an error code.  If those values needs to be "carried forward" to be
> reported in the right place, then they should be stored in whatever
> structure must be carried forward.  As it is, the jtag_error code is
> _never_ checked by callers, while return codes are checked religiously.
> Today, removing it would have no effect other than to simplify the code.

Here be dragons! :-)

This jtag_error analysis is wrong. You are not taking into account
synchronous jtag minidrivers.

The error check happens either immediately *or* during the jtag queue
execution.



-- 
Øyvind Harboe
Embedded software and hardware consulting services
http://consulting.zylin.com
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to