On 09:04 Tue 28 Feb     , David Riley wrote:
> On Feb 28, 2012, at 3:06 AM, Øyvind Harboe wrote:
> 
> > I actually thought  of a killer feature of switching to scripting
> > programming language:
> > 
> > How about if we could replace 80% of the C code with a scripting
> > language without sacrificing performance and make 80% of the OpenOCD
> > code unit-testable?
> 
> This is actually why I made Lua bindings to all the functions in an API for a 
> PCI capture card I developed for work; it made unit and regression testing 
> much easier, and it also allowed us to use functions without having to write 
> a C program which called them (we could call them directly from the Lua 
> command line).  It was very useful.
> 
> You can even make preprocessor macros to do a lot of the bindings for you, 
> though there are some valid arguments for why you should not do so.  It's a 
> lot easier in C++ where you can do template metaprogramming, but I don't 
> think anyone is interested in going there for OpenOCD (nor should they be).
C++ no too slow and too big.
> 
> > The idea is to get exception handling and resources tracking + some
> > sane objected oriented design.
> > 
> > If we can use this to increase the readability, testability and
> > ultimately quality of OpenOCD, then I'd be more interested.
> 
> I think you could improve OpenOCD a lot with it.  I think Python would be an 
> even better choice from a completeness-of-standard-libraries approach, but 
> the concerns over its footprint are very real and I think probably a 
> dealbreaker.
Python is not option in my mind as I'm working a embedded version of OpenOCD
so Python is really a pain in the ass for cross compiling and size

Lua ok and I'm planing to woek on a web interface to control OpenOCD (lua +
lighttpd)

Best Regards,
J.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to