Skip to content

Contiki Build System

mohlatif edited this page Mar 25, 2014 · 4 revisions

Table of Contents

Make Targets

All Platforms / General

Also see ./README-BUILDING in source distribution.

Defines

  • TARGET: The target plattform (e.g. sky) - see savetarget
  • DEFINES: allows to set arbitrary variables for the C preprocessor in form of a comma-separated list. DEFINES=MYTRACE,MYVALUE=4711 - see savedefines
  • CONTIKI_SOURCEFILES: Files to add to the Contiki library
  • PROJECT_SOURCEFILES: Project files. These will be added to the final binary
  • CONTIKIDIRS: Folders to search source files
  • APPS: Applications to include
  • CFLAGS: The classic make CFLAGS

Targets

  • targets: List possible target platforms.
  • savetarget: Saves the current TARGET to Makefile.target
  • savedefines: Saves the current DEFINES to Makefile.$(TARGET).defines
  • %.ramprof
  • %.flashprof
  • serialview
  • serialdump
  • linslip
  • winslip
  • sizeplot

Sky

Defines

  • MOTE: Index of sky-motes to apply the action. E.g. make f.upload MOTE=1
  • MOTES: When also setting MOTELIST this can be used to pass tty-devices on which to apply the action. (This should probably be cleaned up.)

Targets

  • %.upload
  • motelist: List Motes
  • sky-motes: List /dev/tyy* that will be used - See MOTES
  • login: Open Console to Mote make login MOTES=/dev/ttyUSB0 or make login MOTE=1
  • serialview: Like login, but adds a timestamp
  • serialdump: Like serialview, but also writes output to a serialdump- file.
  • sky-reset: Reset Motes
  • sky-upload-sequence %.upload: Program all connected motes.
  • sky-reset-sequence: Reset all connected motes.

Other stuff

  • Patch Passing the Reference displayed by motelist to MOTEIDS will automatically limit actions to those motes (E.g. only reflash the sink).
  • Patch allowing to upload different files in the same directory at the same time. Only makes sense with the previous patch.

Configuration

This is uncompleted list of (pre-)compiler flags. To use them you must add

CFLAGS += -D<pre-processor>
flag to your Makefile e.g.
CFLAGS+=-DROUTE_CONF_ENTRIES=20 -DROUTE_CONF_DEFAULT_LIFETIME=240

Alternatively you can use the DEFINES macro:

DEFINES=ROUTE_CONF_ENTRIES=20,ROUTE_CONF_DEFAULT_LIFETIME=240

Network

Routing (e.g. Mesh)

  • ROUTE_CONF_ENTRIES: If you are using bi-directional communication, this should be higher then the number of nodes in your network.
  • ROUTE_CONF_DEFAULT_LIFETIME: Should be higher, than the average time between packets normally sent between nodes.
  • ROUTE_CONF_DECAY_THRESHOLD:

Hardware

UART

  • UART1_CONF_TX_WITH_INTERRUPT: Use Interrupts to transmit data instead of blocking. This may significantly influence performance when using the UART.(Currently applies to msp430/sky and stm32w108.)
  • UART1_CONF_RX_WITH_DMA: Use DMA for RX
Clone this wiki locally