Propeller on Raspberry Pi :-: Soup to nuts...
Oldbitcollector (Jeff)
Posts: 8,091
Thanks to Rick, Dennis, Jazzed, Roy, and Heater I'm making good headway on getting the Propeller to be friendly with the Raspberry Pi.
I thought I'd bring the bits and pieces into a single thread for others to follow along, as some of the resources in other threads assumed one has more knowledge of Linux/Raspberry Pi than others.
Here's what is working here [so far] -- I'll update this as we refine the process even more.
Testing Hardware Configuration Used: A Raspberry Pi (Model with a Parallax Quickstart plugged into the top USB port.
Testing Software Configuration; Raspbian NOOBS Install V1.3.2 with single adjustment to config.txt to overclock at 950mhz.
OpenSpin (Obtain and compile)
Finally, run the binary with the following...
There's probably a good linux admin reason not to do this, but it's handy anyway...
Propeller-load (Obtain and unzip - Tested with GPIO UART & USB connections) Thanks Heater
Note: (If using propeller-load with the GPIO UART)
First, following the instructions at this link for disabling console's use of the GPIO pins.
For use with the Raspberry Pi's GPIO pins, connect the Propeller to Raspberry Pi's RX,TX, and GPIO as indicated by the attached graphic.
Propeller Version 1 on /dev/ttyAMA0
Downloading 52 bytes of 'test.binary'
Loading test.binary to hub memory
52 bytes sent
Verifying RAM ... OK
There's probably a good linux admin reason not to do this, but it's handy anyway...
Alternatively, propeller-load can be used to upload to /dev/ttyUSBx as well. Use dmesg to determine the attached port after plugging in the Propeller.
SimpleIDE (Obtain and install) Updated 11/8/13 - Thanks to Heater
Note: You'll need to have at least 1GB of free space to extract and install this.
Once finished compiling, startx and ./SimpleIDE from SimpleIDE-0-9-43
Still having trouble with propeller-load included in this package.
.....To be continued...
Referenced threads:
Heater's thread on SimpleIDE: http://forums.parallax.com/showthread.php/150441-SimpIeIDE-for-Debian-%28x86%29-and-Raspbian-%28Raspberry-Pi%29
Mindrobots thread on OpenSpin: http://forums.parallax.com/showthread.php/151162-OpenSpin-build-on-Raspberry-Pi-Errors-BOOM
Question regarding Open Source propeller tools: http://forums.parallax.com/showthread.php/150777-Question-regarding-Open-Source-propeller-tools.
Thread with Heater's fixed propeller-load: http://forums.parallax.com/showthread.php/141469-SimpleIDE-for-Raspberry-Pi-Raspian/page2
I thought I'd bring the bits and pieces into a single thread for others to follow along, as some of the resources in other threads assumed one has more knowledge of Linux/Raspberry Pi than others.
Here's what is working here [so far] -- I'll update this as we refine the process even more.
Testing Hardware Configuration Used: A Raspberry Pi (Model with a Parallax Quickstart plugged into the top USB port.
Testing Software Configuration; Raspbian NOOBS Install V1.3.2 with single adjustment to config.txt to overclock at 950mhz.
OpenSpin (Obtain and compile)
$ wget -r http://open-source-spin-compiler.googlecode.com/svn/ $ cd open-source-spin-compiler.googlecode.com $ cd svn $ make clean $ make all
Finally, run the binary with the following...
$ ./openspin
There's probably a good linux admin reason not to do this, but it's handy anyway...
$ sudo cp openspin /usr/bin
Propeller-load (Obtain and unzip - Tested with GPIO UART & USB connections) Thanks Heater
Note: (If using propeller-load with the GPIO UART)
First, following the instructions at this link for disabling console's use of the GPIO pins.
For use with the Raspberry Pi's GPIO pins, connect the Propeller to Raspberry Pi's RX,TX, and GPIO as indicated by the attached graphic.
$ wget http://www.orrtech.us/propeller-load-rpi-3.zip $ unzip propeller-load-rpi-3.zip
$ ./propeller-load -p /dev/ttyAMA0 <filename.binary> -r
Propeller Version 1 on /dev/ttyAMA0
Downloading 52 bytes of 'test.binary'
Loading test.binary to hub memory
52 bytes sent
Verifying RAM ... OK
There's probably a good linux admin reason not to do this, but it's handy anyway...
$ sudo cp propeller-load /usr/bin
Alternatively, propeller-load can be used to upload to /dev/ttyUSBx as well. Use dmesg to determine the attached port after plugging in the Propeller.
SimpleIDE (Obtain and install) Updated 11/8/13 - Thanks to Heater
Note: You'll need to have at least 1GB of free space to extract and install this.
$ wget https://dl.dropboxusercontent.com/u/81267937/SimpleIDE-0-9-43.armv6l.raspberrypi-linux.tar.bz2 $ bunzip2 SimpleIDE-0-9-43.armv6l.raspberrypi-linux.tar.bz2 $ tar -xvf SimpleIDE-0-9-43.armv6l.raspberrypi-linux.tar $ cd SimpleIDE-0-9-43 $ sudo ./setup.sh $USER
Once finished compiling, startx and ./SimpleIDE from SimpleIDE-0-9-43
Still having trouble with propeller-load included in this package.
.....To be continued...
Referenced threads:
Heater's thread on SimpleIDE: http://forums.parallax.com/showthread.php/150441-SimpIeIDE-for-Debian-%28x86%29-and-Raspbian-%28Raspberry-Pi%29
Mindrobots thread on OpenSpin: http://forums.parallax.com/showthread.php/151162-OpenSpin-build-on-Raspberry-Pi-Errors-BOOM
Question regarding Open Source propeller tools: http://forums.parallax.com/showthread.php/150777-Question-regarding-Open-Source-propeller-tools.
Thread with Heater's fixed propeller-load: http://forums.parallax.com/showthread.php/141469-SimpleIDE-for-Raspberry-Pi-Raspian/page2
Comments
Thank you Dennis for showing a great example of this in the mutated iPad thread....
1) Install WebIDE using these instructions on adafruit.com
2) Once logged in, go to my-web-projects in WebIDE.
3) Click on terminal and do the following..
4) Refresh the my-web-projects list.
5) Add the following lines to proploader.py
6) Add the following code to test.spin
7) Click on proploader.py file and click on Run. -Enjoy!
eg Flash.Ram to compile and Flash.Ram to run and maybe some example times ?
I'm using a Raspberry Pi B with standard NOOBS Rasbian install. The only configuration change I've made to mine is to push it to 950mhz.
Added a note about the compile time on the SimpeIDE.
Unfortunately, I expect you will hit a few bumps along the way.
1) The latest SimpleIDE is on the "spinside" branch. I.E. to get the current code use $ hg update spinside
2) Some of the build procedures may need updating.
Actually, I'm posted the "exact" methods that are working here tonight. I'll test with the new "spinside" branch and edit.. Thanks!
Jeff
oops message too short. potatohead, help me out here...
You ROCK DUDE!
Enough toys to keep everyone happy for tonight. I'll start working on my Python module idea more tommorow.
I've spent the last couple weeks getting from newbie to semi-dangrous level in Python. I *think* I'm ready to put what I've learned into practice.
I've tried to list every resource and contributor's name in the top of the messages. If I've missed someone, please let me know!
Jeff
So I'm still fooling with the method of uploading code from the Raspberry Pi to the Propeller using the GPIO UART pins...
I have unhooked the Quickstart board from my USB port and have it connected to Raspberry Pi's GPIO using Gnd, 3.3v, TX, and RX pins.
I *thought* if I recalled correctly, it would be possible to hit the reset switch on the Quickstart in time with the data transmittion from propeller-load.
While I'm making some sort of connection, it isn't working as I previously thought. Time to tie in some control to the RES pin?
If you are attempting this, you'll need to disable the console's use of /dev/ttyAMA0 first.
Edit: (A few minutes later...)
I'm getting a little closer: Tied GPIO 7 to RES and using this Python program..
Please use GPIO #17 to reset the Prop, that is what Heater was using for his modified propeller_load, and #7 is one of the two SPI chip selects on the Pi.
Thanks for documenting this for people; I got SimpleIDE, PropGCC, OpenSpin etc running on one of my pies a few weeks ago, but other work took me away from it before I got the Prop on the connected RoboProp programmed by the Pie connected to it ... I plan on getting back to this ASAP.
Keff
Jeff