Difference between revisions of "Cygwin User Notes"

From TinyOS Wiki
Jump to: navigation, search
(New page: This page is used to collect misc. user notes on using TinyOS under Cygwin. The organization is adhoc. Currently, topics are listed as sections. = Environment variables under Cygwin = ...)
 
(Updated serial port on Cygwin information, re-order to bottom of page)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
This page is used to collect misc. user notes on using TinyOS under Cygwin.  The organization is adhoc.  Currently, topics are listed as sections.
 
This page is used to collect misc. user notes on using TinyOS under Cygwin.  The organization is adhoc.  Currently, topics are listed as sections.
 +
 +
= Beware of <cr><lf> vs. <lf> line terminators =
 +
 +
Some windows editors will use <cr><lf> instead of <lf> to terminate lines.  Unix programs brought over under Cygwin can get confused by this.  We have definitely seen this messing up environment settings.
 +
  
 
= Environment variables under Cygwin =
 
= Environment variables under Cygwin =
Line 10: Line 15:
  
 
<Can someone verify that this works?>
 
<Can someone verify that this works?>
 +
 +
 +
= MIB520 and Cygwin serial ports =
 +
 +
In Cygwin the serial ports are accessed as <tt>/dev/com1</tt> through <tt>/dev/com16</tt> or as <tt>/dev/ttyS0</tt> through <tt>/dev/ttyS15</tt> as on Linux. The <tt>comX</tt> portion of the name corresponds exactly to the Windows port name or the <tt>ttyS0</tt> as a zero based expression of the port number can be used. Thus, to program a Micaz using the Crossbow MIB520 programming board that enumerated as Windows ports COM13 and COM14 type:
 +
 +
<tt>make micaz install mib520,/dev/com13</tt>
 +
 +
or
 +
 +
<tt>make micaz install mib520,/dev/ttyS12</tt>
 +
 +
Note that the <tt>/dev</tt> directory is not populated by Cygwin. This means that listing the <tt>/dev</tt> directory under Cygwin will not list the available serial ports. However, using either of the above syntaxes ''will'' allow access to the ports.

Latest revision as of 12:09, 9 October 2008

This page is used to collect misc. user notes on using TinyOS under Cygwin. The organization is adhoc. Currently, topics are listed as sections.

Beware of <cr><lf> vs. <lf> line terminators

Some windows editors will use <cr><lf> instead of <lf> to terminate lines. Unix programs brought over under Cygwin can get confused by this. We have definitely seen this messing up environment settings.


Environment variables under Cygwin

Sometimes when using TinyOS under Cygwin there are problems with the environment variables being recognized. One proposed solution is to place the file /etc/profile.d/tinyos-2.x.sh. ie:

cat /etc/profile.d/tinyos-2.x.sh export MAKERULES=`cygpath -w $TOSROOT/support/make/Makerules` export MAKERULES="$MAKERULES:."

<Can someone verify that this works?>


MIB520 and Cygwin serial ports

In Cygwin the serial ports are accessed as /dev/com1 through /dev/com16 or as /dev/ttyS0 through /dev/ttyS15 as on Linux. The comX portion of the name corresponds exactly to the Windows port name or the ttyS0 as a zero based expression of the port number can be used. Thus, to program a Micaz using the Crossbow MIB520 programming board that enumerated as Windows ports COM13 and COM14 type:

make micaz install mib520,/dev/com13

or

make micaz install mib520,/dev/ttyS12

Note that the /dev directory is not populated by Cygwin. This means that listing the /dev directory under Cygwin will not list the available serial ports. However, using either of the above syntaxes will allow access to the ports.