[Tinyos-devel] Changing the TOS scheduler
David Gay
dgay42 at gmail.com
Mon Jan 14 14:30:02 PST 2008
On Jan 14, 2008 1:59 PM, Kevin Klues <klueska at gmail.com> wrote:
> Hi all,
>
> I sent this email a while ago, but it was just before Christmas and it
> probably slipped past most people's radars. Well I guess I got one
> response, but I don't just want to change the implementation of a
> component named TinySchedulerC, I want to change the name of this
> component too. Here is my question again:
>
> Does it make sense to move fnesc-scheduler out of .platform and into
> <platform>.target like so:
> NESC_SCHEDULER_FLAG ?=
> -fnesc-scheduler=TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask
> PFLAGS += NESC_SCHEDULER_FLAG
>
> Currently, this flag is automatically set up with the default TinyOS
> scheduler in the definition of the .platform file for each platform.
> My question then is how to change the scheduler without modifying the
> .platform file directly.
>
> I originally thought to add ' -fnesc-scheduler= ' to the PFLAGS
> variable in my application Makefile, but the one defined in the
> .platform file simply overrides it.
>
> Is there some other way to currently achieve the same result that I am
> somehow not immediately seeing?
I think it's a bad (very bad) idea to put flags necessary for correct
compilation into the build system. Using the build system should not
be a requirement.
If you want to be able to change the scheduler component name, add an
option to ncc and use that in the -fnesc-scheduler= options.
FWIW, the -fnesc-scheduler= option should probably move into ncc.in,
as it's the same on all 2.x platforms (I think it was in .platform as
it was an easy way to get the 1.x/2.x difference in there, but there's
already a 1.x vs 2.x test in ncc.in at the beginning where it
differentiates between $TOSDIR/platform (1.x) and $TOSDIR/platforms
(2.x))
David
David
More information about the Tinyos-devel
mailing list