Shop OBEX P1 Docs P2 Docs Learn Events
Is Simple IDE what I need. — Parallax Forums

Is Simple IDE what I need.

spinbobspinbob Posts: 27
edited 2013-05-18 06:34 in Propeller 1
Kind of new here so I'm a little confused about some of the tools. Can someone tell me if I'm on the right track.

I currently have a few objects written in spin that I need to use. ( I did not write these)
I am a C programmer so I download SimpleIDE and got it to work on my hardware with a simple C file.
Questions:
How do I get this to output an object file or .eeprom or any kind of dowloadable?
Will SimpleIDE allow me to compile up spin files and C files together?
Should I be using some other App. instead.
Thanks

Comments

  • SRLMSRLM Posts: 5,045
    edited 2013-05-17 14:27
    Hi Spinbob,

    At this time, you can't mix and match spin and C files in one project: you have to go with one or the other. There is a handy tool called spin2cpp that does a pretty good job of converting spin files to C++ (or C) files.

    SimpleIDE will take care of automatically building and downloading the executable. FYI, that's a ".elf" file type.

    At this time, SimpleIDE is only for C/C++ projects. Jazzed is soon to make a branch that can handle Spin, but it's not here yet. In the meantime, you need to use Proptool or BST for Spin files.
  • jazzedjazzed Posts: 11,803
    edited 2013-05-17 14:32
    spinbob wrote: »
    How do I get this to output an object file or .eeprom or any kind of dowloadable?

    SimpleIDE downloads code to RAM, EEPROM (and other memory types) on a board.
    If you want a separate file, there are steps to make it with the included propeller-load program.
    spinbob wrote: »
    Will SimpleIDE allow me to compile up spin files and C files together?

    SimpleIDE will mix PASM from a Spin file in a C program to run in a COG.
    It will not mix Spin code and C code into a program.

    It is theoretically possible to run Spin code side-by-side in a separate COG, but SimpleIDE will not do that.
    There is a Spin to C converter (spin2cpp) that can be used, but it is not integrated in SimpleIDE.

    @SRLM, SimpleIDE can compile Spin programs, but not the same way as Propeller-Tool.
    And yes, another program is comming that will work like Propeller-Tool.
  • spinbobspinbob Posts: 27
    edited 2013-05-17 15:07
    So, each spin file will turn into a .C file. These will stay seperate and I will be able to create a tab for each in the project.?
  • jazzedjazzed Posts: 11,803
    edited 2013-05-17 15:27
    spinbob wrote: »
    So, each spin file will turn into a .C file. These will stay seperate and I will be able to create a tab for each in the project.?

    The spin2cpp program can make Spin source into C/C++ source. You can add C, C++, Spin, and other tabs to a SimpleIDE C or C++ project.

    The most typical use of Spin within a SimpleIDE C or C++ project however is simply for re-using the Spin file's PASM COG code.
  • spinbobspinbob Posts: 27
    edited 2013-05-17 16:00
    Oh, sure. I get it, many of the spin files have ASM stuff. Thanks alot, I will try it out and resond here.
  • spinbobspinbob Posts: 27
    edited 2013-05-17 21:29
    I tried to convert a .spin to a .C and didn't get very far. My first error was "couldn't find" Floatmath" so I added that to my dir. and that error went away. But now I have a syntax error.
    I put in this:
    C:\spin_v103>spin2cpp myprog.spin
    I get this:
    Myprog.spin:133: syntax error
    I moved functions around and the error stays the same. This compiles OK with spin.
    Any ideas?
  • kuronekokuroneko Posts: 3,623
    edited 2013-05-17 22:09
    spinbob wrote: »
    Myprog.spin:133: syntax error
    What does this line look like? Can you attach that file?
  • spinbobspinbob Posts: 27
    edited 2013-05-17 23:48
    I got it working. The problem area was a Case statment. WoW! Nice code generator. This will save me dozens of hours assigning stuff. Thank you forum folks......
  • David BetzDavid Betz Posts: 14,516
    edited 2013-05-18 06:34
    spinbob wrote: »
    I got it working. The problem area was a Case statment. WoW! Nice code generator. This will save me dozens of hours assigning stuff. Thank you forum folks......
    Yes, Eric (ersmith) did a wonderful job with spin2cpp!
Sign In or Register to comment.