$TOSDIR = $ENV{"TOSDIR"} if defined($ENV{"TOSDIR"});
$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 {
$platform = "platforms";
$TOSDIR = $1;
$strip = 1;
}
+ elsif (/^-tosscheduler=(.*)/) {
+ $scheduler = $1;
+ $strip = 1;
+ }
elsif (/^-nostdinc$/) {
$nostdinc = 1;
}
}
}
+if (!defined $scheduler && !$is_tos_1) {
+ $scheduler = "TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask";
+}
+
if ($print_target) {
print $target, "\n";
exit 0;
unshift @new_args, "-DPLATFORM_\U$target";
push @new_args, @opts;
+if(!$is_tos_1) {
+ unshift @new_args, "-fnesc-scheduler=$scheduler";
+}
# old nesdoc: set the default topdir based on TOSDIR
my ($tosparent) = ($TOSDIR =~ m!^(.*)/.*?$!);