The Sensor Network Museumtm - TinyOS 2.x Knowledge Base
Other than the support resources on http://www.tinyos.net we want to create a knowledge base specific to MICS application/platform projects and TinyOS 2.x. For general discussion, please use the mailing list specified below and/or browse and contribute to the wiki pages.
Mailing List
TinyOS 2.x - Installation
DSNMonitor
How to compile TinyOS 2.0 applications with the experimental LPL CC2420 stack
The LPL components are used when adding following definitions to the application (either via Makefile or in a header file):
- LOW_POWER_LISTENING
- DEFAULT_DUTY_PERIOD=x, x stands for the duty cycling period and is given in ms
Additionally there has to be specified this directory for includes:
- %T/chips/cc2420_lpl
This can be achieved with following line added to your Makefile:
-I%T/chips/cc2420_lpl -DLOW_POWER_LISTENING -DDEFAULT_DUTY_PERIOD=250
The source code of your application has to be changed slightly (wiring interface LowPowerListening)
interface LowPowerListening { command void setLocalSleepInterval(uint16_t sleepIntervalMs); command uint16_t getLocalSleepInterval(); command void setLocalDutyCycle(uint16_t dutyCycle); command uint16_t getLocalDutyCycle(); command void setRxSleepInterval(message_t *msg, uint16_t sleepIntervalMs); command uint16_t getRxSleepInterval(message_t *msg); command void setRxDutyCycle(message_t *msg, uint16_t dutyCycle); command uint16_t getRxDutyCycle(message_t *msg); command uint16_t dutyCycleToSleepInterval(uint16_t dutyCycle); command uint16_t sleepIntervalToDutyCycle(uint16_t sleepInterval); }
How use GDB with Eclipse and Tmote Sky
- Connect the MSP-FET to the JTAG socket of the Tmote sky
- run GDB-Proxy
msp430-gdbproxy msp430 TIUSB
this will create a proxy that is listening on port 2000 (for the USB FET)
- open eclipe (tested with Eclipse 3.2)
- compile your tinyos program with the -g flag in order to include debug information
CFLAGS += -g
- create a new debug configuration by clicking the bug symbol. The needed properties are shown in following screenshots
- and the content of the .gdbinit-tmote file:
target remote <your host>:2000
- now you can start debugging by clicking on debug