Shop OBEX P1 Docs P2 Docs Learn Events
propgcc builds on Raspberry Pi !! — Parallax Forums

propgcc builds on Raspberry Pi !!

Heater.Heater. Posts: 21,230
edited 2012-07-24 19:00 in Propeller 1
Yay, propgcc compiles flawlessly on the Raspberry PI running Raspian!!

Notes:

1) Make sure you have space. I used an 8GB SD card on the Pi, building propgcc pushed used space to 4.5 GB

2) Install some needed packages:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install mercurial
$ sudo apt-get install texinfo
$ sudo apt-get install bison
$ sudo apt-get install flex

3) Get a copy of the propgcc sources:
$ hg clone https://code.google.com/p/propgcc/
This step has caused people a lot of grief as it tends to fail a lot. I just kept trying until it worked.

4) Make a the directory into which propgcc will install and make sure your user, "pi" in this case, has access to it:
$ sudo mkdir /opt/parallax
$ sudo chown pi:pi  /opt/parallax/

5) Change to the propgcc directory and set of the build set off the build:
$  cd propgcc
$ ./rebuild.sh
Now this takes a long time....I started about 2.00pm on Friday and it the last binary was installed in /opt/parallax/bin at about 10.00pm that night. So about 8 hours. It fails on trying to build the propeller loader but never mind.

6) Test the compiler:
$ cd propgcc/demos/fft/
$ export PATH=$PATH/opt/parallax/bin/
$make
propeller-elf-gcc -mlmm -O2 -mfcache -o fft_bench.o -c fft_bench.c
propeller-elf-gcc -mlmm -fno-exceptions -fno-rtti -o fft_bench.elf fft_bench.o 

All seems to be OK.

Except the loader does not build because it depends on BSTC which we do not have for ARM. I believe someone has worked around that over the week end, let me see...

Comments

  • jazzedjazzed Posts: 11,803
    edited 2012-07-23 10:55
    Heater. wrote: »
    Except the loader does not build because it depends on BSTC which we do not have for ARM. I believe someone has worked around that over the week end, let me see...

    Heater I looked into using Roy's "spin -c" today for the loader. It complains about not being able to find the cache_interface.spin file. I'll be adding an issue to track that.
  • Heater.Heater. Posts: 21,230
    edited 2012-07-23 13:14
    Are you saying there is no way to load an elf into a Prop from ARM at the moment? I just got a serial adapter hooked up to the raspi.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-07-23 13:31
    I thought there was a thread yesterday about building propeller-load and it ended up working by the end of the day. I just can't find the thread now. Maybe it was just a dream.

    Here Magl02 did it! (with Steve's help)
  • jazzedjazzed Posts: 11,803
    edited 2012-07-23 13:48
    Heater. wrote: »
    Are you saying there is no way to load an elf into a Prop from ARM at the moment? I just got a serial adapter hooked up to the raspi.

    We never qualified Roy's SPIN program with Propeller GCC.

    It may be possible to copy the .dat files from another build to the loader to short-circuit make.
    The .dat files are propeller specific, not O/S specific.

    @Rick, The other loader is just for a spin binary, not for an elf.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-07-23 13:53
    Oops! My bad! Darn progressive lenses!
  • jazzedjazzed Posts: 11,803
    edited 2012-07-23 18:39
    mindrobots wrote: »
    ... Darn progressive lenses!
    Ya, only a few ways possible to see anything. Near, far, in-between, or not at all ... with a stiff neck.
  • Heater.Heater. Posts: 21,230
    edited 2012-07-24 08:22
    BINGO,

    Every time the prop loader's Make file complained about the lack of a .dat file I just "touched" the missing file into existence.
    Then the loader builds and I "make install" it.
    Then I copy the *.dat files from the /opt/parallax/propeller-load directory from my PC build.

    Now I have a working loader, at least it loads LMM Hello World into my Gadget Ganster SRAM card as LMM.

    So, the compiler works and SimpleIDE works and the loader works on the Pi under Raspian.

    If anyone is interested in these binaries I can upload them somewhere, but where? And should I do anything to special package them or just zip up or tar /opt/parallax and the SimpleIDE binary?
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-07-24 09:12
    It's all too exciting!!

    I just checked on my UPS package and it's out for delivery. I'm about 4 hours away from Pi!!

    Time to create a Raspbian distro micro-SD, then some lunch, then 2 hours or so away!!
  • icepuckicepuck Posts: 466
    edited 2012-07-24 10:22
    Heater. wrote: »
    If anyone is interested in these binaries I can upload them somewhere.

    I'd be interested. I've been trying to do the same but I'm not having much luck getting it to work.
    I'm running Debian squeeze on my Pi.
    -dan
  • jazzedjazzed Posts: 11,803
    edited 2012-07-24 10:24
    Heater. wrote: »
    If anyone is interested in these binaries I can upload them somewhere, but where? And should I do anything to special package them or just zip up or tar /opt/parallax and the SimpleIDE binary?

    Guess you missed my email. You have permission to upload here: http://code.google.com/p/propside/downloads/list

    Please try to use the release script if possible so that numbering, LD_LIBRARY_PATH setup, and other packaging, etc... happen automatically. Make sure the title has RPi or equivalent in it and give a short description.

    Thanks,
    --Steve
  • Heater.Heater. Posts: 21,230
    edited 2012-07-24 11:21
    icepuk,
    Beware that I have built all this on Rasbian. It is almost certain it does not work on the regular Debian for raspi.
  • icepuckicepuck Posts: 466
    edited 2012-07-24 16:35
    Heater. wrote: »
    Beware that I have built all this on Rasbian. It is almost certain it does not work on the regular Debian for raspi.

    OK, so that means I'd have to compile everything on my Pi/Debian setup in order for it to work.
    -dan
  • Heater.Heater. Posts: 21,230
    edited 2012-07-24 19:00
    Or get another SD card and put Raspian on it.
    Raspian is going to be standard for the PI soon, if it is not already.
Sign In or Register to comment.