On Oct 17, 2006, at 1:54 AM, Cormac Duffy wrote:

Hi I was wondering if it possible to edit a .target/.extra or similar file to get ncc to search appDir e.g.(blinkk)/sim directory for tossim specific compenents. I know that it does this in the micaz platform directory, but i have no idea what is telling tossim to search sim specific directorys.
if anyone has any clue please let me know
all the best

In TinyOS 1.x or 2.x? In 1.x the "pc" target tells it to search platform/pc rather than platform/somethingelse. In 2.x the "sim" target passes a flag (-tossim) to ncc.

If you look in ncc, passing -tossim does two things:

o Passes -DTOSSIM to the compilation proper, so we have a define if needed
  o Modifies the set of paths specified with -I.

Let's say my set of -I paths looks like this:

-I/opt/tinyos-2.x/tos/platforms/micaz
-I/opt/tinyos-2.x/tos/chips/atm128
-I/opt/tinyos-2.x/tos/lib/serial

(Usually the set of paths is much longer, let's just pretend it's short like this.)

Then -tossim flag makes the set of paths look like this:

-I/opt/tinyos-2.x/tos/platforms/micaz/sim
-I/opt/tinyos-2.x/tos/chips/atm128/sim
-I/opt/tinyos-2.x/tos/lib/serial/sim
-I/opt/tinyos-2.x/tos/lib/tossim
-I/opt/tinyos-2.x/tos/platforms/micaz
-I/opt/tinyos-2.x/tos/chips/atm128
-I/opt/tinyos-2.x/tos/lib/serial

This means that TOSSIM looks in the sim/ subdirectory of each subsystem first. Then it looks in the lib/tossim directory. Then it looks in the specified directories. This search path allows you to write simulation versions of any specific chip subsystem; if there is no chip-specific version, then it defaults to the tossim version, and if there is no tossim version, it defaults to the standard implementation.

Phil

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to