Shop OBEX P1 Docs P2 Docs Learn Events
RaspI setup for Prop - Page 3 — Parallax Forums

RaspI setup for Prop

13»

Comments

  • Heater.Heater. Posts: 21,230
    edited 2015-03-18 10:28
    A few weeks back the Sublime author announced that he had too much to do and would like some help. Perhaps a Raspi port might not be so high on his agenda.

    But hey, I paid for a licence so why not?....
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 10:45
    You mention performance a number of times...

    You're absolutely right about the slow SD card of course, but don't forget that the Raspberry Pi 2 is out and it is MUCH faster. The extra RAM. The multi-core CPU. The new ARM architecture. It all makes a huge difference. I mentioned in another thread, I can even run JetBrain's IDEs like PyCharm and IDEA! They take a while to start up (again, darned SD card) but once up they're quite usable! Even if you just bought your Raspberry Pi an hour ago, I'd say go find a 2 and buy another. It's worth it.

    --Edit--
    I don't mean this as another push "look how awesome JetBrains is", but just an example of the performance increase between the 1 and 2.
  • Heater.Heater. Posts: 21,230
    edited 2015-03-18 10:50
    What is this jetbrains thing?

    How is it better than vim; qmake; make ?
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 10:59
    Heater. wrote: »
    What is this jetbrains thing?

    How is it better than vim; qmake; make ?

    I'm gonna not hijack this thread, and simply leave this for casual perusal.
  • potatoheadpotatohead Posts: 10,261
    edited 2015-03-18 11:03
    The 2 is what I have, running the plain vanilla, standard settings, which are conservative. All the speed stuff will come a bit later. Need to do some stuff first, and that's the critical path.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 11:08
    potatohead wrote: »
    The 2 is what I have

    Oh wow... I wonder if I would have had the same reaction (regarding speed) if I'd tried the 2 without trying the 1 first. Well... glad you got the 2 :D
  • mindrobotsmindrobots Posts: 6,506
    edited 2015-03-18 11:20
    I thought I had read someplace (Raspi forums, maybe) that people were finding the Class-10 SD cards actually slower on the Pi because those cards are optimized for large block read/write speed (photos and videos) while the Class-4 (Class-6?) cards were actually better structured for the small block, non-contiguous I/O an OS tends to do. I'll have to go searching for that.

    You can always move everything to a USB connected HDD for size and speed increases - boot from SD and then run from USB device! Easy-peasy upgrade but harder to find a nice enclosure for.
  • potatoheadpotatohead Posts: 10,261
    edited 2015-03-18 11:22
    I'm not unhappy at all. If it comes across that way, oh well. It's a great little computer! :)

    The overall speed of the 1 is why I didn't bother with a Pi until recently. But, that's just me and my desired use case too. I either wanted a little dev system, or nothing. I don't intend on doing too much with the Pi as an embedded device right now. It's a console, IDE, comms for other things.

    (though I may do some video related hacking on it, once I find my way around some)

    That use case is why I'm not too worried about filesystem I/O throughput either. It's fine now. I will clock it up to the expected 900Mhz at some point though. I do wonder about SD card life... I got a cheap o card. Better not stay on that.

    I find the 2 quick enough to just work on like I would my other Propeller environments. The 1 just wasn't there. Probably will make a nice case, get power and a few other nice things all sorted and call it good. If it gets damaged, pull it, insert another one, go!

    A friend has one of those pass through, "charge it while using it" batteries. Deffo going to connect one of those so the thing isn't subject to a power supply glitch. Can unplug it, move it around, etc... just like a laptop.

    When I compare it to older Linux stations I've build up, it's pretty sweet! It's 1/3 to 1/2 the speed of my Note 4 phone at first glance. Overall feel is about the same as my older T60P laptop for many things. For $30? Total deal. Count me as a fan. :) BTW, that laptop is running about a Ghz or so, Core 2 Duo. It's clocked down to avoid using the fan, which is crappy. Works just fine for doing this stuff. So will the 2.

    I like the lean nature of it the most. Nice, clean OS with sane package management. Love it.

    For an enclosure, I will probably just make something and mount the Pi on standoffs. Put it, power, battery pass through, optional disks, hub, etc... on a stiff plastic board, lock it all down, enclose, done. The enclosure might just be cardboard. No joke. Open the lid, power it up, go. No worries. Time to move? Power down, stuff it all in the box, go. That's what I prefer as I can take it somewhere, do something and keep hassles low.
  • Heater.Heater. Posts: 21,230
    edited 2015-03-18 11:34
    SwimDude0614

    I don't want to hijack the thread either. But yes, when I program with Qt I use qtcreator. What is the selling point of JetBrains? As opposed to Eclipse or whatever?
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 11:54
    Heater. wrote: »
    What is the selling point of JetBrains? As opposed to Eclipse or whatever?

    I find Eclipse to be riddled with bugs and lacking in features. It has all the basics, and even a lot of the advanced features - but they don't always work or have poor UIs. The version control integration in Eclipse is just sad and unintuitive (none of my co-workers understand what they're doing with SVN in Eclipse, so they just don't use it for anything other than committing - no checking diffs, no multi-changelists, no checking history). When it comes to C/C++, I use it because A) it uses CMake as it's project file, so builds match what you type at the command line exactly and B) it's made by JetBrains, so I'm counting on it getting monstrously better as they implement more features. CLion hasn't even hit release 1.0 yet and it's already as good as Eclipse's CDT in terms of C-specific features (add on top of that the IntelliJ framework and CLion is much better). For Java... there's no comparison. True Spring support (actually, the Spring support in Eclipse is so bad that even the Community Edition of IDEA - which doesn't "support" spring - can do almost everything that Eclipse does), Hibernate support. Maven support that actually works. All the JetBrains IDEs are filled with helpful inspections - hundreds if not thousands of them - anything from catching possible NullPointerException to catching a mispelled string literal that is supposed to reference a database column. CLion's inspections are actually pretty annoying for embedded systems.... I had to turn many of them off.

    Language injection
    Oh yes. Language injection. Yes please. All of that.

    And then of course there are preferential things. I like the dark theme, it's fun. I like the layout a lot. The whole idea of perspectives is great if you've never seen an IDE before, but quite sad if you've ever used an IDE without them (Eclipse is the only one I know with Perspectives, and I find them quite annoying).
  • ratronicratronic Posts: 1,451
    edited 2015-03-18 12:18
    potatohead wrote: »
    I will clock it up to the expected 900Mhz at some point though.

    I've been running a Python program using Opencv for about 5 hours so far and the clock is set to 1Ghz. It is showing 6 of 600x400 video screens of the Pi video camara.

    My room temp is 23C and the hottest the chip is showing is 59C. It has an on-demand speed governor that runs @ 600Mhz when idle and 1Ghz when the processor(s) is

    under load. I use the Pi2 1000MHZ clock setting.
  • Heater.Heater. Posts: 21,230
    edited 2015-03-18 12:25
    What is it with this overclocking idea?

    Are you really going to notice a 10% performance boost in normal usage?

    OK, if it tips performance over from not being able to play a video to being able to play it, or whatever, then maybe it's desirable.

    Otherwise I don't get the idea.
  • potatoheadpotatohead Posts: 10,261
    edited 2015-03-18 12:26
    A "Perspective" is simply a modal configuration of the various views, window positions, etc... within the IDE.

    One can ignore them safely enough. However, if the idea is adopted, then it's possible to define a few of them and very rapidly change contexts.

    Some high end PLM software I use and support has perspectives in it, and like anything else, there are some nice gains to be had, but also some costs to pay.

    Just FYI.

    @Heater: Most of the time no. That's why I was in no particular hurry. From what I read, most all the devices and use cases run fine at 900Mhz. So I'll do that at some point. It will matter on a video actually. The default speed is just a shade beneath what is required. Most other things? Pffft! Won't matter.
  • ratronicratronic Posts: 1,451
    edited 2015-03-18 12:40
    Heater. wrote: »
    What is it with this overclocking idea?

    I have finally figured out how to put the processor speed and chip temperature on the task bar. So this morning I turned up the speed to see how hot the chip got. The governor

    limits the speed when it reaches 85C (unless you are a crazy overclocker). So 59C running @ 1Ghz processing video I think I will leave it like this for a time to see if I run

    into any other problems.
  • koehlerkoehler Posts: 598
    edited 2015-03-18 12:47
    potatohead wrote: »
    That is the first thing, and the second thing I tried. There is something odd going on, and I'm quite sure it's all about the dd command likely being old, or different somehow. Yes, I will come back to this, but given it took an hour to attempt (which it should not), I punted.

    Hmm, if anyone else has a similar issue I'd suggest running a LiveCD or LiveUSB and go from there.
  • potatoheadpotatohead Posts: 10,261
    edited 2015-03-18 12:58
    I know that will work.

    What I will do is just figure out the oddity in OS X.
  • mindrobotsmindrobots Posts: 6,506
    edited 2015-03-18 13:19
    potatohead wrote: »
    I know that will work.

    What I will do is just figure out the oddity in OS X.

    Potatohead,

    I picked up the BASH script some place and use it on my Mac - it makes creating bootable SD or USB thumb drives, painless and brainless - my two criteria for a good day!
    #!/bin/bash
    
    # Raspberry PI Install Script
    # Author: Ray Viljoen
    
    # Quit on error
    set -e
    
    _piline="------------------------------------------------------------------------------------"
    
    # Display colorized information output
    function _info() {
        COLOR='\033[00;32m' # green
        RESET='\033[00;00m' # white
        echo -e "${COLOR}${@}${RESET}"
    }
     
    # Display colorized warning output
    function _warn() {
        COLOR='\033[00;31m' # red
        RESET='\033[00;00m' # white
        echo -e "${COLOR}${@}${RESET}"
    }
    
    _info '
    __________.___  .___                 __         .__  .__                
    \______   \   | |   | ____   _______/  |______  |  | |  |   ___________ 
     |     ___/   | |   |/    \ /  ___/\   __\__  \ |  | |  | _/ __ \_  __ \
     |    |   |   | |   |   |  \\___ \  |  |  / __ \|  |_|  |_\  ___/|  | \/
     |____|   |___| |___|___|  /____  > |__| (____  /____/____/\___  >__|   
                             \/     \/            \/               \/       
    '
    
    
    # Set $1 as image path
    DISTRO="$1"
    
    # Check image path is set else exit
    if [ -z "$DISTRO" ]; then
        _warn $_piline
        _warn "ERR: No image path supplied"
        _warn $_piline
        exit 0
    fi
    
    
    
    # Selected disk
    _udisk=""
    
    function promptDisk() {
    
        # ================================================
        # Check connected disks and save paths to array
        # ================================================
    
        # Counter
        i=0
    
        echo $_piline
    
        # Loop over df -lh
        while read line; do
    
            # Print with local mount only and add counter to select disk
            if [ "$i" -gt 0 ]; then
                echo "$i) $line"
                # Asign first work (path) to array with corresponding counter
                _mount[i]=$( echo $line | awk '{print $1;}')
            else
                _info "   $line"
                echo $_piline
            fi
    
            # Increment counter
            ((i++))
    
        done <<< "$(df -h)"
        echo -e "$_piline\n"
    
        _opts=''
        for i in "${!_mount[@]}"; do
            [ -z "$_opts" ] && _opts="${_opts}${i}" || _opts="${_opts}, ${i}"
        done
    
        # Ask user to select mounted disk
        echo "Select the disk to use by enetering the disk number."
        _warn "*** MAKE SURE YOU SELECT THE CORRECT DISK ***"
        _warn "*** Refer to the Readme if uncertain ***"
        echo -n -e "\nUse disk [ $_opts ] #"
        read ans
    
        # Set selected disk
        _udisk=${_mount[$ans]}
    
        # Test if valid disk selected
        if [ -z "$_udisk" ]; then
            _warn "\n ======= Invalid selection ======= \n"
            promptDisk
        fi
    }
    
    # Run prompt
    promptDisk
    
    # ===========================================================
    # Past this point a valid disk has been selected, so proceed.
    # ===========================================================
    
    # Format disk name to raw format
    _rawdisk=$( echo $_udisk | awk 'sub("..$", "")' | sed 's/disk/rdisk/')
    
    # Unmount Disk
    echo "Unmounting Disk"
    diskutil unmount $_udisk
    
    echo "Writing image"
    echo "Ctrl+T to see progress.."
    sudo dd bs=1m if=${DISTRO} of=${_rawdisk}
    
    # Eject disk
    echo "Ejecting Disk"
    diskutil eject ${_rawdisk}
    

    I just have it in a file named "install" in the same directory as all my .iso images.

    All you need to do is:
    $ ./install my_favorite.iso

    and it enumerates ALL you storage devices giving each one a number, you enter the number you want, it warns you that if you picked the WRONG number, you really just screwed up your system if you proceed and then it does the unmount and the DD and an eject using all the proper names. I use it for RasPi SD cards or live boot USB's for Linux or whatever. Like I said, painless and brainless!!

    I don't know what kind of Mac you have but my Mac Mini was first having problems with a sticky write protect switch and it was seeing every SD card as read-only - a known problem with Mac Minis. After that, it was just having a terrible time writing anything to its internal SD slot. Now, I have a external multi-card reader/writer in one of the USB ports and it's all good.
  • dgatelydgately Posts: 1,630
    edited 2015-03-18 16:09
    Heater. wrote: »
    If you are working from a Mac you don't need any SD card fromating tool. Just use the dd command. You have to make sure the SD is not mounted first though and there is some special OSX magic command to so that which I forget now.

    The easiest program for setting up a RaspberryPi SD card (as well as for archiving them) is ApplePi-Baker, which you can download from: http://www.tweaking4all.com/hardware/raspberry-pi/macosx-apple-pi-baker/



    dgately
  • prof_brainoprof_braino Posts: 4,313
    edited 2015-03-18 16:14
    I haven't followed the instructions in a long time

    This is why I ask. A developer getting it to work does not ensure a novice getting it to work.

    The data suggests we can be confident the Raspberry Pi part is very stable, and any user that follows the instructions and uses the defaults will get exactly the same result as anyone else, including correct IP address, time zone, and language.
    This is a very open question, are you asking about a SimpleIDE install for the Raspi?

    The question is about the Prop tool chain, does following the instructions give a successful install? This should be a Yes/No answer. The goal is a default tool set that allows prgramming the Prop from linux, I believe this means debian wheezy. And I'm going to clarify that the target is USB serial, so prop plug or quickstart.

    If closely following the instructions, and using defaults, results in working tools, the answer can be yes. If steps are incomplete or require non obvious knowledge, the answer could be no. Last time I tried installing SimpleIDE and Propeller IDE, I did not end up with a working prop tool chain.

    Rick's post #4 lists
    * prop-gcc
    * Openspin
    * PropellerIDE
    * SimpleIDE
    * the library of Spin goodies that ships with the Propeller tool (I don't think SimpleIDE includes that)

    Rick's post #12 "install QT5" Do we need QT5?

    dgately's post #14 includes additional steps for propeller-ide. Are these from the "offical" repositories?

    I'm just wondering is the Prop tool chain for RPi/Linux is ready for prime time.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 16:28
    Re: PropGCC on raspberry pi

    I'm working on getting up-to-date and stable builds of PropGCC for raspberry pi via a continuous integration server, but have hit errors with ncurses. perhaps the friendly folks in this thread can check out the thread and provide insight (he says, crossing his fingers)
    http://forums.parallax.com/showthread.php/160431-propgcc-on-github?p=1321510#post1321510
  • mindrobotsmindrobots Posts: 6,506
    edited 2015-03-18 16:52
    PB,

    Steps 12 and 14 on top of an already running and configured Raspi should get you there with th current tools. Something happened along the road that led to my thread #17.

    I'm building another tomorrow for Propeller work, so I will try and recreate success with #12 and #14. I'lI play dumber than usual so it's a valid test!!
  • dgatelydgately Posts: 1,630
    edited 2015-03-18 22:18
    This is why I ask. A developer getting it to work does not ensure a novice getting it to work.

    dgately's post #14 includes additional steps for propeller-ide. Are these from the "offical" repositories?

    Not sure what you mean by "official"... The PropellerIDE was downloaded as a Debian package from Breatt's GitHub repository (so, I guess that's official). apt-get install of libftdi1 & libGLESv* gives the current versions of those libraries (I guess you could install libftdi* to be more certain that you have the latest FTDI driver).


    dgately
  • mindrobotsmindrobots Posts: 6,506
    edited 2015-03-20 09:57
    PB,

    Sorry this took so long, it was completed over several interrupted sessions. I generally don't get much more than 20-30 minutes of uninterrupted time :(

    I started with a FRESH installation of the latest Raspbian (2015-02-16-raspbian-wheezy). Did the raspi-config stuff and whatever setup was needed to get it talking to my network and then followed these instructions:
    A) install Qt5.
    
    1) edit /etc/apt/sources.list so it contains: (sudo nano /etc/apt/sources.list)
    
    deb http://twolife.be/raspbian/ wheezy main backports
    deb-src http://twolife.be/raspbian/ wheezy main backports
    
    2) $ sudo apt-get update
    3) $ sudo apt-get upgrade
    (answer 'y' to the "install packages without verification message")
    
    4) $ sudo apt-get install libqt5-*
    (answer 'y' to the "install packages without verification" message)
    This install takes a while..........
    
    B) follow the SimpleIDE installation instructions from here learn.parallax.com http://learn.parallax.com/propeller-...de/raspberrypi
    
    -or-
    1) get the SimpleIDE package:
       $ wget https://googledrive.com/host/0B8ruEl5BL0dfZzZfdHRiX2pYNm8/SimpleIDE_0-9-45_armv6l-RaspberryPi-Linux.tar.bz2
    
    2) unzip it:
       $ bunzip2 -vv SimpleIDE_0-9-45_armv6l-RaspberryPi-Linux.tar.bz2
    
    3) extract everything from the .tar file:
       $ tar -xvf SimpleIDE_0-9-45_armv6l-RaspberryPi-Linux.tar
    
    4) $ cd SimpleIDE-0-9-45
    5) $ sudo ./setup.sh install
    
    At this point, you should have a working SimpleIDE installation. Type simpleide on the command line and it will start up the IDE.
    
    C) If you want to install PropellerIDE so you can program in Spin/PASM
    
    0) install dependencies:
      $ sudo apt-get install -y libftdi1
      $ sudo apt-get install -y libGLESv*
    
    1) go to www.lamestation.com/propelleride
    
    2) get the PropellerIDE install file either with the link on that page or copy the link and use wget (the file name will change wtih newer versions):
       $ wget https://github.com/parallaxinc/PropellerIDE/releases/download/0.25.0/propelleride-0.25.0-0-g6710db9-armhf.deb
    
    3) install PropellerIDE (the file name should be the file you just downloaded):
       $ sudo dpkg -i propelleride-0.25.0-0-g6710db9-armhf.deb  
    
    At this point, you now have a working PropellerIDE installation. Type propelleride on the command line and it will start up the IDE.
    
    You can now remove the installation files from your directory:
    
    propelleride-0.25.0-0-g6710db9-armhf.deb
    SimpleIDE_0-9-45_armv6l-RaspberryPi-Linux.tar
    SimpleIDE-0-9-45
    
    and it should not impact anything and saves precious space on your SD card. 
    
    

    If someone can follow basic instructions and has some basic clues about navigating their way around a computer, it is brainless and painless.

    This will let you work with Propeller boards connected via the USB ports. The loaders in these packages do not support devices connected to /dev/ttyAMA0 in my experience.

    The only drawback I see to making this "ready for prime time" is that it would REALLY, REALLY be nice to have a Parallax supported place to get the library and example files for Spin that come with the Windows Propeller Tool. Other than missing that very nice set of files, this gives you a completely usable Propeller development environment on a $35 Raspberry Pi.

    I actually did this on a model B (wow, how quickly you start missing those 4 cores and 4 USB ports).

    If your students are using a model B, you will definitely need to add a powered USB hub to your list of supplies. I would recommend a powered USB hub anytime you are using a development board with the Raspi it really eliminates the potential for strange, unexplainable errors due to power issues.

    EDIT: I was happily mistaken!! The standard Spin library is now out on GitHub here. and the Spin docs are here. All setup, ready for public consumption. Just clone them to your RasPi or download the .zip and unzip them. Cool! Thanks, Parallax!!!
  • potatoheadpotatohead Posts: 10,261
    edited 2015-03-20 10:05
    That is basically what I did for PropellerIDE, and what I plan to do for SimpleIDE.
Sign In or Register to comment.