Shop OBEX P1 Docs P2 Docs Learn Events
Raspberry Pi - compiling and downloading to the propeller — Parallax Forums

Raspberry Pi - compiling and downloading to the propeller

Cluso99Cluso99 Posts: 18,069
edited 2012-09-08 10:51 in Propeller 1
I just saw this on hackaday http://hackaday.com/2012/09/07/programming-a-propeller-on-an-arm/

I tried to post the following message but couldn't. Perhaps someone could give this a try. Here is the text I tried to post
<quote>Compiling and downloading to the propeller has been achieved using the Raspberry Pi.
See the Parallax Propeller forums...
http://forums.parallax.com/showthread.php?141392-Raspberry-Pi-For-Propeller-Development
and...
http://forums.parallax.com/showthread.php?141465-PropBerry-Propeller-amp-Raspberry-Pi-combo/page3
</quote>

Now... Those who have done this, could they document it here for those of us about to try it, pretty please ;)

Here are two threads where some R-Pi discussions and the prop have occurred:
http://forums.parallax.com/showthread.php?141469-SimpleIDE-for-Raspberry-Pi-Raspian-update-v0.8.4
http://forums.parallax.com/showthread.php?141465-PropBerry-Propeller-amp-Raspberry-Pi-combo/page3

Preparing the SD card...
Download the Raspian "wheezy" SD image & create SD card (includes instructions for copying the image to the SD card)
http://www.raspberrypi.org/downloads

Comments

  • Heater.Heater. Posts: 21,230
    edited 2012-09-07 18:26
    Cluso,

    That Stefan on Hackaday could not get the propeller loader as included in propgcc and SimpleIDE to work on ARM. I managed to do it with a bit of futzing around so my SimpleIDE package for RASP works just like it would on any x86 Linux box. No Python loader required. No special install scripts required.

    I'll try and polish the install instructions for Raspi but for now we have the following which I have also added to the Simple IDE for Raspberry PI Raspian thread.

    The instructions for installing SimpleIDE for Linux are here:
    https://sites.google.com/site/propellergcc/downloads/linux-downloads

    For Raspi it goes like this:

    Once you have your Raspian "wheezy" up and running and have it connected to the net you can download the SimpleIDE package for Raspberry Pi

    First let's assume you have a TV, keyboard and mouse connected to your Pi.

    Get yourself a graphical (X) session with this command:
    $ startx
    
    Start up a command line terminal window, the should be an icon for a terminal on your desktop.

    Now download the SimpleIDE package. You can do that many ways but I would just use the following command from the command line on the Raspi itself:
    $ wget http://dl.dropbox.com/u/81267937/SimpleIDE-0-8-4.armv6l.raspberrypi-linux.tar.bz2
    
    Of course that link will change over time, best to keep an eye on this pages for updates:
    http://forums.parallax.com/showthread.php?141469-SimpleIDE-for-Raspberry-Pi-Raspian-update-v0.8.4

    Unpack the downloaded file:
    $ tar -jxf SimpleIDE-0-8-4.armv6l.raspberrypi-linux.tar.bz2
    
    Change to the package directory (Created by the above step) and do the following
    $ sudo ./setup.sh   pi
    
    Assuming you are still the default user "pi",change that if not.

    Now you can run simple IDE:
    $ ./simpleide
    
    With this set up you should be able to program the Propeller over a USB serial adapter. But as you are using voth USB ports for keyboard and mouse that's a problem unless you have a USB hub.

    To use the UART on the GPIO header follow the instructions here:
    http://forums.parallax.com/showthread.php?141469-SimpleIDE-for-Raspberry-Pi-Raspian&p=1116618&viewfull=1#post1116618
    and here;
    http://forums.parallax.com/showthread.php?141469-SimpleIDE-for-Raspberry-Pi-Raspian&p=1116619&viewfull=1#post1116619

    Do the second part first.


  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-09-08 00:48
    @heater

    ive been beating around the bush but at some point i wanna get proploader working on my zipit and phone. The phone should be ok as its the same cpu as the pi. but the zipit uses an arm9 not arm11 do u know if the file u linked too were compiled for genaric arm or do they use the cpu specific flags to optimize them for the arm1136. if they were compiled with arch=arm as the only cpu flag i think id be ok to use on a freescale
  • Heater.Heater. Posts: 21,230
    edited 2012-09-08 01:25
    rwgast_logicdesign,

    The SimpleIDE package I put up is compiled for Raspian. Raspian is ARM Debian but entirely built for the RaspberryPi's ARM11, specifically it uses hardware floating point. Normal Debian for ARM uses software floating point. This is a great performance enhancer for things that use floating point. SimpleIDE is built with the Qt graphical user interface libraries which use float a lot.

    As this affects the binary linkage between compiled objects so it is unlikely that Raspian binaries run on regular Debian for ARM. Although I have heard of people actually managing to do that for programs that do not use any float.

    It is possible to build all of this for the Zipit. A while back I had a few Qt based apps running on the Zipit. propgcc the loader and other command line tools should be usable there.

    What I did was to set up an ARM Debian runnng in qemu on my Linix PC and do all the compiling there which is much easier to work with and faster. Then download everything to the Zipit to run.

    Android phones have a native development kit so I guess that will do it there. I have compiled Qt programs for Android using Necessitas http://necessitas.kde.org/
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-09-08 02:12
    @heater

    one of the reasons ive been so lazy about this besides getting wires soildered on to the zipits tiny usb connections is the cross compiling... Does proploader still need bst to compile? if not maybe ill just let the zipit compile it.

    My issue is i use to use the toolchain in the android ndk for everything from kernels to hello world for arm targets. I was using 7 now for some reason the ndk doesnt have binary toolchains it overly complicated. I looked into linario but it seema like that tool chain is only for specific cortex and omap platforms. i went to code sourcery but couldnt figure out what to download there i didnt just see gcc everything hd ides cost money was trial limited or what not. what toolchain are you using? if u tell me code sourcery can u plz provide a direct link to the page? just getting a generic arm toolchain is harder than compiling the prop gcc source lol.

    im not looking to get simple ide working on the zipit i basically just want to build prop loader so i can use homespun or another os spin compiler to compile binarys and then load them with proploader. i may compile gcc too why not... but my main priorety is proploader i already did homespun using gcc on my phone runs fine on the zipit.

    i know some memmbers have zipits im sure theyd appreciate it recompiled this stuff. i understand why everyone loves the pi and i think a pi and a prop working togather has a ton of potential espescially if you wanna to robots with machine vision and stuff, but as far as progrming a prop a zipit seems like a better choice you got a screen and kb in the palm of your hand. if ur always on the go or if u service props in the feild a zipit could be really usefull. sry i just realized im hi jacking clusso here
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-09-08 02:15
    oh Smile i just realized ur compiling in a qemu image so bst cant be an issue now but idk qemu, could do super slow on my phone
  • Heater.Heater. Posts: 21,230
    edited 2012-09-08 03:30
    Currently buiding the loader requires BST to compile some PASM external memory driver and such.
    I get around this by building propgcc on my x86 PC and then copying the reqired .dat and .binary files to the right place on the Pi when the build there complains about not having BST.

    Turns out that the spin to C++ translator, which can be built on the Pi, can also produce the reqired DAT files from Spin sources so I might try to take that into use.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-09-08 04:33
    hmmm if your intrested i bookmarked a thread where jazzed posted a bst work around. im not sure exactly what the methodology was to get prop loader built ie using homespun or another pasm assembler or some other technique like yours.

    so im not understamding when u compile on qemu and put these dat files where they need to go doesnt make still call bst and fail? it almost seems like using a cross compiler would be faster and easier! i rember it wasnt fun getting the toolchain running (ie why im dragin my feet) but it wasnt hard one i installed it my biggest problems were setting up all system vars and stuff so make could find the compiler, this was only a pita cuz nothing mentioned it and i couldnt figure out why make was failing.

    i really think propgcc should use an open source pasm assembler i mean if maybe someone wants to compile prop gcc on mips lol. i wonder what kind of effort it would take to replace bst
  • Heater.Heater. Posts: 21,230
    edited 2012-09-08 05:01
    No, no, I build a regular x86 propgcc and loader and spin compiler etc on my x86 PC under Linux. That creates the .dat amd .binary files needed. Those files then get copied to the Raspi when I want to build the loader there.

    If you have a link to Jazzed's work around please tell.

    We already have an opensource PASM assembler in the spin program, included in my SimpleIDE package. Ultimately that should be used to compile the Spin modules and dump out the assembled DAT section. However it does not have that option yet.

    I believe HomeSpun can also do that job but I have yet to get into installing mono on my Pi to run it. I believe there were some issues getting mono to work nicely on Raspian.

    So there is still the posibility of using the spin to c++ translator to create those dats on Raspian.

    Rant: How come it is all these "write once and run anywhere" systems that have such trouble actually running anywhere?
    When it comes to porting code to Raspian the problem areas are : Java, Mono, and JavaScript (node.js) Everything else just works but they are only just starting to get functional and stable.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-09-08 10:51
    sorry didnt really have time to read through this again and figure out exactly what was going the meat of the bst workaround is here i belive

    http://forums.parallax.com/showthread.php?141392-Raspberry-Pi-For-Propeller-Development/page2

    you may wanna read the previous too, to figure out whats goin on
Sign In or Register to comment.