Shop OBEX P1 Docs P2 Docs Learn Events
What program is needed to program propeller using Raspberry Pi? — Parallax Forums

What program is needed to program propeller using Raspberry Pi?

Don MDon M Posts: 1,652
edited 2021-02-28 14:29 in Propeller 1

I want to set up a test jig to program some boards. I will already have made the binary or eeprom file. Just want to be able to upload it to the Prop using a Raspberry Pi with usb cable to Prop Plug. Trying to make a simple setup using Raspberry Pi with their 7" touch screen. Thanks.

Comments

  • You would need to use PropLoader (from ParallaxInc GitHub: https://github.com/parallaxinc/PropLoader)

    $ cd src        <== The name of your source directory 
    $ git clone https://github.com/parallaxinc/PropLoader.git
    $ cd PropLoader
    $ export OS=raspberrypi
    $ make
    $ cd ../proploader-raspberrypi-build/bin
    $ ls
    created  proploader  split
    $ ./proploader 
    PropLoader v1.0-50 (2021-02-28 06:34:37 g42c1848)
    
    usage: ./proploader [options] [<file>]
    
    options:
        -b <type>       select target board and subtype (default is 'default:default')
        -c              display numeric message codes
        -D var=value    define a board configuration variable
        -e              program eeprom (and halt, unless combined with -r)
        -f <file>       write a file to the SD card
        -i <ip-addr>    IP address of the Parallax Wi-Fi module
        -I <path>       add a directory to the include path
        -n <name>       set the name of a Parallax Wi-Fi module
        -p <port>       serial port
        -P              show all serial ports
        -r              run program after downloading (useful with -e)
        -R              reset the Propeller
        -s              do a serial download
        -t              enter terminal mode after the load is complete
        -T              enter pst-compatible terminal mode after the load is complete
        -v              enable verbose debugging output
        -W              show all discovered wifi modules
        -?              display a usage message and exit
    
    file:               binary file to load (.elf or .binary)
    ...
    ...
    

    I would copy proploader to a directory that is within your Raspberrypi's $PATH, in order to just exec it with "$ proploader"... Load binaries onto your propeller boards with:

    $ proploader -p /dev/ttyUSB1 your_binary.binary
    
    OR
    
    $ proploader -e -p /dev/ttyUSB1 -r your_binary.binary     <== will upload to the propeller eeprom & run the code
    

    dgately

  • Don MDon M Posts: 1,652

    Thank you for that. I am so used to using Propeller Tool. Is there anything that operates similar to that (IDE) for the Raspberry Pi? Where you could edit the program but also program the Prop with some clicks on the IDE?

  • Don MDon M Posts: 1,652

    If it is too "involved" to edit/program using a Pi then I will just continue to use Propeller Tool to edit/save my programs on my laptop and just use your suggestion above to just download the file to the Prop using the Pi.

  • dgatelydgately Posts: 1,630
    edited 2021-02-28 15:22

    Had you asked for an IDE (you stated " I will already have made the binary or eeprom file. Just want to be able to upload it to the Prop using a Raspberry Pi with usb cable to Prop Plug"), I would have pointed you to: https://www.parallax.com/download/propeller-c-software/ And, you would have been able to download SimpleIDE (which will actually let you program in C or Spin in this Raspberry Pi version of the IDE).

    Look for the link that lets you download "SimpleIDE Software for Raspberry Pi (Propeller C)". Don't be afraid of the "C" as the RPi variant allows Spin coding as well.

    Unpack the downloaded SimpleIDE_0-9-45_armv6l-RaspberryPi-Linux.tar.bz2 file:

    $ tar -xjf SimpleIDE-packagename.bz2
    $ cd SimpleIDE-0-9-45
    

    Read the INSTALL.txt instructions to install simpleide into a known location.

    At some point in executing simpleide the first time, you will probably see an error:

    $ simpleide   
    ...
    /opt/simpleide/bin/SimpleIDE: error while loading shared libraries: libpng12.so.0: cannot open sh$
    

    which you can remedy with:

    $ sudo apt install libpng12-0
    $ sudo apt install libpng12-dev
    $ simpleide                                         <== should run the IDE...
    

    [https://forums.parallax.com/discussion/comment/1518128/#Comment_1518128]

    .

    SimpleIDE also contains the propeller-load loader, which is basically an earlier version of proploader

  • Don MDon M Posts: 1,652

    Thanks for your help.

  • Cluso99Cluso99 Posts: 18,069

    @ersmith ‘s FlexProp should also run on RPi but AFAIK it’s only a compiler but you can use VSCode to edit. FlexProp can compile the P1 spin code to pasm too.

  • FlexProp has a GUI that runs fine on Raspberry Pi. You need to install Tcl/Tk on the Pi. The default FlexProp Spin compiler produces PASM rather than bytcode, so for large Spin programs it's not a great choice; OTOH the code runs much faster. You could use the FlexProp IDE with openspin to do more traditional Spin bytecodes, you'd just need to change the command line (the GUI offers an option to do this).

Sign In or Register to comment.