Difference between revisions of "The simplest TinyOS program"

From TinyOS Wiki
Jump to: navigation, search
Line 1: Line 1:
 
There is some value in knowing the the simplest code that can be compiled without errors. The C equivalent is
 
There is some value in knowing the the simplest code that can be compiled without errors. The C equivalent is
  
<code> <code>
+
<code>
  
 
int main () {
 
int main () {
Line 7: Line 7:
 
}
 
}
 
</code>
 
</code>
 +
 +
which is written in a file, say, simple.c and compiled with the command
 +
<code bash>
 +
user@host$ gcc test.c
 
</code>
 
</code>
 +
 +
which produces the executable file <tt>a.out</tt>, which of course does nothing!

Revision as of 20:57, 9 September 2008

There is some value in knowing the the simplest code that can be compiled without errors. The C equivalent is

int main () {

  return 0;

}

which is written in a file, say, simple.c and compiled with the command user@host$ gcc test.c

which produces the executable file a.out, which of course does nothing!