Serial port support on Pharo (2 or 3)
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. 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
On Wed, May 14, 2014 at 10:15 AM, Goubier Thierry <thierry.goubier@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
On 14 May 2014, at 10:40, phil@highoctane.be wrote:
On Wed, May 14, 2014 at 10:15 AM, Goubier Thierry <thierry.goubier@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.
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
On Wed, May 14, 2014 at 10:47 AM, Esteban Lorenzano <estebanlm@gmail.com>wrote:
On 14 May 2014, at 10:40, phil@highoctane.be wrote:
On Wed, May 14, 2014 at 10:15 AM, Goubier Thierry <thierry.goubier@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.
this is wrong. serial plugin is included as part of the standard default plugins, thatâs why it is not seen there.
Ok, thx for pointing that out. Phil
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
serial port should be working. at least in vmLatest. cheers, Esteban On 14 May 2014, at 10:15, Goubier Thierry <thierry.goubier@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.
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
participants (3)
-
Esteban Lorenzano -
Goubier Thierry -
phil@highoctane.be