Shell script to watch for Prop binaries to load wirelessly
avsa242
Posts: 452
in Propeller 1
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:
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:
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
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