[Tinyos-help] Tos-bsl invoke script
Hristo Bojkov
hbojkov at idxs.eu
Mon Oct 8 03:38:36 PDT 2007
Some weeks ago I posted a query here in this thread about using COMx as bsl
target, not using the standard numbering. So compilation can be started
like:
>make tmote install,0 bsl,COM18
I received no answer.
Then I tried to change the tos-bsl by my self in order to be able to compile
with COMx. To do this, I have installed separate Pythion like it is said in
the readme in bsl dir, and I have done every thing proper, but it turns that
it is very difficult to make working exe, because all the time the exe that
I received had issued errors for some problems with components in some zips.
.
Anyway I abandoned the idea, and decided to use the power of bash and have
it to check the parameter of the tos-bsl, and make it in the way that
tos-bsl like it. So my new idea is very simple now. I just rename the
tos-bsl executable with command:
> rm /usr/local/bin/tos-bsl /usr/local/bin/tos-bsl-exe
Then I create new script file as tos-bsl with body:
#!/bin/bash
Export tmpCOM=${3:3}
Export tmpCheck=${3:0:3}
If [ $tmpCheck = "COM" ]
Then
Echo COM found
Export newValue=$[tmpCOM-1]
Echo Invoke tos-bsl-exe $1 $2 $newValue $4 $5 $6 $7 $8
Tos-bsl-exe $1 $2 $newValue $4 $5 $6 $7 $8
Else
Echo Invoke tos-bsl-exe $1 $2 $3 $4 $5 $6 $7 $8
Tos-bsl-exe $1 $2 $3 $4 $5 $6 $7 $8
If
And I put symbolic link /usr/local/bin/tos-bsl to my new script file.
Now I can use commands like this:
>make tmote install,0 bsl,COM18
Of course the old way still works:
>make tmote install,0 bsl,17
Hope that someone will find this useful
Hristo
Platform: WinXp/Cygwin
TinyOS: 2.0.2
Device: Tmote
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20071008/f78c953d/attachment.html
More information about the Tinyos-help
mailing list