Shop OBEX P1 Docs P2 Docs Learn Events
Shell script to watch for Prop binaries to load wirelessly — Parallax Forums

Shell script to watch for Prop binaries to load wirelessly

I wanted a way to use PropellerIDE to code a Prop and be able to load it wirelessly without having to open another terminal and run proploader manually, so I created a fairly simple (attached) bash shell script that sits and waits for a binary file to exist in the current working directory, and when found, loads it to the Prop wirelessly using proploader and a Prop board with a WX module.
This is mostly for Linux users programming in SPIN using PropellerIDE, but may work on OSX, and could probably be adapted to run in Windows (at a minimum, it would need either a Windows copy of bash or port this script to a batch file)

Example operation:
bash# spinbinmon.sh 192.168.1.10 my_prop_program.binary

Watching for my_prop_program.binary to upload in /home/username/prop/...

At this point, you would just hit F9 in PropellerIDE to build, and when the script sees the .binary that was just created, it then calls proploader:
Opening file 'my_prop_program.binary'
Downloading file to port 192.168.1.10
1268 bytes sent
Verifying RAM
Download successful!

after which it will remove the .binary and repeat the loop until killed (Ctrl C, kill, etc). The file is watched for with a 1-second delay in between loops.

The only mandatory arg is your WX modules' IP address - the filename is optional. It will default to *.binary if not specified.
The script is single-minded and isn't particularly sophisticated or foolproof, but I feel it fills its purpose until someone has the time and resources to add proper wireless loading support to PropellerIDE.

Cheers,
Jesse
Sign In or Register to comment.