Shop OBEX P1 Docs P2 Docs Learn Events
spin2cpp version 1.92 — Parallax Forums

spin2cpp version 1.92

ersmithersmith Posts: 6,053
edited 2015-04-13 02:34 in Propeller 1
There's a new release of spin2cpp, available at:

https://github.com/totalspectrum/spin2cpp/releases/tag/v1.92

This fixes an incompatibility between spin2cpp output and gcc5, as well as fixing the --binary output flag to spin2cpp. spin2cpp can now be used as basically a drop in replacement for openspin/bstc:
  spin2cpp --binary -Os -mcmm foo.spin
will compile foo.spin and all its dependent submodules in CMM mode, and place the result in "foo.binary".

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2015-04-12 16:07
    ersmith wrote: »
    There's a new release of spin2cpp, available at:

    https://github.com/totalspectrum/spin2cpp/releases/tag/v1.92

    This fixes an incompatibility between spin2cpp output and gcc5, as well as fixing the --binary output flag to spin2cpp. spin2cpp can now be used as basically a drop in replacement for openspin/bstc:
      spin2cpp --binary -Os -mcmm foo.spin
    
    will compile foo.spin and all its dependent submodules in CMM mode, and place the result in "foo.binary".
    Did you update the version included as a submodule in propeller-gcc?
  • ersmithersmith Posts: 6,053
    edited 2015-04-12 16:13
    David Betz wrote: »
    Did you update the version included as a submodule in propeller-gcc?

    No, not yet (I forgot, sorry).
  • ersmithersmith Posts: 6,053
    edited 2015-04-12 16:29
    David Betz wrote: »
    Did you update the version included as a submodule in propeller-gcc?

    propeller-gcc should be up to date now (assuming I handled the submodule update correctly -- I'm still learning my way around that part of git!)
  • David BetzDavid Betz Posts: 14,516
    edited 2015-04-12 16:30
    ersmith wrote: »
    propeller-gcc should be up to date now (assuming I handled the submodule update correctly -- I'm still learning my way around that part of git!)
    Thanks Eric. I'm also still struggling with submodules. I like the idea but the implementation in git seems cumbersome.
  • RaymanRayman Posts: 14,652
    edited 2015-04-12 19:26
    I'm a little confused now... (Spin2cpp is great, btw).

    Are you saying that it now compiles spin code directly to a binary file that one can program the Prop with?

    Does it convert first to C++ and then to binary?
  • jmgjmg Posts: 15,173
    edited 2015-04-12 20:00
    Rayman wrote: »
    Are you saying that it now compiles spin code directly to a binary file that one can program the Prop with?

    Does it convert first to C++ and then to binary?
    I read that as Automatically Calling the PropGCC after the Spin2CPP step, so I doubt the Spin2CPP does the actual compiling itself, and the command line tells it it needs to finally call PropGCC to create the binary.

    Nice touch, and implies the Spin2CPP needs no manual fixing :)

    I wonder if any Debug information is generated along the way, and does that use the Line# from Cpp, or can it use the Spin source lines ?
  • ersmithersmith Posts: 6,053
    edited 2015-04-13 02:34
    Rayman wrote: »
    I'm a little confused now... (Spin2cpp is great, btw).

    Are you saying that it now compiles spin code directly to a binary file that one can program the Prop with?

    Does it convert first to C++ and then to binary?

    Sorry if I was unclear, but yes, it converts to C++ and then calls PropGCC to convert the code to binary (as jmg suggested). Debug information is generated if a -g argument is given on the command line, but that's only useful if you do ELF output (not binary) and it uses the C++ source lines. Using the Spin source lines would be a nice touch, though -- I'll look into it.

    (And to further clarify -- compilation is optional. You can still use spin2cpp to just output C/C++ files, as before; it's only if you give a --binary or --elf option that it compiles those.)

    Eric
Sign In or Register to comment.