Shop OBEX P1 Docs P2 Docs Learn Events
How to use a spin program using simpleIDE? — Parallax Forums

How to use a spin program using simpleIDE?

So I have been told that you can call a spin program using c in simpleIDE but I haven't been able to find the answer anywhere to how to do it? Any help would be great.

Thanks

Comments

  • Do you want to include Spin in a C program or do you just want to run a pure Spin program?

    I don't know how to include a Spin program in a C program in SimpleIDE, but it is possible. If you want to run a pure Spin program, you probably want PropellerIDE or Propeller Tool.
  • SimpleIDE can compile the PASM code out of a DAT section in a Spin file, and you can call that. I make pretty heavy use of that feature for the Elev8 Flight Controller.

    I'm not sure you can use it to call actual Spin code directly. You could use the Spin2CPP tool to convert the Spin code to C, and call that, but that's not quite the same thing, and I'm not sure SimpleIDE has support for doing that built in - someone else can answer that bit.
  • This thread has a list of different ways to use Spin and C/C++

    http://forums.parallax.com/discussion/157563/combining-spin-and-c/p1
  • Thanks for all of the replies I'll take a look at your thread DavidZemon.
  • Ok so I got the spin2cpp but I'm getting this error when I run it:

    FullDuplexSerial: No such file or directory

    Does anyone have any idea what could be wrong?
  • ElectrodudeElectrodude Posts: 1,657
    edited 2016-04-27 18:23
    It sounds like you have a regular old Spin program. I had assumed you were trying to link Spin with C, because you were using SimpleIDE. SimpleIDE is the wrong IDE for Spin - you want PropellerIDE or Propeller Tool instead. You shouldn't need spin2cpp or propgcc for normal spin.
Sign In or Register to comment.