On Wed, May 23, 2012 at 1:27 AM, Akos Vandra <axo...@gmail.com> wrote:
> I started looking into the code.
> I can now issue commands through the interface (turns out the
> delimiter was 0x1A <-- why?! - is there a reason for this? At first
> glance I'd say something like a semicolon would be much more
> "normal").

\n is taken, 0x1a is free. We want to be able to send multi-line commands.

> When I issue a read command though, the read is executed, the result
> is printed to stdout, but the tcl client never gets any response other
> than command was executed successfully.

If you want an error output, send a command that catches the error and
sends a reply like:

1/0 <replystring>

where 0/1 is success / failure and <replystring> is the reply you want.

You'll probably want to create a tcl proc to process the input command.
> Tomorrow I'll look into it a
> little bit more, however I suspect that the communication is
> incomplete, and this part has not yet been written.
>
> I would write the interface if I'll have the time for it, but we'll
> have to come up with some nice protocol to communicate the data in a
> manner that will be easy for a machine to interpret, but still
> flexible so that arrays and such can also be returned. I'm thinking
> something like JSON. Not XML. Maybe it's not needed, and a raw
> protocol is enough.
> Any ideas?

You can create a Tcl proc that outputs any syntax you want, including
JSON or XML for that matter.

> Lastly why is the socket echoing? A machine does not need that, and it
> complicates interpretation somewhat.

Is it?

Or is that just how Telnet happens to react to the non-telnet protocol?

If we were to change the protocol, I'd want to see the new protocol
completely documented before and a consensus before any code was
accepted.

-- 
Øyvind Harboe - Can Zylin Consulting help on your project?
US toll free 1-866-980-3434
http://www.zylin.com/

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to