[Tinyos-2-commits] CVS: tinyos-2.x/tools/tinyos/ncc ncc.1, 1.3,
1.4 ncc.in, 1.3, 1.4
Kevin Klues
klueska at users.sourceforge.net
Thu Jan 17 15:19:01 PST 2008
Update of /cvsroot/tinyos/tinyos-2.x/tools/tinyos/ncc
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv26868/tools/tinyos/ncc
Modified Files:
ncc.1 ncc.in
Log Message:
Added functionality for setting the TOS scheduler via flag to ncc. Updated .platform files to be backwards compatible, but by default no longer explicitly set the -fnesc-scheduler-flag unless using an older version of ncc
Index: ncc.1
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tools/tinyos/ncc/ncc.1,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ncc.1 11 Apr 2007 21:36:53 -0000 1.3
--- ncc.1 17 Jan 2008 23:18:59 -0000 1.4
***************
*** 46,49 ****
--- 46,65 ----
TinyOS directory.
.TP
+ \fB-tosscheduler=\fIcomponent,unique-string,interface-name,interface-definition,run-event,post-command\fR
+ By default, nesC compiles uses of \fBtask void\fR \fItaskname\fR\fB() ...\fR to \fBvoid\fR
+ \fItaskname\fR\fB()\fR,
+ and \fBpost\fR \fItaskname\fR\fB()\fR to \fBTOS_post\fR\fB(\fR\fItaskname\fR\fB)\fR.
+ .IP
+ With this option, each task gets its own \fIinterface-definition\fR interface,
+ the task implementation is transformed into a \fIrun-event event\fR and posts becomes a
+ call to the \fIpost-command\fR command. This per-task interface is automatically
+ connected to the parameterised \fIinterface-name\fR interface of scheduler
+ \fIcomponent\fR component. The parameter id for the connection is chosen with
+ \fBunique\fR("\fIunique-string\fR").
+ .IP
+ If this option is not set explicity, its parameters are assigned by default as follows:
+ .IP
+ -tosscheduler=\fITinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask\fR
+ .TP
\fB-tossim\fR
Compile for the TOSSIM environment rather than a native platform. Every
Index: ncc.in
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tools/tinyos/ncc/ncc.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ncc.in 11 Apr 2007 21:36:53 -0000 1.3
--- ncc.in 17 Jan 2008 23:18:59 -0000 1.4
***************
*** 15,22 ****
--- 15,25 ----
$nescc = "@nescc_prefix@/bin/nescc";
$tossim = 0;
+ $is_tos_1 = 0;
+ $with_scheduler_flag = 1;
# Support platform directory renaming for 2.x
if (-d "$TOSDIR/platform") {
$platform = "platform";
+ $is_tos_1 = 1;
}
else {
***************
*** 39,42 ****
--- 42,49 ----
$strip = 1;
}
+ elsif (/^-tosscheduler=(.*)/) {
+ $scheduler = $1;
+ $strip = 1;
+ }
elsif (/^-nostdinc$/) {
$nostdinc = 1;
***************
*** 114,117 ****
--- 121,128 ----
}
+ if (!defined $scheduler && !$is_tos_1) {
+ $scheduler = "TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask";
+ }
+
if ($print_target) {
print $target, "\n";
***************
*** 203,206 ****
--- 214,220 ----
push @new_args, @opts;
+ if(!$is_tos_1) {
+ unshift @new_args, "-fnesc-scheduler=$scheduler";
+ }
# old nesdoc: set the default topdir based on TOSDIR
More information about the Tinyos-2-commits
mailing list