On 14 May 2014, at 10:40, [email protected] wrote:

> On Wed, May 14, 2014 at 10:15 AM, Goubier Thierry <[email protected]> 
> 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.

this is wrong. 
serial plugin is included as part of the standard default plugins, that’s why 
it is not seen there. 

cheers, 
Esteban

> 
> 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
> 
> 

Reply via email to