Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Development in Linux: A short guide — Parallax Forums

Propeller Development in Linux: A short guide

Spork FrogSpork Frog Posts: 212
edited 2008-09-23 03:09 in Propeller 1
I know Parallax gets a lot of requests about developing for the Propeller in Linux, so I figured I'd show others how it can be done simply.

Developing with the Parallax Propeller Microcontroller under Linux-*Based Operating Systems
A step-*by*-step guide
Rev. 0B

This is a guide to help you set up a development environment for the Propeller under native Linux without the use of VMWare, Bochs, QEmu, VirtualBox, or other similar virtualization products.

Step 1: Prerequisites

All of the following should be installed prior to any of the other steps. Most popular distributions provide these; see your package manager for more information. Step 2: The Propeller Loader

The one thing when dealing with the Propeller that never seems to work correctly is communication with the chip itself. However, thanks to the great work of Remy Blank, there is now a Python script that runs natively to handle communication. Although it's not as fast as the Propeller IDE, it still gets the job done just fine.

You can find the script here.

Step 3: Propellent

Parallax has recently released a command *line version of their popular Propeller IDE and compiler. It can take in a SPIN file, compile it, and with your choice either save a binary/EEPROM file or upload to the Prop directly. Direct upload seems once again not to work under Wine, but the compiler works fine.

You can find it on Parallax's website here.

Step 4: Tying it all together

Copy the following files to the same folder as the SPIN file you wish to compile:

Loader.py
Propellent.dll
Propellent.exe



Edit your SPIN code in your favorite text editor.

Then, through a command line, run the following:

wine Propellent.exe /compile yourfile.spin /savebinary
python Loader.py yourfile.binary -*r



If all goes well, you should now have a happily programmed Prop!

Post Edited (Spork Frog) : 8/2/2008 9:14:44 PM GMT

Comments

  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-06-05 14:55
    Sheeesh, four days and not a peep. I ain't got linuz, but this is applause worthy. IMHO. hop.gif
  • rokickirokicki Posts: 1,000
    edited 2008-06-05 16:24
    Time for me to go install wine. This is great. I didn't know you could invoke wine to invoke a command so easily.

    This is definitely excellent! Congrats everyone, and thanks Parallax.
  • BamseBamse Posts: 561
    edited 2008-07-23 03:41
    I haven't played around with Linux (I'm running Ubuntu 8) for a while but I just had to try this...
    Got it to work after 30 minutes, no problems following the instructions...

    Thanks everybody who got this to run on Linux...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Nick McClickNick McClick Posts: 1,003
    edited 2008-07-23 19:26
    Mad Skillz. My only reason for windows is now gone!

    Hope you don't mind - I posted a copy of these instructions (attributed to you with a link to this thread) up on the wiki.
    propeller.wikispaces.com/Linux+Development

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Concentrate on understanding the problem, not applying the tool
  • BamseBamse Posts: 561
    edited 2008-07-23 21:50
    Does anyone know how to integrate this into an IDE in Linux ?

    I'm new to Linux so I just wonder if there is an easy way to do this...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • nooknikznooknikz Posts: 9
    edited 2008-08-02 19:06
    Thank for informations. I looking for Native Compiler on Linux.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller P8X32 USB Board
    proporells.jpg
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-02 19:15
    In case you haven't figured out from this thread, there is no native support for the Propeller under Linux or the MacOS.
    What Spork Frog has described does work for any Linux or MacOS that supports running Windows software under Wine.
  • Spork FrogSpork Frog Posts: 212
    edited 2008-08-02 21:11
    @Nick: Thanks! I don't mind at all. That's actually one of the best places where it could be. But I did clean it up a bit for a few links and a little formatting.

    @Bamse: If you wanted a full IDE, you'd have to ask someone else as my knowledge of C is fairly limited as of right now. But you could make something that would be the equivalent, just taking GEdit and adding Spin syntax coloring rules and a makefile, it could be about the same. I'll look into that.

    @nooknikz: Yeah, there is currently no native compiler for Linux and one cannot be easily created as of right now; Parallax has been known to keep their development tools locked down pretty tight source-wise (and I don't blame them.)

    I also fixed the last line, there was just "r" in the loader arguments when it should have been "-r". Sorry about any confusion that may have caused.

    Post Edited (Spork Frog) : 8/2/2008 9:20:07 PM GMT
  • Jay KickliterJay Kickliter Posts: 446
    edited 2008-08-02 23:58
    Mike, do you use TextMate? I just got Propellent to work with Darwine under Leopard (haven't used Loader.py yet), and I'm hoping someone has made a Spin dictionary for TextMate. I'd do it myself, but I don't know the language well enough yet.
  • bmentinkbmentink Posts: 107
    edited 2008-08-19 07:01
    Hi,

    I have tried to run this, but loader.py refuses to download the .binary to the target.

    The error message is:

    Uploading NCO.binary
    Timeout error
    
    



    I also note that ./loader.py --version does not return the version as indictated by the help.

    Thanks,
    Bernie
  • bmentinkbmentink Posts: 107
    edited 2008-08-19 07:44
    Duh! Forget my post, it helps if you have voltage to the propeller ........
  • asyntacticasyntactic Posts: 1
    edited 2008-08-22 04:10
    Spork Frog, thank a million to you and Remy Blank. I've spent several weeks looking for a way to use the Spin toolset from within Linux, and I had been using Propeller Tool from Windows within a virtual machine. I just got this method working in under 10 minutes, and it's much more preferable.

    Does anyone know if there's an Emacs mode out there for Spin? If not, I've been giving some thought to making one. Even in fundamental mode, it'll be great to compile and upload a program with an Emacs key command!

    Thanks again,
    A
  • Spork FrogSpork Frog Posts: 212
    edited 2008-08-25 18:48
    @asyntactic: As to my knowledge, not that anyone has made public. That would be pretty nice to have though.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-25 19:08
    Jay,
    I use TextWrangler for text file editing under the MacOS. I put together a GUI driven version of the Python downloader that works pretty well. It's on the forum somewhere. It uses CocoaDialog (cocoadialog.sourceforge.net/documentation.html) and PySerial (pyserial.wiki.sourceforge.net/pySerial). I'll start experimenting with Darwine and Propellent.
  • PaulPaul Posts: 263
    edited 2008-09-04 01:52
    This works great! Thanks to all those involved. I got it up and running on Ubuntu Hardy in about 15 minutes. It was also the first time using Bean's Propeller Mini Development Board that a buddy won at the Newark Propeller Conference. He will probably want it back now! Works like a champ!

    The magic: s7000257-t.jpg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki Rocks! - propeller.wikispaces.com
    640 x 480 - 174K
  • rjo_rjo_ Posts: 1,825
    edited 2008-09-04 13:38
    Paul,

    It is interesting how the Propeller brings people together[noparse]:)[/noparse]

    Next time I drop my daughter off to visit your sister, we are going to have to have a long talk!!!

    And that should be just before the next Propeller Expo in NORWALK... as in Ohio[noparse]:)[/noparse]

    I happened to see this because I was looking for a disposable PC to take to Uganda... so I can play with my Prop on the bus.

    Now... I can consider a Asus 900 linux... available at Walmart!!!!

    Glad you are enjoying Bean's mini

    Here's a picture of my dual Prop <ini... with 4D's 96 uoled getting power from the Bean's Mini... which gets power from the pc[noparse]:)[/noparse]

    AND the deal was ... if you use it, you get to keep it. Sure wish I had waited around to talk to U.

    Next item on the list... a Prop-puter for the developing world... $12 Euros


    Rich
    1600 x 1200 - 408K
    1600 x 1200 - 408K
  • rjo_rjo_ Posts: 1,825
    edited 2008-09-04 13:39
    If you use cross eye viewing... my dual Prop mini appears to be in 3D
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-09-04 14:04
    Has anyone tried making the tool work under gOS?

    If so, then this laptop is cheap enough to be considered a Propeller accessory. ($299.00)

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • rjo_rjo_ Posts: 1,825
    edited 2008-09-04 14:55
    Oldbit needs a quick response because I'm looking to do this today[noparse]:)[/noparse]
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-09-04 15:04
    Actually, I just done a little more research..

    Tigerdirect has the "Sylvania G" $309. and it looks like Sylvania has XP driver support for it.
    link here.
    It will have to be reloaded with XP, but I think this is the direction I'm going..

    (Momma says it time to sell a few toys to get more toys.. Time to Ebay.. [noparse]:)[/noparse]
    (Anyone want my composite Eyepiece Display cheap? [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • BamseBamse Posts: 561
    edited 2008-09-09 04:51
    My hard drive crashed last week and I could not find my Windows XP CD that came with my Dell.
    The one I had for my previous computer don't recognize the SATA drives and would not install...

    However Ubuntu 8 didn't need any special drivers so I decided to give it a try,
    Now that everything is up and running I really don't feel like having to install Windows even if I found my CD. wink.gif

    I got the Propellent up and running and have no problems programming my Hydra so I got the basics done.
    However I'm fairly new to Linux and I don't know what to use for an IDE (Integrated Development Environment).
    Any recommendations ?
    Has anyone started working on a platform independent IDE ?

    I'm a Java programmer by trade, maybe I should give it a try myself... wink.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • BradCBradC Posts: 2,601
    edited 2008-09-09 11:47
    Bamse said...

    Has anyone started working on a platform independent IDE ?

    I'm a Java programmer by trade, maybe I should give it a try myself... wink.gif

    Just make sure you get the Unicode stuff right and she'll be apples.

    I'm working on one myself, but I'd be happy for someone else to beat me to the punch, especially if its cross platform (better still if it does not require Mono or a JVM)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • BamseBamse Posts: 561
    edited 2008-09-09 14:07
    It would be nice if the Propeller Tool worked with Wine but I gave it a quick try and gave up...

    Let me try something in Java, I'm just looking for an IDE so I'm going to call Propellent and the Python loader from Java...
    However I'm not familiar with GUI programming (javax.swing) so don't expect anything soon... wink.gif

    Do you happen to know the Unicode flavor that the Propeller tool uses ?
    Seem to be UTF-16 or similar...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • sailman58sailman58 Posts: 162
    edited 2008-09-09 14:25
    Is there any reason that Eclipse could not be used for the IDE? I know that it runs on both Linux and Windows and I believe that a Mac version is also available. What I don't know is if there is something about the Propeller or Spin that would make it incompatible with Eclipse.

    Ron
  • BamseBamse Posts: 561
    edited 2008-09-10 04:30
    That's probably a very good idea, I'm not familiar with Eclipse but I'll have a look at it...

    Seems like we have two compilers for Linux now (Propellent under Wine and Homespun under Mono) so if we just can get a fancy IDE, I'll be very happy... wink.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • BradCBradC Posts: 2,601
    edited 2008-09-10 04:55
    Bamse said...

    Do you happen to know the Unicode flavor that the Propeller tool uses ?
    Seem to be UTF-16 or similar...

    Yep, standard UTF-16 with a BOM.
    I've got it loading and displaying with the proper fonts and symbols in Win98/Linux/MacOS.. so it's not incredibly difficult to do.

    I convert the files into UTF-8 as my editor component wants that, and in the compiler I just skip any character > $7F..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-09-22 01:55
    After seeing how simple this is myself, I've started working on a Spin "highlight" for Gedit.
    The parallax.ttf font can be used if set for 11

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • BradCBradC Posts: 2,601
    edited 2008-09-22 05:19
    Oldbitcollector said...
    After seeing how simple this is myself, I've started working on a Spin "highlight" for Gedit.
    The parallax.ttf font can be used if set for 11

    OBC

    Use the modified version in this thread and it works at pretty much any point size [noparse]:)[/noparse]

    http://forums.parallax.com/forums/default.aspx?f=25&m=225653

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • BamseBamse Posts: 561
    edited 2008-09-23 03:09
    Sweet, I got the Parallax Font to work in Gedit... wink.gif
    I spend a week setting up VMWare 1.0.6 with Win XP and it seem to work fine for both my Hydra and protoboard with Serial in stead of USB.
    However once there is a nice little Propeller IDE available for Linux I'll ditch the whole VMWare thing...

    I had a quick look at Eclipse and decided that I just don't know enough about it to create my own IDE.
    Sorry to say I'm not much of help there...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
Sign In or Register to comment.