Propeller Development in Linux: A short guide
Spork Frog
Posts: 212
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:
Edit your SPIN code in your favorite text editor.
Then, through a command line, run the following:
If all goes well, you should now have a happily programmed Prop!
Post Edited (Spork Frog) : 8/2/2008 9:14:44 PM GMT
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
This is definitely excellent! Congrats everyone, and thanks Parallax.
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
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller P8X32 USB Board
What Spork Frog has described does work for any Linux or MacOS that supports running Windows software under Wine.
@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
I have tried to run this, but loader.py refuses to download the .binary to the target.
The error message is:
I also note that ./loader.py --version does not return the version as indictated by the help.
Thanks,
Bernie
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
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.
The magic: s7000257-t.jpg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki Rocks! - propeller.wikispaces.com
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
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
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
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.
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...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
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!
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...
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
Ron
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...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
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!
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
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!
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