<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks everyone for the advice, some good ideas to keep me busy. Will try and look at over weekend/next week as tied up the rest of today.<div><br></div><div>I've used pyserial several times  - many thanks to Chris Liechti for that module</div><div><br></div><div>Hmmmmm must be loosing it, forgot about stdin/out!</div><div><br></div><div>I've also used CUnit before and it's nice an easy and small. Problem is I've only 500 bytes code space left on the micro-controller so by the time CUnit gone in with the various tests I'm gonna run of room. I have to keep the RS232 driver in as well as it's the <i><u>only</u></i> way to talk to the controller.</div><div><br></div><div>Python + pyserial enables me to run the tests with the C compiled and run on the PC as well as compiled to run on the micro-controller. Python is a great environment for doing this sort of thing and, as has been mentioned, a GUI can be added easily (time permitting).</div><div><br></div><div>Thanks again all,</div><div>John</div><div> </div><div><div>On 8 Nov 2013, at 15:00, Grant Edwards <<a href="mailto:invalid@invalid.invalid">invalid@invalid.invalid</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On 2013-11-08, John Pote <<a href="mailto:johnhpote@o2.co.uk">johnhpote@o2.co.uk</a>> wrote:<br><blockquote type="cite">Hi all,<br><br>I have the task of testing some embedded 'C' code for a small<br>micro-controller. Thought it would be a good idea to test it on the<br>PC first to make sure the algorithm is correct then perhaps test it<br>on the controller via RS232 and an appropriate wrapper round the 'C'<br>functions.<br><br>On the PC I can use Python's unit test library module and logging to<br>create a nice and easy to use environment (I like Python). So my<br>question is how to communicate from Python to the C module on the PC.<br>What I'd like is simplicity and ease of setting up. All I can think<br>of myself is to use sockets.<br></blockquote><br>Sockets are nice and simple.  Depending on what you're doing,<br>stdin/stdout may be even simpler.<br><br>For the RS232 part of the problem, don't forget about pyserial:<br><br>  <a href="http://pyserial.sourceforge.net/pyserial.html">http://pyserial.sourceforge.net/pyserial.html</a><br><br><blockquote type="cite">Any ideas on how to do this would be gratefully appreciated.<br><br>Also as I don't have any microsoft offerings of a C compiler any<br>suggestions as to a suitable C compiler for a PC appreciated as well.<br>llvm? mingw? gcc?<br></blockquote><br>I've occasionaly used mingw (which _is_ gcc), and it worked well.<br>Cygwin (also gcc) works well, but it's a bit more involved.<br><br>I do all my embedded development on a Linux host.  I find Linux to be<br>far more suitable for the task -- the entire Unix system basically<br>evolved as a software development platform.  I've yet to figure out<br>what MS-Windows is suited for other than lining Bill Gates' pockets.<br><br>Before Linux, I used Solaris/SunOS, and before that I used Unix V7.<br>Everytime I've been involved in a Microsoft-hosted embedded<br>development project, I just end up walking a way afterwards shaking my<br>head in puzzlement.<br><br>-- <br>Grant Edwards               grant.b.edwards        Yow! I'm having a<br>                                  at               tax-deductible experience!<br>                              <a href="http://gmail.com">gmail.com</a>            I need an energy crunch!!<br>-- <br><a href="https://mail.python.org/mailman/listinfo/python-list">https://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br></body></html>