At the beginning, I wanted make a modification for any jtag adapter.
I think, the best case if it's correct for all jtag adapter it's to
work like Laurent has said:
The better case for jtag adapter would be to have
.open
.init
.xxx-interface-me-xxx
.deinit
.close
.open and .close the handle of the jtag adapter
.init and deinit the jtag adapter itself.
But the actual openocd only knows the .init and .quit, and we have to
do with. If we go with .open .init .deinit .close, it will make a lot
of more work on all the specific jtag driver. -> could be modified on
a second step ...
But it's a long and hard work.
But if we respect the principle of operation as follows:
Near as I can tell the correct fix here is to fix broken
implementations
of init() to clean up when it fails.
quit() is not and should not be invoked when init() fails, this
parallels
malloc() + free(). Don't invoke free when malloc fails.
So the work is divided, we must make the change for each jtag adapter.
I work with ft2232 so I will modify the ft2232.c file.
I think made the patch on several parts.
So, do you prefer commit or e-mail patch ?
N.B.
I've posted a patch to clarify jtag->init() and jtag->quit().
I think that is a good clarification.
--
Regards,
Sébastien Farquet
http://www.amontec.com/
Amontec JTAGkey-2 : High speed USB JTAG interface
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development