[Tinyos-devel] Fwd: [Tinyos-help] Makefile support for motelist
on Mac
Kevin Klues
klueska at gmail.com
Tue Mar 18 09:33:57 PDT 2008
I already checked in a fix similar to this about a week ago after
testing on both.
Kevin
On Tue, Mar 18, 2008 at 9:18 AM, David Gay <dgay42 at gmail.com> wrote:
> Someone want to check this on Linux, cygwin then check it in?
>
> David
>
>
>
>
> ---------- Forwarded message ----------
> From: Urs Hunkeler <uhu at gmx.ch>
> Date: Tue, Mar 18, 2008 at 9:07 AM
> Subject: [Tinyos-help] Makefile support for motelist on Mac
> To: TinyOS <tinyos-help at millennium.berkeley.edu>
>
>
> Hi,
>
> I noticed a while ago that on a Mac the Makefile did not properly
> recognize a tmote connected on a USB port. It seems that Mac OS X uses
> some fancy interface names for the connected motes like
> "/dev/tty.usbserial-M4ABD8MF". The regular expression used in the
> Makefile (tinyos-2.x/support/make/msp/bsl.extra) parses until the first
> number appears, and then continues to parse only numbers. The reason is
> that on Windows systems the port number of the serial port has to be
> recognized. As a consequence the above interface name gets shortened to
> "/dev/tty.usbserial-M4" (stops once the first non-number symbol appears
> after a number has been detected).
>
> To resolve this issue I propose that the regular expression be changed
> such that it also continues to parse after the number. The following two
> lines show first the original version and then the proposed modification
> (the regular expression has to be changed in two places within the
> mentioned Makefile extension):
>
> BSLTEST = $(shell motelist -c | perl -e '<> =~ /^[^,]+,(\S+?(\d+))/;
> print $$1;' )
>
> BSLTEST = $(shell motelist -c | perl -e '<> =~
> /^[^,]+,(\S+?(\d+)[^,]*)/; print $$1;' )
>
> Theoretically this should work on Linux and Windows as it always has (I
> haven't tested this). In addition it will now also work on Mac OS X.
>
> Any comments?
>
> Cheers,
> Urs
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>
--
~Kevin
More information about the Tinyos-devel
mailing list