[VM-team] SerialPort updates (M7266) actions required

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[VM-team] SerialPort updates (M7266) actions required

David T. Lewis
 
Updates to the platforms code and VMMaker are needed to provide named
serial port access. This is a coordinated change affecting all platforms.
Following are the steps required:

Dave:
  - Update SerialPlugin in VMMaker with new prims and 64-bit clean
    declarations (done - this is in VMaker-dtl.136 on SqueakSource).

Ian:
  - Apply patch to platforms/Cross/plugins/SerialPlugin/SerialPlugin.h
    to declare new functions and change signatures to avoid casting
    pointer to int. Patch is attached (M7266-SerialPlugin.h.diff). Note, the
    patches on Mantis are out of date now, use this one instead.
  - Apply patch to platforms/unix/plugins/SerialPlugin/sqUnixSerial.c to
    get rid of some unnecessary type casts. I believe that you have already
    applied the main part of Severin's changes, so this should complete the
    unix updates. Patch attached (M7266-sqUnixSerial.c.diff).

Andreas:
  - Update platforms\win32\plugins\SerialPlugin\sqWin32SerialPort.c to match
    the modified signatures in SerialPort.h. This prevents passing pointer
    parameters as ints, required for running on 64 bit platforms.
  - Add stub functions for four new functions (serialPortCloseByName,
    serialPortOpenByName, serialPortReadIntoByName, serialPortWriteFromByName)
    to support the the new primitives. These can just fail the primitive. Function
    prototypes are in SerialPlugin.h.
 
John:
  - Update platforms/Mac OS/plugins/SerialPlugin/sqMacSerialPort.c, same as
    for Windows (see above).
  - I don't know how OS X handles serial devices, but you may be able consider
    using the Unix code at this point.

Thanks all!

Dave

--- background ---

For reference is was the suggested "to-do" list that I posted a while back.
We are working on step 2 now.

1) Closure support.
 - Priority: High, should be done as soon as possible
 - All major VM distributions should support images with closure bytecodes.
 - Current status: COMPLETE
 
2) Changes to support Etoys and teaching for kids.
 - Priority: High, supports large educational programs.
 - Mantis 7266: SerialPlugin doesn't handle arbitrary nodes names
 - Mantis 7103: Playing sounds in linux 64 bits causes a vm segmentation fault
 - Current status: These require changes to VMMaker and platforms sources,
   all platforms effected. Changes are straightforward but must be done in a
   coordinated manner for all platforms.
 
3) Some simple updates for 23/64 bit platforms.
 - Priority: Low
 - Mantis 7236: Make AsynchFilePlugin work on 32/64 bit images and 32/64 bit unix VMs
 - Mantis 6828: make FileCopyPlugin work on 32/64 bit images and 32/64 bit unix VMs
 - Current status: These are minor updates, low priority but easy to do. Patches
   are available but must be coordinated for all platforms.
 
4) 64-bit FFI (Interpreter updates as well as FFI)
 - Priority: Medium
 - Mantis 7237: Make FFI work on 64 bit platforms
 - Current status: Patches are available, but additional work and testing may
   be required on some platforms. I consider this update important because it
   effects the interpreter as well as FFI itself, e.g. these changes are
   a prerequisite to closing out the issues in Mantis 6987: "signed32BitValueOf:,
   signed64BitValueOf: etc. broken".


M7266-SerialPlugin.h.diff (952 bytes) Download Attachment
M7266-sqUnixSerial.c.diff (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [VM-team] SerialPort updates (M7266) actions required

johnmci
 
Well Macs don't have serial ports, at least not the ones that were  
built after 1998.
The macintosh serial port source just stubs out the logic when we  
moved from Carbon to OS-X in 2002.
I do note where people use *serial* device like things is for MIDI,  
but the MIDI plugin for OS-X talks to the
quicktime interface when interacts with the USB *serial* like midi  
devices.

However once Ian confirms the changes are done, I can just swap in the  
unix serial support which
might help some folks that have obscure serial like USB devices.

Lastly there are some USB plugins around that let folks talk to USB  
devices (very custom needs).



On 22-Aug-09, at 1:28 PM, David T. Lewis wrote:

> John:
>  - Update platforms/Mac OS/plugins/SerialPlugin/sqMacSerialPort.c,  
> same as
>    for Windows (see above).
>  - I don't know how OS X handles serial devices, but you may be able  
> consider
>    using the Unix code at this point.
>
> Thanks all!

--
=
=
=
========================================================================
John M. McIntosh <[hidden email]>   Twitter:  
squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
=
=
=
========================================================================




Reply | Threaded
Open this post in threaded view
|

Re: [VM-team] SerialPort updates (M7266) actions required

Ian Piumarta
In reply to this post by David T. Lewis
 
On Aug 22, 2009, at 1:28 PM, David T. Lewis wrote:

> Ian:
>   - Apply patch to platforms/Cross/plugins/SerialPlugin/SerialPlugin.h
>   - Apply patch to platforms/unix/plugins/SerialPlugin/sqUnixSerial.c

done

Reply | Threaded
Open this post in threaded view
|

Re: [VM-team] SerialPort updates (M7266) actions required

David T. Lewis
In reply to this post by johnmci
 
On Sat, Aug 22, 2009 at 01:43:27PM -0700, John M McIntosh wrote:
>
> Well Macs don't have serial ports, at least not the ones that were  
> built after 1998.

Well that solves the root cause of the problem ;-)

> However once Ian confirms the changes are done, I can just swap in the  
> unix serial support which
> might help some folks that have obscure serial like USB devices.

This sounds like a good approach.

Thanks,
Dave

Reply | Threaded
Open this post in threaded view
|

Re: [VM-team] SerialPort updates (M7266) actions required

Phil B
In reply to this post by johnmci
 
On Aug 22, 2009, at 4:43 PM, John M McIntosh wrote:

> Well Macs don't have serial ports, at least not the ones that were  
> built after 1998.
> The macintosh serial port source just stubs out the logic when we  
> moved from Carbon to OS-X in 2002.
> I do note where people use *serial* device like things is for MIDI,  
> but the MIDI plugin for OS-X talks to the
> quicktime interface when interacts with the USB *serial* like midi  
> devices.
>
> However once Ian confirms the changes are done, I can just swap in  
> the unix serial support which
> might help some folks that have obscure serial like USB devices.
>
> Lastly there are some USB plugins around that let folks talk to USB  
> devices (very custom needs).
>
>

John,

Just curious when you thought these changes might be incorporated into  
the OS X VM?

Thanks,
Phil