<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;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 24 Mar 2017, at 15:07, Guillermo Polito <<a href="mailto:guillermopolito@gmail.com" class="">guillermopolito@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi all,<div class=""><br class=""></div><div class="">We are here with Olivier taking a loot at how serial ports work, because he wants to use it to connect to arduino/raspberries.</div><div class=""><br class=""></div><div class="">We saw that the serial port works nice in unix, in windows we had a look but we found some problems (and we do not have now a windows machine to test well), and we found that in mac it does not work. We are seeing that this behaviour is there since Pharo 3 (4 years ago).</div><div class=""><br class=""></div><div class="">We tried to see if it was a problem of the VM plugin (missing depenencies using ld / otool) but everything seemed ok.</div><div class=""><br class=""></div><div class="">Finally, we took the vm from git and tried to compile it from scratch.</div><div class=""><br class=""></div><div class=""><b class="">Meta-question 1:</b> Is there a way to create an xcode project from the vm sources? We would have lost less time if we used a graphical debugger to take a look at this :).</div></div></div></blockquote><div><br class=""></div><div>No. What you do is to create an empty project and then attaching the running vm. </div><div><br class=""></div><div>Esteban</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">There, we found that</div><div class="">- apparently the mac VM is using an empty implementation of the serial port plugin:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/Mac%20OS/plugins/SerialPlugin/sqMacSerialPort.c" class="">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/Mac%20OS/plugins/SerialPlugin/sqMacSerialPort.c</a></div><div class=""><br class=""></div><div class="">We replaced the contents of that file by the one in the Unix plugin and it worked <b class="">when the plugin was compiled as internal</b> (delta some differences between the default values in mac and unix like uppercasing the 's' of ttyS and ttys) </div><div class=""><br class=""></div><div class=""><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c" class="">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c</a><br class=""></div><div class=""><br class=""></div><div class="">However, as soon as we retried to recompile the plugin as external it did not work any more... The initializeModule function was never called, the module was not loaded (from the system report) and the Serial port could not be open. For this we would have liked a debugger. And I'm not a friend of gdb on the terminal...</div><div class=""><br class=""></div><div class=""><b class="">Meta-question 2:</b> Is there any clean/make clean used to remove generated files. We found ourselves a lot of times bitten by the fact that even recompiling everything using `mvm -A` did not really recompile and we had to remove files from here and there...<br class=""></div><div class=""><br class=""></div><div class="">How should we propose a fix?</div><div class="">- do we duplicate the code of the plugin in the mac and unix platforms?</div><div class="">- or do we somehow tell the compilation process that for this plugin it should use the sources in the unix platform code?</div><div class=""><br class=""></div><div class="">Thanks!</div><div class="">Guille and Olivier</div></div>
</div></blockquote></div><br class=""></body></html>