Shop OBEX P1 Docs P2 Docs Learn Events
Leveraging SPIN/PASM assets — Parallax Forums

Leveraging SPIN/PASM assets

Invent-O-DocInvent-O-Doc Posts: 768
edited 2012-06-25 09:20 in Propeller 1
Based upon the documentation, there appears to be ways to run PASM and compiled SPIN code. It there a way to leverage SPIN objects within a GCC project? For example, device or video drivers?

Comments

  • jazzedjazzed Posts: 11,803
    edited 2012-06-20 13:24
    PASM drivers can be leveraged, but not full SPIN objects straight from the OBEX. We create C interface code to PASM in several drivers today.

    When I asked about adding support for full SPIN objects within the Propeller GCC context Parallax said no. It is not impossible to add support for SPIN objects, it's just not a Propeller-GCC feature.
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2012-06-20 13:31
    Interesting, Jazz. The GCC is and the ability to leverage multiple memory models is a significant achievement. My concern about omitting support for SPIN objects is that it fragments the Propeller code base.
  • KyeKye Posts: 2,200
    edited 2012-06-20 13:39
    This route was chosen at the time to get the product out the door. I guess the issue could be revisted later.
  • ersmithersmith Posts: 6,097
    edited 2012-06-20 15:01
    There is a spin2cpp tool that will automatically convert many .spin files (including ones containing PASM) to C++:

    http://forums.parallax.com/showthread.php?137346-Updated-Spin-to-C-translator

    At the moment it's a command line only tool, but if there's demand I'm sure we could figure out a way to hook it up to the IDE.

    Eric
  • ersmithersmith Posts: 6,097
    edited 2012-06-25 09:20
    The spin2cpp project is now hosted at http://code.google.com/p/spin2cpp.

    It can automatically convert a number of the "gold standard" OBEX objects from Spin/PASM to C++. There are some demos included in the package, and some rudimentary documentation -- more documentation needs to be done, and user input is appreciated!
Sign In or Register to comment.