PropBasic: How to use PropBasic in SimpleIDE !!!
Bean
Posts: 8,129
NOTE: These file will NOT work with BST. I'm sorry...
Jazzed has been kind enough to create a batch file that will allow you to use PropBasic from his SimpleIDE GUI.
Here is how to do it step by step for Windows...
Download the PropBasic_1_42_PC.zip file and extract the files. Put the files into the C:\Program Files (x86)\SimpleIDE\Propeller-gcc\bin directory.
Start SimpleIDE
From the menu choose: "tools" then "Properties"
Click on the "Spin Folders" tab at the top of the dialog box.
Change the "Spin Compiler" setting from "bstc.exe" to "propbasic.bat", then click the "OK" button to close the dialog box.
You are now ready to load a PropBasic file.
From the menu choose: "Project" then "Close Project" (this will close any open project, so we can start fresh).
From the menu choose: "File" then "Open"
Change the "Source Files" selection to "Any (*)"
Find and load your .pbas file.
From the menu choose "Project" then "Set Project". (Or press F4 or click on the gear icon)
In the "Project Option" window (lower right of screen), change "Compiler Type" to "SPIN".
You are now ready to compile your PropBasic file. You can use the "Build" (Hammer), Load RAM and Run (white arrow pointing right with green background) or Load EEPROM (white arrow pointing down with green background).
Or even Run with Terminal (screen icon with white arrow pointing right).
I am very excited about this new development with SimpleIDE.
If anyone needs any help getting this going, just let me know.
Bean
8/16/2013 I changed the .bat file so the IDE stops if an error occurs. It still doesn't highlight the error, but at least it stops and doesn't load the last build.
8/26/2013 I have updated the files to version 1.42 and included the Linux and OSX builds (thanks to David Betz)
Jazzed has been kind enough to create a batch file that will allow you to use PropBasic from his SimpleIDE GUI.
Here is how to do it step by step for Windows...
Download the PropBasic_1_42_PC.zip file and extract the files. Put the files into the C:\Program Files (x86)\SimpleIDE\Propeller-gcc\bin directory.
Start SimpleIDE
From the menu choose: "tools" then "Properties"
Click on the "Spin Folders" tab at the top of the dialog box.
Change the "Spin Compiler" setting from "bstc.exe" to "propbasic.bat", then click the "OK" button to close the dialog box.
You are now ready to load a PropBasic file.
From the menu choose: "Project" then "Close Project" (this will close any open project, so we can start fresh).
From the menu choose: "File" then "Open"
Change the "Source Files" selection to "Any (*)"
Find and load your .pbas file.
From the menu choose "Project" then "Set Project". (Or press F4 or click on the gear icon)
In the "Project Option" window (lower right of screen), change "Compiler Type" to "SPIN".
You are now ready to compile your PropBasic file. You can use the "Build" (Hammer), Load RAM and Run (white arrow pointing right with green background) or Load EEPROM (white arrow pointing down with green background).
Or even Run with Terminal (screen icon with white arrow pointing right).
I am very excited about this new development with SimpleIDE.
If anyone needs any help getting this going, just let me know.
Bean
8/16/2013 I changed the .bat file so the IDE stops if an error occurs. It still doesn't highlight the error, but at least it stops and doesn't load the last build.
8/26/2013 I have updated the files to version 1.42 and included the Linux and OSX builds (thanks to David Betz)
Comments
Some errors don't get printed for some reason.
Last time we got into BASIC compilers we started quite the project with SX/B.....add a little JonnyMac to this concoction, a tad of Jazzed, a bit of interest and it'll grow organically pretty quick. Seen it happen before!
Ken Gracey
Sorry to have Hijacked the PropBasic Studio thread.
Here's my attempt:
http://forums.parallax.com/showthread.php/148214-PropBasic-Studio-Coming-Soon?p=1201361#post1201361
dgately
You must be in simple view. Use Tools -> Set Project View, and you'll see more file commands.
Dennis,
I looked at how to split the filename for several hours in Windows (.bat is too easy to be useful LOL).
There is a shift bash shell? Thanks for showing that.
Yes, shift would have worked as well, but I wanted to parse-out the filename without the .pbas extension for later use with the .spin extension. Found that code on the internet and used it as a shortcut to getting the code to work.
dgately
I used the dgately .pbas example program with my PropBoe board, changing the line to 'LEDs PIN 27..26 LOW', the program runs as expected.
The program name that I used is test1.pbas, I just noticed that in the project manager the file name that is shown is 'test1.pbas.c', in my directory listing I have: I am thinking that this might lead to some confusion as to what file gets used and when.
I guess, now the question is, where will PropBasic end up, with SimpleIDE or the 'Propeller Tool-like' Spin IDE?
Ray
About a month ago I was waiting on a PCB for a new product, and really wanted to work on the code with some hardware; I was able to put the core and user interface elements onto a PPDB. Then I decided a change of venue (out of the home office that is) would be helpful, so I took everything to a local Starbucks. I live in the neighborhood so people know me, but I did get a lot of funny looks with all the wires and blinking lights. It was kind of nice, though; nobody wanted to sit near me which helped with the noise.
I found it humorous that mine was the only laptop in that Starbucks NOT running FinalDraft (screenwriting software)!
As with many, I am very appreciative ot Steve's work on SimpleIDE. The plague called the Arduino has only spread because of the availability of a cross-platform IDE. With a wonderful cross-platform tool like SimpleIDE, and a choice of language tools -- now expanding, there is no reason why the Propeller cannot reclaim it's rightful market position amongst electronics enthusiasts.
Follow-up: I haven't used PropBASIC in a long time but decided to install it to help my customers that prefer BASIC or are transitioning from the BASIC Stamp. I have a little test program that I've used before that seems to compile, but when I try to run it I get a loader error.
Doc
Would like to test this. Got Source?
Yes, sir!
Thanks Ken.
I can only hope.
Fingers crossed...
Bean
The small program size is rather curious though ... 236 bytes of PASM ?
Very good question! At the moment I'm considering minimal PropBasic changes in the current IDE.
A "Propeller-IDE" would probably be the best place for more propeller programming languages.
SimpleIDE will now not try to load the program if a PropBasic error occurs.
Jazzed, How do I need to format the .err file so SimpleIDE can locate the error in the source file ?
Bean
Jazzed, Yes the 236 instructions is correct.
PropBasic generates really small PASM code, and it's fast because it's a single-pass compiler.
Bean
So it's 236 longs? My experience with BSTC is that it reports bytes even though it says longs.
Bean
Ray
Did you mean like this ? - a little buried, but once you know what to look for, this is useful in re-packaging parameters.
http://en.wikibooks.org/wiki/Windows_Batch_Scripting#Percent_tilde
Not all IDEs expect to read an err file, so there is this info, if you want to work via captured output in the meantime.
http://forums.parallax.com/showthread.php/148214-PropBasic-Studio-Coming-Soon?p=1201119&viewfull=1#post1201119
The real enabler as I see it is with a simple and standard IDE across platforms and languages. SimpleIDE seems to be the right product at last to fill this bill. It is quite a while since I looked - I am just waiting for the SimpleIDE release using Roy's new compiler and I can switch over.
I do understand why everyone wants C, and I totally agree it is a necessary evil, but there are far easier ways (for hobbyists) if you can mix BASIC and pasm, and even SPIN. And we can include C and even Forth into the mix as well.
It is really a shame it has taken soooo long to get here, but now we are on the cusp. Thanks Steve & co.
Built, uploaded and runs on my QuickStart, from SimpleIDE on Mac OS X.
dgately
I had asked in a prior post, but it was probably missed. How can I get the latest PropBasic for Mac OS X (1.40?). Right now, the latest version from BST's website is 1.14.
Thanks,
dgately
Is there anyone that can compile a program with Lazarus for Mac ?
We will also need someone to compile it for Linux too ?
How about it ? Can anyone help out here for the good of PropBasic ?
Thanks,
Bean
Thank you David, I currently use Delphi. So I'll have to get up-and-running with Lazarus and make sure I can compile cleanly with it.
Then I will send you the source files. Give me a couple days to test everything out, I don't want to waste your time.
Bean