<div dir="ltr"><div><div dir="ltr"><div>Fwd'ing to vm-dev... </div><div><br></div><div>Phil</div></div></div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername"><a href="mailto:phil@highoctane.be">phil@highoctane.be</a></b> <span dir="ltr"><<a href="mailto:phil@highoctane.be">phil@highoctane.be</a>></span><br>
Date: Wed, May 14, 2014 at 10:40 AM<br>Subject: Re: [Pharo-dev] Serial port support on Pharo (2 or 3)<br>To: Pharo Development List <<a href="mailto:pharo-dev@lists.pharo.org">pharo-dev@lists.pharo.org</a>><br><br>
<br>
<div dir="ltr"><div class="gmail_extra"><div><div dir="ltr"><div>On Wed, May 14, 2014 at 10:15 AM, Goubier Thierry <span dir="ltr"><<a href="mailto:thierry.goubier@cea.fr" target="_blank">thierry.goubier@cea.fr</a>></span> wrote:<br>
</div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi all,<br>
<br>
has anybody success using serial ports with Pharo on Mac or Linux? We're having reports of lack of success, including lack of success in recompiling a Pharo VM with a correct serial port access (a few months ago), where the same approach was sucessfull with a squeak VM.</blockquote>
<div><br></div><div>I see that the current out of the box build gives:</div><div><br></div><div>buildUnix32</div><div><span style="white-space:pre-wrap">        </span>CogNativeBoostPlugin setTargetPlatform: #Linux32PlatformId.</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>PharoUnixConfig new</div><div><span style="white-space:pre-wrap">                </span>"generateForDebug;"</div>
<div><span style="white-space:pre-wrap">                </span>addExternalPlugins: #( FT2Plugin SqueakSSLPlugin );</div><div><span style="white-space:pre-wrap">                </span>addInternalPlugins: #( UnixOSProcessPlugin );</div><div><span style="white-space:pre-wrap">                </span>addThirdpartyLibraries: #( </div>
<div><span style="white-space:pre-wrap">                        </span>'libssh2' </div><div><span style="white-space:pre-wrap">                        </span>'libgit2' );</div><div><span style="white-space:pre-wrap">                </span>generateSources; </div>
<div><span style="white-space:pre-wrap">                </span>generate.</div><div><br></div><div>So, there is no SerialPlugin in there for sure.</div><div><br></div><div>platforms/unix/plugins/SerialPlugin has the unix specific code with the primitives implementation.<br>
</div><div><br></div><div>It looks like the code uses those to access the serial ports.</div><div><br></div><div><div>#ifdef BUILD_FOR_OSX</div><div>static const char *serialPortBaseNameDefault<span style="white-space:pre-wrap">        </span>= "/dev/ttys%d";</div>
<div>#else</div><div>static const char *serialPortBaseNameDefault<span style="white-space:pre-wrap">        </span>= "/dev/ttyS%d";</div><div>#endif</div></div><div><br></div><div>and the SerialPlugin code inside the image looks okay.<br>
</div><div><br></div><div>Changing the buildUnix32 into:</div><div><br></div><div><div>buildUnix32</div><div><span style="white-space:pre-wrap">        </span>CogNativeBoostPlugin setTargetPlatform: #Linux32PlatformId.</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>PharoUnixConfig new</div><div><span style="white-space:pre-wrap">                </span>"generateForDebug;"</div>
<div><span style="white-space:pre-wrap">                </span>addExternalPlugins: #( FT2Plugin SqueakSSLPlugin );</div><div><span style="white-space:pre-wrap">                </span>addInternalPlugins: #( UnixOSProcessPlugin SerialPlugin );</div>
<div><span style="white-space:pre-wrap">                </span>addThirdpartyLibraries: #( </div><div><span style="white-space:pre-wrap">                        </span>'libssh2' </div><div><span style="white-space:pre-wrap">                        </span>'libgit2' );</div>
<div><span style="white-space:pre-wrap">                </span>generateSources; </div><div><span style="white-space:pre-wrap">                </span>generate.</div></div><div><br></div><div>generates all without an issue.</div><div><br></div>
<div>Now, I am going to compile this on CentOS and get back to you.</div><div><br></div><div>Phil</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span><font color="#888888"><br>
<br>
Thierry<span class="HOEnZb"><font color="#888888"><br>
-- <br>
Thierry Goubier<br>
CEA list<br>
Laboratoire des Fondations des Systèmes Temps Réel Embarqués<br>
91191 Gif sur Yvette Cedex<br>
France<br>
Phone/Fax: <a href="tel:%2B33%20%280%29%201%2069%2008%2032%2092" value="+33169083292" target="_blank">+33 (0) 1 69 08 32 92</a> / 83 95<br>
<br>
</font></span></font></span></blockquote></div><br></div></div>
</div><br></div>