WSim is a full platform simulator/emulator. The purpose of WSim is to have a precise hardware model on which we can run the full binary that could be used otherwise to flash the target. This precision level allows WSim to gather precise performance data on the code it runs including mechanisms like software frequency scaling, peripheral and interrupt latencies, precise power consumption, etc. The result of the simulation is precise with regards to the target device assembly instructions so that a precise observation of the embedded software can be build from the simulation.

TOSSIM relies on . This means that the application TinyOS code is compiled for the machine TOSSIM runs on. Target specific modules like hardware drivers in the TinyOS component hierarchy are replaced at compile time by native modules that will simulate peripherals at the TinyOS API level. This simulation level implies that the real target binary is not generated. TOSSIM is thus limited to functional simulation and has a very limited feedback for performance and precise timings within the simulation. However, since the simulation is simpler than using WSim it is also faster.

From the programmers' point of view, especially while debuging applications, WSim and TOSSIM are quite different in what we can observe at the TinyOS component level interface. TOSSIM simulates components behavior and gives back information at the TinyOS programming. WSim, in contrast, uses assembly instruction and provides feedback at C source level (the app.c file generated by nesc). Although TinyOS includes compiler helpers to go back from the app.c to TinyOS components we do not use this feature in this tutorial and we will present how to debug TinyOS application starting from app.c file.