Shop OBEX P1 Docs P2 Docs Learn Events
Linux Software for compiling propeller programs. — Parallax Forums

Linux Software for compiling propeller programs.

bomberbomber Posts: 297
edited 2014-02-21 06:54 in General Discussion
Hi all! So I've been working on setting up a linux server, and I am hoping to embed a prop in it for controlling some additional hardware (things such as tamper detection, better management of cooling, etc.). I will be connecting the prop to an internal USB port, and I want to be able to remotely program it through my SSH connection. I am running linux server version 12.04, and I am running it without a GUI. Is there any software that can be run via command line that compiles a .spin file and uploads it to a connected prop?

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2014-02-19 11:36
    You want these:
    Heater. wrote: »
    Get the openspin source from here: https://code.google.com/p/open-source-spin-compiler/
    It compiles very easily on Linux.

    For the loader you will find it in the propgcc source code. Check that out from here: https://code.google.com/p/propgcc/source/checkout
    You don't need to build or install propgcc but the loader is in the source tree.

    Grab them, build them and you should be ready to compile and load load from the command line!
  • Heater.Heater. Posts: 21,230
    edited 2014-02-19 12:02
    mindrobots,

    What a great quote, if I say so myself:)

    Bomber, you may also be be interested in BSTC and BSTL the command line Spin compiler and loader that is available for Windows, Mac and Linux. Downloadable from here : http://www.fnarfbargle.com/bst.html

    There is also the HomeSpun Spin compiler http://propeller.wikispaces.com/Homespun+Spin+Compiler
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-02-19 12:20
    Sorry, after I did it I realized I could have "replied with quote", cut that and pasted it and covered your attribution......
  • Heater.Heater. Posts: 21,230
    edited 2014-02-19 12:23
    Just kidding, no attribution required.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-02-20 01:53
    Brad's Spin Tool has worked well in Linux for a long time... very simple to install and use. It compiles code from Spin and Pasm. It is also more feature rich than Parallax's original Propeller Tool.

    The only Linux problem with it is that Ubuntu has done something that prevents use of the binary. I had to switch to Debian and abandon Ubuntu. Not actually a big deal, but I had used Ubuntu since 10.10 for all and everything.

    Your mention of version 12.04 sounds suspiciously like an Ubuntu version, the Linux kernel itself should be a verson 3.xxx.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-02-20 07:47
    Brad's Spin Tool has worked well in Linux for a long time... very simple to install and use. It compiles code from Spin and Pasm. It is also more feature rich than Parallax's original Propeller Tool.

    The only Linux problem with it is that Ubuntu has done something that prevents use of the binary. I had to switch to Debian and abandon Ubuntu. Not actually a big deal, but I had used Ubuntu since 10.10 for all and everything.

    Your mention of version 12.04 sounds suspiciously like an Ubuntu version, the Linux kernel itself should be a verson 3.xxx.

    Hmmm. you did mention that you did NOT want a GUI and Brad's Spin Tool is that for the most part. But there are several Command line binariies as well that might be exactly what you seek. Those are the BSTC and BSTL that were mentioned above.

    They may work well inspite of the full GUI being broken in recent Ubuntu versions, just because the failure might be somewhere in how Ubuntu changed the GUI.
  • bomberbomber Posts: 297
    edited 2014-02-20 09:08
    Thanks for all the replies, I am a complete linux noob, and I am having trouble. I am not sure how to install the .linux files for bstc and bstl that I downloaded. Everything that I have found on google is inconclusive. I should clarify that I am running Ubuntu Server 12.04.
  • Heater.Heater. Posts: 21,230
    edited 2014-02-20 10:40
    bomber,

    There is nothing to install. Just make them executable:
    $ chmod username:username bstc.linux
    $ chmod username:username bstl.linux
    
    Where "username" is whatever your login name is.
    Then you can just run them as:
    $ ./bstc.linux
    
    I think I would copy them to /usr/bin so that you can just type the names like normal Linux commands, dropping the ".linux" part as we go:
    $ sudo cp bstc.linux /usr/bin/bstc 
    $ sudo cp bstl.linux /usr/bin/bstl 
    
  • bomberbomber Posts: 297
    edited 2014-02-20 11:07
    Thanks Heater, that did the trick. Forum post coming (hopefully) soon with my propeller setup on the server.
  • Heater.Heater. Posts: 21,230
    edited 2014-02-20 11:47
    Great stuff.

    Next up we need web based working. Spin editor in the browser, compiler/loader and Propeller on the server.
    Are you any good at HTML5, CSS3 and JavaScript?
    Because we are terrible. But first experiments are here: http://the.linuxd.org:3000
  • bomberbomber Posts: 297
    edited 2014-02-20 13:14
    I have no practical experience with HTML or CSS and JS is on my list of languages to eventually learn. I have no formal training in computer programming (sadly middle school doesn't offer those types of courses). The site looks a lot better than i would have expected from someone's first experiments.
  • Heater.Heater. Posts: 21,230
    edited 2014-02-20 13:31
    Bomber,
    ...have no formal training in computer programming...
    Perfect. No preconceived ideas. Many of the best programmers of the, not so long ago, past had no formal training in CS. That was normal because there pretty much was no formal training in CS.
    Look a Parallax's very own Chip Gracey. I don't think he went to programming school. But look what wonders he has created.
    The site looks a lot better than i would have expected from someone's first experiments.
    [/COLOR]
    Thanks.

    Actually all look or style there is down to the fact that I used the boostrap library to take care of CSS and layout and fonts and such. No skill on my part.
    http://getbootstrap.com/

    The editor comes from the CodeMirror project.

    The experiment for us there is actually invisible. It's how to translate C++ code into JavaScript that can run in the browser and do the Spin compilations.

    Now if we had a loader, BSTL, or whatever on the server it could send the binaries back to load an attached Propeller.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-02-21 06:54
    At first Linux may seem overwhelming to learn. But with some study it actually is a clearer OS for the user to understand.

    Absolutely everything ties into it as part of the file system. i/o ports are listed as files and of only two types -- character-by-character transfer or block transfer.

    Find a shorter introduction to get started. I have "How Linux Works: what every superuser should know" by Brian Ward. It is a very pleasant informative read and might be found used or at your public library.

    There is also a huge library of free Linux publications in pdf form that can be downloaded, including the topic of Systems Administration. You really don't have to buy a lot of books. In general, if you get stuck, the Ubuntu formums are very good at problem resolution... a lot of helpful people.
Sign In or Register to comment.