[Vm-dev] Fwd: [Pharo-dev] Serial port support on Pharo (2 or 3)

phil at highoctane.be phil at highoctane.be
Wed May 14 08:41:26 UTC 2014


Fwd'ing to vm-dev...

Phil

---------- Forwarded message ----------
From: phil at highoctane.be <phil at highoctane.be>
Date: Wed, May 14, 2014 at 10:40 AM
Subject: Re: [Pharo-dev] Serial port support on Pharo (2 or 3)
To: Pharo Development List <pharo-dev at lists.pharo.org>


On Wed, May 14, 2014 at 10:15 AM, Goubier Thierry <thierry.goubier at cea.fr>wrote:

> Hi all,
>
> 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.


I see that the current out of the box build gives:

buildUnix32
CogNativeBoostPlugin setTargetPlatform: #Linux32PlatformId.
 PharoUnixConfig new
"generateForDebug;"
 addExternalPlugins: #( FT2Plugin SqueakSSLPlugin );
addInternalPlugins: #( UnixOSProcessPlugin  );
addThirdpartyLibraries: #(
 'libssh2'
'libgit2' );
generateSources;
 generate.

So, there is no SerialPlugin in there for sure.

platforms/unix/plugins/SerialPlugin has the unix specific code with the
primitives implementation.

It looks like the code uses those to access the serial ports.

#ifdef BUILD_FOR_OSX
static const char *serialPortBaseNameDefault = "/dev/ttys%d";
#else
static const char *serialPortBaseNameDefault = "/dev/ttyS%d";
#endif

and the SerialPlugin code inside the image looks okay.

Changing the buildUnix32 into:

buildUnix32
CogNativeBoostPlugin setTargetPlatform: #Linux32PlatformId.
 PharoUnixConfig new
"generateForDebug;"
 addExternalPlugins: #( FT2Plugin SqueakSSLPlugin );
addInternalPlugins: #( UnixOSProcessPlugin SerialPlugin );
 addThirdpartyLibraries: #(
'libssh2'
'libgit2' );
 generateSources;
generate.

generates all without an issue.

Now, I am going to compile this on CentOS and get back to you.

Phil




>
>
> Thierry
> --
> Thierry Goubier
> CEA list
> Laboratoire des Fondations des Systèmes Temps Réel Embarqués
> 91191 Gif sur Yvette Cedex
> France
> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140514/fea56cbb/attachment.htm


More information about the Vm-dev mailing list