RealBasic and Programming Prop
T Chap
Posts: 4,223
I need to send binaries to clients in cases where there are custom software needs. RealBasic is very easy for me to use to create a standalone app. Can someone point me in a direction of how to figure out a method to program the Prop and a standalone app? I think Brad has something that might work under within Realbasic, bstl or bstc, not sure which. Maybe there are other options? What I want to do is create a custom app that will do the same as an F10 and F11, or just F11. Sending out bst or proptool and source files is not an option. I wouldn't want someone having to do command line type input, this needs to be as simple as running the app, then programming the included binary to the Prop.
Another thought was to simply transfer the bytes from the .eeprom from the app in page writes, then reboot, but if there is a problem then I am back to square one.
Thanks
Post Edited (Todd Chapman) : 11/27/2009 9:57:11 PM GMT
Another thought was to simply transfer the bytes from the .eeprom from the app in page writes, then reboot, but if there is a problem then I am back to square one.
Thanks
Post Edited (Todd Chapman) : 11/27/2009 9:57:11 PM GMT
Comments
I need to do the exact same thing!
Needs to be MAC & PC compatible, (This is where realbasic helps)
I currently have a real basic app that can read and write user data to a prop device I have.
Currently the user sends or receives DATA to the prop device, via USB using my Special USB Adaptor ( see the bottom of this post http://forums.parallax.com/forums/default.aspx?f=25&m=392294&g=394835#m394835 )
I would like the option of e-mailing a file which the user gets so they can use the my realbasic app to upload the firmware.
looking forward to anyones suggestions.
regards
Dave M
At the moment I can run in command line mode the propellent.exe and identify hardware, write to ram or eeprom on the pc. I think it would be possible to run some command lines from the Realbasic app just as well and have buttons that run the commands. Now to get brads bstl to work on mac and pc. from the REALbasic app.
Post Edited (Todd Chapman) : 11/27/2009 11:00:54 PM GMT
I believe BradC has created this command line tool, I have not tried it yet
http://www.fnarfbargle.com/bst/bstl/005/
and this as a compiler
http://www.fnarfbargle.com/bst/bstc/0153/
if we can link into this via realbasic it would be nice.
a plug-in version of this for realbasic would be ideal
Thanks
Dave M
I will post a simple GUI concept.
bstl may or may not allow locating of a device, so maybe a serial routine could be active in the Prop at all times, or some other idea to identify the Prop and get a response that it has been found. It would be a real hassle not to know that there was communication established.
In RB, I am told you can use a Shell object to run commands.
Post Edited (Todd Chapman) : 11/27/2009 11:58:51 PM GMT
that's a good start, do you have any serial code developed for your realbasic?
I have some as far as sending and receiving data and detecting ports, But I believe, writing to the eeprom of the compiled binary file is different.
I could not work out how brads bstl works either, If we can get that to work , then we just have to work out how real basic links in with running a terminal application, then link this to our GUI
I believe that realbasic has a TERMINAL APPLICATION CLASS should this should work.
Dave M
Propellent works fine and does a good job of locating the Prop. In accessories, utilities, "Command Terminal" do cd\ to find the propellent folder containing the .eeprom file and the propellent.exe then type: propellent.exe /id and this will locate the prop for you. Download the propellent in at parallax.com under propeller>downloads. It will allow command lines for F10, F11, and other identical prop tool features. Then once we figure out how to call these command lines from RB, just assign the code to the buttons.
I Haven't got time at the moment to try this out, but it looks doable.
If you have time look at the console class in RB.
thanks
Dave M
bstl will run in the terminal on OSX.
If you have a prop plug connected...
>bstl.osx propeller.binay
will load that binary into the propeller RAM.
>bstl.osx -p3 propeller.binary
will load that binary into propeller EEPROM and run it.
bstl.osx -h will give you a list of the command line parameters and tell you what does what.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
In terminal this is what I get. I can do a ls and list the directory of the desktop and see bstl.osx in the list, but when I run
bstl.osx -h
I get the response 'command not found'
try this
./bstl.osx
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
thanks for tring to help out,
in mac osx I get this
Morpheus:~ Morph$ desktop/bstl.osx -p3 XF16CREV12.binary
Brads SpinTool Loader v0.05 - Copyright 2008,2009 All rights reserved
Compiled for powerpc Darwin at 09:34:59 on 2009/07/03
Found a USB Serial Device
Could not load Binary
Morpheus:~ Morph$
I get the "could not load binary" message
Do you know why this could be?
thanks
Dave M
In the lower text field marked Input Cmd, you type in terminal commands, starting with cd desktop then the folder with bstl till you are in the folder. Then type ./bstl.osx -h and it runs the help, and displays the output on the screen.
Ultimately, you could put whatever set of commands on various buttons and run the commands with a click. A browser needs to be installed to locate the bstl file and the file you want to run so they can be sent to bstl as strings.
Oh yeah.. the currently released versions don't cope with COM > 8 on Windows. Any late bst pre-release will work though as it's a bug I fixed a little while ago but never posted updated command line binaries.
DavidM, I can't off the top of my head think why. I've recently improved the error reporting, but as above I've not posted any updated binaries. I'll try and get some out today.
If you run bstl.osx without any command line options, does it tell you it detected a propeller? Do you have any other usb-serial converters connected that don't have propellers on them?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
www.fnarfbargle.com/bst/snapshots
Todd, this should (hopefully) fix your high COM port number problem.
DavidM, this *might* help find out why it can't load the prop, although I suspect it's not detecting it at all.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
-an OSX app called Propeller System Updater that will run bstl.osx -p1 update.eeprom or bstl.osx -p3 update.eeprom
-the Realbasic program so you can modify easily to your own needs
-a dummy update.eeprom file, I think it is an I2C object from obx, it does nothing actually
-bstl
-propeller logo for Realbasic to use in a build if desired
I don't have a Prop connected to the mac at the moment but it appears to be doing what it should. If someone can test it that would be great. To program a real file, in BST or PropTool, compile a program and save as eeprom or binary, then rename to update.eeprom (or modify the RB app to reflect any name you want it to look for. Place the new update.eeprom inside the the system updater folder.
The entire folder must be placed in the MAC in the applications folder unless you modift the RB app to look for the folder elsewhere.
The program runs a SHELL class and sends the basic commands to the osx terminal to change directories to the folder we need, then it runs bstl -p1 or -p2 based on the button you press. These buttons should theoretically duplicate F10 and F11 if I interpreted Brad's instructions correctly.
The app does not currently allow you to search for a device, but will give an error if it can't find a port connected to a device when trying to program.
If sending to a remote user, I would think it best to include in the zip an FTDI driver as well.
Now to try he PC version.
Post Edited (Todd Chapman) : 11/28/2009 5:31:03 PM GMT
That's a good start,
I have not tried your app yet ( no time at the moment) but I will soon,
My idea would be to update the prop , but not how any terminal window to the user,
One idea could be that you include the update binary in the software package, or allow the user to choose a file.
Thanks
Dave M
-a pc app called Propeller System Updater that will run bstl.exe -p1 test.eeprom or bstl.exe -p3 test.eeprom
-the Realbasic program so you can modify easily to your own needs
-a dummy test.eeprom file, it does nothing.
-latest bstl.exe
-propeller logo for Realbasic to use in a build if desired
You enter the COM port, and file name. File to load must be in same folder as app.
There is no reporting in the window back from bstl. If the app actually programs the chip, it will take a few seconds and there will be a delayed response [noparse][[/noparse]completed] in the window only. If the response is immediate, then nothing happened. Future versions may require the init of the program to output a notice that the chip has rebooted, indicating to the app that is had actually received the program and rebooted, possibly even displaying the revision number with the feedback to insure success.
Post Edited (Todd Chapman) : 11/29/2009 7:28:11 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.