Hello all! :-) >From all of the above posts Laurent it looks that you are trying to do the TRANSPORT job. Please take a look at transport infrastructure. The interface simply needs to be available for other things to work, so there is no point in having handle ready with unusable interface. I can understand this might be helpful, but also surely it will bring confusion - if we work on the interface that has opened handle but uninitialized interface how can you tell what happens next if you want to work with other things (ie. transport or target) as init() can only return OK or FAIL. This is why we consider such approach dangerous - initialization can only succeed or fail, it cannot succeed with handle and fail with interface. This is very simple and unabiguous - if init() succeeds there is an interface read for use, otherwise it is not and nothing else cannot work.
Regarding the malloc() problem it is already solved in simpler manner. Regarding the deinitialization this is the problem to fix next - all FT2232-based devices can have the same deinitialization procedure because there is the same chip inside. This should be also trivial to fix, as all interfaces have common quit() function, so no need to create the separate one for each layout. Maybe the good solution would be to create separate amontec.c driver file, where you will test all your functionalities separately from all other drivers without danger of breaking stuff for others. If some solutions turn out to be better I am sure they will be also applied to other drivers :-) The SWD is on its way, almost done, but I want to do it elegant way and bring additional benefit from it. This will be general infrastructure, so you don't need to create again your own stuff from scratch. Also the deinitialization procedure would be common for swd and jtag ft2232 interfaces (all pins Hi-Z). The ft2232_swd interface is ready. I am working with KT-LINK interface that has been already verified with UrJTAG. You can always watch the changes and even build the code from http://repo.or.cz/w/openocd/libswd.git I will start separate thread in a moment :-) Best regards :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
