MansOS configuration options

From DiLab
Jump to: navigation, search

Configuration options

These options can be specified in a configuration file. MansOS configuration files are application-specific and should be put in the same directory where the sources and Makefile of an application are located.

Some of these options are interrelated. For example, is USE_NET is set to "y", then values of USE_RADIO and USE_ADDRESSING also will be automatically treated as if they were specified as "y".

System related configuration options

  • USE_THREADS – whether to use experimental multitasking, default n
  • USE_EXP_THREADS – whether to use experimental preemptive multitasking (is goihg to replace the first version), default n
  • USE_FIBERS – whether to use cooperative multitasking, default n
  • USE_HARDWARE_TIMERS – whether MansOS tries to initialize and configure timers offered by mote hardware, default y
  • USE_KERNEL_MAIN – whether MansOS provides main() function in kernel, default y

Component related configuration options

Hardware components

  • USE_SERIAL_NUMBER – whether to use mote's serial number chip (provides unique ID), default n
  • USE_LEDS – whether to use LEDs, default y
  • USE_SERIAL – whether to use serial port, default y
  • USE_HUMIDITY – whether to humidity & temperature sensor, default n
  • USE_ADC – whether to use analog to digital conversion, default y
  • USE_WATCHDOG – whether to include additional watchdog options (e.g. watchdog timer initialization and interrupt handler), default n
  • USE_USER_BUTTON – whether to include support for a button on mote, default n
  • USE_I2C – whether to include I2C protocol code, default n
  • USE_SOFT_I2C – whether to include software I2C protocol code, default n

Software components

  • USE_ALARMS – whether to use software timers ("alarms"), default y
  • USE_PRINT – whether to use printing code, default y
  • USE_DEV – whether to include "device interface" in MansOS (allows to access various components in a generic way), default n
  • USE_CRC – whether to include checksumming code, default y
  • USE_ASSERT – whether to enable ASSERT macro, default y
  • USE_RANDOM – whether to include random number generator, default n

Networking related configuration options

  • USE_RADIO – whether to include radio driver, default y
  • USE_ADDRESSING – whether to include network addressing code (e.g. local 2-byte address initialization), default n
  • USE_NET – whether to include full network stack, default n
  • USE_SMP – whether to include support for sensor management protocol, default n
  • USE_REPROGRAMMING – whether to include support for over-the-air reprogramming, default n

Storage related configuration options

  • USE_FLASH – whether to use internal flash memory, default n
  • USE_EXT_FLASH – whether to use external flash memory, default n
  • USE_EEPROM – whether to use EEPROM, default n
  • USE_SD_CARD – whether to use SD card, default n
  • USE_FS – whether to include filesystem code, default n


  • CFLAGS – compiler flags
    • CFLAGS.<platform>, e.g. CFLAGS.telosb – platform specific compiler flags
  • LDFLAGS – linker flags
    • LDFLAGS.<platform>, e.g. LDFLAGS.telosb – platform specific linker flags
  • DEBUG – if set to y: compile MansOS with extra debugging options (e.g. more verbose output), by default not set
  • OPTIMIZE – if set to y: enable optimizations, by default y
  • CPU_MHZ – CPU speed (if configurable) in MHz
  • MCU_MODEL – the model of the MCU, e.g msp430f1611
  • BAUDRATE – programming baudrate (for atmega-based platforms only)
  • BSL – name of the bootstrap loader program, e.g. tos-bsl
  • BSLPORT – name of the serial port to use when programming, by default: same as BSLPORT environmental variable (set in shell)


  • CONST_CPU_MHZ – same as CPU_MHZ variable, default 4 for Tmote Sky
  • CONST_SERIAL_PORT_BAUDRATE – serial port read/write speed, default 38400
  • CONST_THREAD_STACK_SIZE – stack size used for extra threads (will be reserved in RAM)
  • CONST_NUM_USER_THREADS – the maximal number of user threads (when experimental threads are used), default 1
  • CONST_MAX_KERNEL_SLEEP_TIME – the maximal time kernel spends in low power mode (when experimental threads are used), default: maximum provided by the hardware platform