Shop OBEX P1 Docs P2 Docs Learn Events
Just got Prop QuickStart...install BST...totally lost on what to do next...help! — Parallax Forums

Just got Prop QuickStart...install BST...totally lost on what to do next...help!

PoundSign2PoundSign2 Posts: 129
edited 2013-09-25 17:36 in General Discussion
Hello friends,

Today I purchased a Parallax Propeller QuickStart (RevA) w/ P8X32A. Saw some videos on YouTube about it and thought it would be a great new adventure aside from Arduino and ATmel chips. With that said I went to the store and grabbed one of these, although RadioShack marked it up 100% from Parallax website, and when I got home to get started in programming, you know download compiler, IDE, etc. However I am really lost with using Brad's SPIN Tool. When I load the program I get this...


Screenshot from 2013-09-22 21:12:22.jpg



There doesn't appear to be any example code, and using Google/YouTube I cannot locate any help in programming using BST. Can the community please help point me in the right direction so I can use this fine Microcontroller? I feel like I am missing something. :blank:

- OS Ubuntu 13.04 64-bit

Comments

  • T ChapT Chap Posts: 4,223
    edited 2013-09-22 21:20
    Hello and welcome. Did you download the Propeller tool zip file also? There is a download that should contain examples. Plus the OBEX will have a lot of code you can adapt for your own purposes. As I recall BST doens't come with any code in it's download.


    http://www.parallax.com/downloads/propeller-tool-software

    If you put BST inside the folder with the extracted Propeller tool files then you can load the examples into BST
  • PoundSign2PoundSign2 Posts: 129
    edited 2013-09-22 21:51
    Can I use the Propeller_Tool.zip because I am running Linux? I downloaded it anyways and ran it via WINE and did see the examples, however when I load BST this is when a lot of confusion sets in. As you can see from the image I posted all I get in BST file menu is >Root and a ton of sub folders. But no Home folder is present. SO I do not know what to do.

    Are there any tutorials on how to program in/using SPIN? I should note that I also did copy some code from the book, "PROGRAMMING AND CUSTOMIZING THE MULTICORE PROPELLER(TM) MICROCONTROLLER" and then I uploaded that code to my P8X32A and now have an LED blinking. While I'm sure I could figure out how to program it thoroughly, in due time, a tutorial would be most appreciated.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-09-22 22:04
    There are some early tutorials in the two sticky threads at the top of this forum's thread list. There are a growing number of new tutorials on the <learn.parallax.com> website with most of them showing comparable examples for the Stamps and the Arduino as well. When you install the Propeller Tool, you get a library directory and a (mostly) matching demo program directory with a lot of standard library objects that are also available from the Propeller Object Exchange (ObEx). You could copy these directories to somewhere convenient for use with BST. Since you're running Linux, you might consider downloading and installing Parallax's SimpleIDE + GCC C Compiler. This includes BSTC, a command line version of the BST compiler so you can write both Spin and C programs using the same development environment. I use this now for both Linux and MacOS Propeller programming.
  • kwinnkwinn Posts: 8,697
    edited 2013-09-22 22:09
    SimpleIDE seems to be the wave of the future so you may want to install that instead of BST. Then you can open the sample programs that came with came with the Propeller Tool.
  • PoundSign2PoundSign2 Posts: 129
    edited 2013-09-22 22:36
    Mike Green wrote: »
    There are some early tutorials in the two sticky threads at the top of this forum's thread list. There are a growing number of new tutorials on the <learn.parallax.com> website with most of them showing comparable examples for the Stamps and the Arduino as well. When you install the Propeller Tool, you get a library directory and a (mostly) matching demo program directory with a lot of standard library objects that are also available from the Propeller Object Exchange (ObEx). You could copy these directories to somewhere convenient for use with BST. Since you're running Linux, you might consider downloading and installing Parallax's SimpleIDE + GCC C Compiler. This includes BSTC, a command line version of the BST compiler so you can write both Spin and C programs using the same development environment. I use this now for both Linux and MacOS Propeller programming.

    Having trouble getting SimpleIDE to run. I downloaded the zip, unzip, and there doesn't appear to be any executable file. Do I have to do something inside terminal, such as unzip via terminal? Any help is appreciated.
  • Heater.Heater. Posts: 21,230
    edited 2013-09-22 23:16
    BST is a very fine tool but sadly has not been supported for a long time.

    SimpleIDE is the way to go.

    Have you started from these instructions: http://learn.parallax.com/propeller-c-set-simpleide ?

    Get the linux down load package https://propside.googlecode.com/files/SimpleIDE-0-9-40.r2.i686.debian-linux.tar.bz2

    In a terminal window change to the directory were it was downloaded and unpack it with the command:
    $ tar jxf SimpleIDE-0-9-40.r2.i686.debian-linux.tar.bz2
    
    That should give you a new directory full of SimpleIDE stuff SimpleIDE-0-9-40

    Change to that directory and run the setup script:
    $ ./setup.sh
    
    You may need to do that as the root user, I forget, use:
    $ sudo  ./setup.sh
    

    That will have installed the compilers and stuff to /opt/parallax
    and given you an Simple IDE executable in the current directory. Run that:
    $ ./simpleide
    
    Have fun.
  • Heater.Heater. Posts: 21,230
    edited 2013-09-22 23:19
    Of course BST is a tool for the Spin language and SimpleIDE does both Spin and C. It comes up with a "hello" project in C out of the box.
    I guess you will need more help to be getting on in Spin with SimpleIDE if that is what you want.
  • PoundSign2PoundSign2 Posts: 129
    edited 2013-09-22 23:41
    Heater. wrote: »
    BST is a very fine tool but sadly has not been supported for a long time.

    SimpleIDE is the way to go.

    Have you started from these instructions: http://learn.parallax.com/propeller-c-set-simpleide ?

    Get the linux down load package https://propside.googlecode.com/files/SimpleIDE-0-9-40.r2.i686.debian-linux.tar.bz2

    In a terminal window change to the directory were it was downloaded and unpack it with the command:
    $ tar jxf SimpleIDE-0-9-40.r2.i686.debian-linux.tar.bz2
    
    That should give you a new directory full of SimpleIDE stuff SimpleIDE-0-9-40

    Change to that directory and run the setup script:
    $ ./setup.sh
    
    You may need to do that as the root user, I forget, use:
    $ sudo  ./setup.sh
    

    That will have installed the compilers and stuff to /opt/parallax
    and given you an Simple IDE executable in the current directory. Run that:
    $ ./simpleide
    
    Have fun.


    I ran into an issue after running the
    $ tar jxf SimpleIDE-0-9-40.r2.i686.debian-linux.tar.bz2
    

    What happens is I get No such file or Directory exist when I try to run the setup.sh file, even as root it makes no difference. Any additional helpers?

    Also, why would you want to program this MCU in C as opposed to the SPIN language? I guess I'm having a hard time visualizing how you call eight cogs at a time.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-09-23 00:09
    May I suggest that you repost on the Propeller thread. You will get a lot more help over there and the sticky referred to is in that thread too.
  • Heater.Heater. Posts: 21,230
    edited 2013-09-23 00:43
    You missed where I said "change to that directory". This works for me on Debian:
    $ tar -xvjf SimpleIDE-0-9-43.x86_64.zicog-linux.tar.bz2 
    $ cd SimpleIDE-0-9-43/
    $ ./setup.sh 
    $ ./simpleide 
    

    I have a newer version so adapt the file and directory names according to what you have.
    Note: I have written "tar -xvjf..." above. I just tried it without the hyphen though and it worked.


    If you want to see what files you have use the ls command.
  • RsadeikaRsadeika Posts: 3,837
    edited 2013-09-23 01:07
    Also, why would you want to program this MCU in C as opposed to the SPIN language? I guess I'm having a hard time visualizing how you call eight cogs at a time.
    If you go to the Learn forum, I have a program, My ActivityBot, where I am using at least three cogs at the same time, I will be adding more cogs to the program.

    SimpleIDE does support Spin, but it is not really advertised as much as the C capabilities, I have done both on that IDE.

    Ray
  • Heater.Heater. Posts: 21,230
    edited 2013-09-23 01:23
    PoundSign2,
    ...why would you want to program this MCU in C as opposed to the SPIN language?
    May be you do and may be you don't.

    It's very good to have C available for the Propeller because it is the language that the bulk of the worlds embedded and MCU programmers use. Many of them don't want the hassle of having to use a different language. There is lot's of existing code in C. And so on.

    Don't forget that all those millions of Arduino programmers work in C. Well, C++ actually but never mind.

    For raw beginners that are new to programming and/or the Propeller I might suggest it's better to start with Spin. It's a much simpler language and development system, tailored for the Propeller and there are tons of ready made "objects" in the OBEX.

    One never "calls eight cogs at a time". One starts a COG running some function in your code. That function will normally be and endless loop that never finishes. Say reading I/O pins or performing serial communications. When that little "sub program" or task is up and running it communicates with your main program, or other sub tasks, by reading and writing data to memory that they both share. Say, the state of those I/O pins or the bytes received over a serial line.

    This is basically the same in both C and Spin.
  • jazzedjazzed Posts: 11,803
    edited 2013-09-23 01:27
    Heater. wrote: »
    You missed where I said "change to that directory". This works for me on Debian:
    $ tar -xvjf SimpleIDE-0-9-43.x86_64.zicog-linux.tar.bz2 
    $ cd SimpleIDE-0-9-43/
    $ ./setup.sh 
    $ ./simpleide 
    

    I have a newer version so adapt the file and directory names according to what you have.
    Note: I have written "tar -xvjf..." above. I just tried it without the hyphen though and it worked.


    If you want to see what files you have use the ls command.

    Heater, etal.

    The current Linux release 2 package that Parallax uploaded doesn't work like that.
    I'll be talking with Jeff about this tomorrow. I'm sorry if this has caused trouble.
    I don't see any instructions about how the Linux package is supposed to be used.
  • Heater.Heater. Posts: 21,230
    edited 2013-09-23 01:59
    WTF?

    I just tried the r2.

    After unpacking it there is no setup script or anything.

    There is a SimpleIDE in the bin directory, let's try that:
    $ ./bin/SimpleIDE 
    ./bin/SimpleIDE: error while loading shared libraries: libquazip.so.1: wrong ELF class: ELFCLASS64
    

    Is there ant way to install this or is it just totally borked?

    What was wrong with the old way?
  • JLockeJLocke Posts: 354
    edited 2013-09-23 02:57
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-09-23 05:39
    If all seems too much, you might just try using Forth on the Propeller to get going. At least you can get interactive assurance all is well.

    Then you can work on other projects while investigating features via Forth. Bst can and does load up Forth rather easily if you can open the actual .spin file and compile it.
  • TymkrsTymkrs Posts: 539
    edited 2013-09-23 11:39
    PoundSign2 wrote: »
    Hello friends,

    Today I purchased a Parallax Propeller QuickStart (RevA) w/ P8X32A. Saw some videos on YouTube about it and thought it would be a great new adventure aside from Arduino and ATmel chips. With that said I went to the store and grabbed one of these, although RadioShack marked it up 100% from Parallax website, and when I got home to get started in programming, you know download compiler, IDE, etc. However I am really lost with using Brad's SPIN Tool. When I load the program I get this...


    Screenshot from 2013-09-22 21:12:22.jpg



    There doesn't appear to be any example code, and using Google/YouTube I cannot locate any help in programming using BST. Can the community please help point me in the right direction so I can use this fine Microcontroller? I feel like I am missing something. :blank:

    - OS Ubuntu 13.04 64-bit

    Hi PoundSign2! Glad you decided to try the Propeller!! The thing about Brad's BST is it's pretty minimalistic in how it looks, but acts similar to what you'd expect in PropTool. Both used for spin. There are some bugs in BST since it's no longer supported, but for my old mac, it does what I need it to do most of the time.

    Here's some basic information:

    http://tymkrs.tumblr.com/post/23832530904/setting-up-brads-bst-on-macs-part-i
    http://tymkrs.tumblr.com/post/23866564799/setting-up-brads-bst-on-macs-part-ii

    And for working with it in general, if you look through the titles here in the archives, you'll find a lot of code, code analysis, etc.

    http://tymkrs.tumblr.com/archive

    I've found that whatever Spin code you can put into Proptool, you can put into Brad's BST. So I interchange which spin compiler in my posts a lot. Lately, I've been on a c kick, but if you look a few months back in the archives, you'll be able to find some simple spin code along with my step by step. There's also learn.parallax.com which is a GREAT resource for not only copy pasting code to make it work, but also explanations so you can learn language syntax.

    And then if you're interested in learning some Spin, check out http://firstspin.tv - I essentially document the process from zero experience programming to doing multi-cog projects and even board design.


  • PoundSign2PoundSign2 Posts: 129
    edited 2013-09-23 19:18
    Tons of great info here to get me going. I will try that new way to install SimpleIDE as previously mentioned. Also I took a look at learn.parallax.com and I did find a lot of useful information. I did have one more question about the crystal and clockfreq for this chip. I believe it has an internal oscillator so an external crystal is not needed. Is this correct? Also, my board, the Quickstart, has a crystal on the PCB. How does this work with coding?
  • PoundSign2PoundSign2 Posts: 129
    edited 2013-09-23 19:19
    Heater. wrote: »
    WTF?

    I just tried the r2.

    After unpacking it there is no setup script or anything.

    There is a SimpleIDE in the bin directory, let's try that:
    $ ./bin/SimpleIDE 
    ./bin/SimpleIDE: error while loading shared libraries: libquazip.so.1: wrong ELF class: ELFCLASS64
    

    Is there ant way to install this or is it just totally borked?

    What was wrong with the old way?

    I tried and got same error. No joy on getting it to install correctly.
  • Heater.Heater. Posts: 21,230
    edited 2013-09-23 22:55
    You missed the part where I said "WTF?"

    As far as I can tell the latest release of SimpleIDE for Linux on the Parallax download page is broken and the is no way to install it.

    Jazzed, above is the author of SimpleIDE and he does not know what happened so we are a bit stuck today.
  • TymkrsTymkrs Posts: 539
    edited 2013-09-24 04:54
    PoundSign2 wrote: »
    Tons of great info here to get me going. I will try that new way to install SimpleIDE as previously mentioned. Also I took a look at learn.parallax.com and I did find a lot of useful information. I did have one more question about the crystal and clockfreq for this chip. I believe it has an internal oscillator so an external crystal is not needed. Is this correct? Also, my board, the Quickstart, has a crystal on the PCB. How does this work with coding?

    The internal oscillator is obviously not as reliable as external crystal (5mHz on all prop boards I know of) but:
    • Internal slow oscillator ( RCSLOW, 20kHz )
    • Internal fast oscillator ( RCFAST, 12MHz )
    In terms of the crystal, what I usually do in the CON section is:
    CON
    _clkmode = xtal1 + pll16x                         ' This essentially means clock mode = crystal at 80mHz.....PLLs multiply your crystal's freq
    _xinfreq = 5_000_000                               ' This essentially means your crystal/oscillator is at 5mHz
    

    And if memory serves correctly, to use RCFast/RCSlow (the internal oscillators), you'd write something like _clkmode = RCFAST
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-09-24 05:41
    PoundSign2 wrote: »
    Tons of great info here to get me going. I will try that new way to install SimpleIDE as previously mentioned. Also I took a look at learn.parallax.com and I did find a lot of useful information. I did have one more question about the crystal and clockfreq for this chip. I believe it has an internal oscillator so an external crystal is not needed. Is this correct? Also, my board, the Quickstart, has a crystal on the PCB. How does this work with coding?

    A couple of key points....

    A. Internal oscillator versus external oscillator
    Just about everything Parallax provides comes with a 5mhz crystal and code examples at 80mhz.
    So it seems that getting started with that format is easiest. You will learn to recognize the compiler directives for these as they are usually in the first few lines of code.

    The internal oscillator does exist, but in most cases you really want a crystal to allow your asynchonous serial i/o to be more stable. Internal oscillators can wander more due to temperature changes. It can be handy in some extremely minimal or low power projects that don't require asychonous communication, but I suggest to skip it for now. Learn how to handle all your timing at 80Mhz before going to something slower.


    B. While Simple IDE is important if you plan to use C and many of the latest code examples, the Propeller fundamentally relies on Spin. So having some basic understanding of how to compile and load .spin files via the Prop Tool or bst can be very handy. You even need a .spin file to load PASM.

    +++++++
    There are a lot of learning paths for the Propeller with different choices of language. When just getting started, it may help to work with a choice you know... such as C. But never expect to entirely ignore Spin and PASM if you want to get the most out of Propeller projects.
  • Heater.Heater. Posts: 21,230
    edited 2013-09-24 11:51
    PoundSign2,

    At risk of making myself unpopular around here I have posted packages of SimpleIDE that actually work. See this forum post:
    http://forums.parallax.com/showthread.php/150441-SimpIe-IDE-for-Debian-%28x86%29-and-Raspbian-%28Raspberry-Pi%29?p=1208981#post1208981

    Any questions, do ask.
  • PoundSign2PoundSign2 Posts: 129
    edited 2013-09-25 16:48
    Heater. wrote: »
    PoundSign2,

    At risk of making myself unpopular around here I have posted packages of SimpleIDE that actually work. See this forum post:
    http://forums.parallax.com/showthread.php/150441-SimpIe-IDE-for-Debian-(x86)-and-Raspbian-(Raspberry-Pi)?p=1208981#post1208981

    Any questions, do ask.

    Hey thanks a bunch for that! I'm in the middle of redoing my OSes at the moment so when I get Ubuntu up and running again I'll be sure to download it and try it out. Thanks again.


    One last thing that I could use some extra clarity on: Does the crystal need to be 5MHz or can I use, say for example, my 35MHz crystal? Will this add any benefit? Does the PLL always need to be x16?
  • Heater.Heater. Posts: 21,230
    edited 2013-09-25 17:36
    Use 5MHz.

    Faster is possible, a bit, 35MHz is right out. Do see the Propeller Manual.
Sign In or Register to comment.