Shop OBEX P1 Docs P2 Docs Learn Events
SPIN + RaspberryPi instructions? — Parallax Forums

SPIN + RaspberryPi instructions?

prof_brainoprof_braino Posts: 4,313
edited 2013-04-17 22:51 in Propeller 1
Are there any end-to-end instructions for setting up Raspberry Pi load SPIN to the prop?

I did a couple search and found a zillion hits for work in progress, so I figured it would be easier to just ask.

Now that I have SPIN on LINUX instructions, I want the same for RPi.

It looks like theres a bunch of different ways to do it, are these all slightly different paths to the same end, or are there trade offs we have to choose between the different methods?

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2013-04-06 08:12
    Heater and MagIO2 I think have had the most success that I've seen on the forums. Heater has a working SimpleIDE build for the RasPi (someplace) and MagIO2 has had some very good and helpful commentary. I haven't done it yet with my Pi since I got distracted several times since then!

    I do not think there are any step by step instructions for completing the task.
  • Heater.Heater. Posts: 21,230
    edited 2013-04-06 12:11
    I answered this else where but in case anyone else wants to know, here is where I got up to:

    I have successfully programmed Propellers from the Raspberry Pi using propgcc and SimpleIDE. You should not have to move to Debian on your dev machine to do this.

    What I did was compile propgcc and SimpleIDE on the Raspi itself. Takes about 15 hours or so:smile: It's also a bit tricky. Here are some instructions:

    http://forums.parallax.com/showthread.php/141428-propgcc-builds-on-Raspberry-Pi-!!

    and follow this link to a ready made package for Raspian including propgcc, spin support and loader. You can also use the serial port on the Raspi GPIO for programming your Prop.

    http://forums.parallax.com/showthread.php/141469-SimpleIDE-for-Raspberry-Pi-Raspian

    I need to make a new package for more a more recent release of propgcc, SimpleIDE.

  • jazzedjazzed Posts: 11,803
    edited 2013-04-06 12:16
    Roy's Spin Compiler port (aka SpinRoy) should be buildable on any linux, mac, or windows platform.
    All you need is GCC (typically pre-installed on linux) or VisualStudio (Express? is still free?).
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-04-06 16:12
    Yeah, those were the threads that made me ask. So, I guess I should.... Ask more questions.

    Which would be the recommended course:

    * Do I want to do the 15 hour recompile myself, will that give me the latest material? (Can a n00b expect to succeed at this?)
    * Do I want the precompiled old version, is it more or less the same as the new stuff (from a user perspective)?
    * Do I want to wait until SpinRoy is part of the tool chain, that looks like the eventual "correct" solution?

    The "Do the second part first" instruction stopped me, something like this usually means that I better wait.
  • Heater.Heater. Posts: 21,230
    edited 2013-04-07 00:08
    Braino,

    I would not recommend the 15 hour compile. It's a bit more involved than I let on as the loader requires some PASM drivers compiled to binary blobs by BSTC which does not run on the Pi.
    I would not recommend waiting for SpinRoy to be taken into use. We don't know how long that may be and waiting is boring:)

    Just get that pre-compiled version and have fun. It works well enough. I'll endeavor to put up a more recent build soon as well.
  • KeithEKeithE Posts: 957
    edited 2013-04-15 21:47
    Heater - this is OT, but do you know if there's any way to use pbasic on the Pi? I have some Sumobots and this would be nice for my kids as my other option is to run Windows in a VM. I'll try out your Prop build when I recover from vacation. It sounds like it could go well with "Robotics on a budget" by Propellerpowered.
  • Heater.Heater. Posts: 21,230
    edited 2013-04-15 23:11
    Keith,

    Sorry I don't know. I have never heard of such a thing. But then I don't follow any kind of BASIC developments.
  • KeithEKeithE Posts: 957
    edited 2013-04-16 08:17
    Heater - I thought pbasic was how Parallax refers to the language used in the Basic Stamps. I'll have to look around on those forums.
  • dgatelydgately Posts: 1,630
    edited 2013-04-16 09:21
    Keith,

    I built the following project on RaspberryPi. It allows development of PBASIC code and download to BASIC stamp from Linux... Have not tried it out yet, but it builds!

    http://bstamp.sourceforge.net

    Looks like the only thing that keeps this from working is that it uses the i386 tokenizer.so library, compiled for Win/x86...
  • KeithEKeithE Posts: 957
    edited 2013-04-16 13:06
    dgately wrote: »
    Keith,

    I built the following project on RaspberryPi. It allows development of PBASIC code and download to BASIC stamp from Linux... Have not tried it out yet, but it builds!

    http://bstamp.sourceforge.net

    Looks like the only thing that keeps this from working is that it uses the i386 tokenizer.so library, compiled for Win/x86...

    Thanks for trying. I see from this post http://forums.parallax.com/showthread.php/144446-BasicStamp-and-Raspberry-Pi that the tokenizer was partially written in x86 assembler. I was hoping that it was developed in C. I see that there is a dos emulator "rpix86" that we could try. Or dosbox?
  • dgatelydgately Posts: 1,630
    edited 2013-04-17 22:51
    KeithE wrote: »
    Thanks for trying. I see from this post http://forums.parallax.com/showthread.php/144446-BasicStamp-and-Raspberry-Pi that the tokenizer was partially written in x86 assembler. I was hoping that it was developed in C. I see that there is a dos emulator "rpix86" that we could try. Or dosbox?

    x86 emulation on the RaspberryPi will be even slower than running directly on the Pi hardware (already a kind of slow experience, for me). I know that there is one or more efforts "afoot" to revitalize the tokenizer for Mac OS X, so possibly a C-based solution will become available. That would be a good logical choice for performance and future development work...

    dgately
Sign In or Register to comment.