|
From: Ø. H. <oyv...@zy...> - 2008-09-08 09:16:29
|
The general direction looks good to me. I've made some commits and here are some commits about the patch: - remove jtag cmd queue command from tcl interface. ref earlier discussions it is the job of C to invoke this and any failure is thrown as a tcl exception. This means that Tcl code can not build queues and that anything a tcl command does is synchronous. - please remove the translation from error code to string. OpenOCD is moving *away* from using the return value as anything but a boolean success/failure. It is not consistently reported/propagated or used, nor is it good API design to propagate vital information in exceptions or error codes that the caller needs to take action on. OpenOCD uses the return code to make some decisions in a few places, but generally these are being weeded out as time & occasion permits. OpenOCD invokes LOG_ERROR() at the error site where more detailed information about what went wrong is logged. This should cut down the size of the patch considerably as well. Less code is oftentimes a good sign. - Having given it some thought, I would like to make it the C code's responsibility to invoke keep_alive and target_call_timer_callbacks_now(). Is there any reason we can't do this? Really in a perfect world(or ultimately w/OpenOCD), keep_alive & target_call_timer_callbacks_now() would go away. I've also formulated a patch that makes keep_alive() invokoe target_call_tiemr_callbacks_now(). - target->reset_halt should go away and be an argument to target->assert_reset. At least from a tcl point of view. It gets a little bit messier on the C end since deassert also needs to know that the target is to be reset into the halted mode. -- Øyvind Harboe http://www.zylin.com/zy1000.html ARM7 ARM9 XScale Cortex JTAG debugger and flash programmer |