To figure out how to use the EC2 from linux the RS232 communications were examined and a serias of data captures of verious operational modes were made. After this was done each operation had to be analysed on its own along with the communications messages to determine what was going on. As this was done the beginnings of ec2drv were formed to test the understanding of the protocol alone with ec2test which was used to excercise some of the commands.
If you are interested have a look at Data caputred with some analysis. The tgz contains files for the EC2 and EC3 and for both C2 and JTAG mde, it is not 100% complete but it is probably 90% of what was used to get EC2DRV to work.
extracting the firmware that gets loaded into the EC2 / EC3 required a small text processor to be written to extract the data from the data capture into a .bin file suitable for uploading back into the EC2 / EC3.
The firmware is clearly sent in flash page sized chunks that appear to be out of order but for our purpose which is to use the EC2 or EC3 we don't bother to unscramble them, we just leave them scrambled in the bin file and transfer the file directly to the debugger page by page.
This device uses USB only complicating matters but thanks to usbsnoop it was quickly discovered that the protocol on USB is very similar so I quickly learnt about libusb and hacked up the EC3 support. There are some complications in that the EC2 used handshake lines to reset it where as the EC3 requires a software USB disconnect/reconnect sequence.