You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Jon Thacker e0365e0bf9 atmega: use software interrupt for context swap
Fixes #5745
For AVR based boards, three defines must be defined AVR_CONTEXT_SWAP_INIT,
These defines are used to trigger a software interrupt used for context

When AVR_CONTEXT_SWAP_INTERRUPT_VECT is handled, the scheduler is run
and a context swap will happen if necessary, with the resulting thread
starting following the reti instruction. This results in threads running
at normal priority instead of at interrupt priority.

Atmega devices do provide a pure software interrupt. The method used
here for waspmote-pro and arduino-mega2560 is to use pin change
interrupts, set the pin to act as an output, and toggle the value to
simulate a software interrupt. The main limitation here is that a
physical pin is now occupied and must be defined for each board
supported by RIOT. On the plus side, it provides an easy method for
detecting context swaps with an oscilloscope.
7 years ago
boards atmega: use software interrupt for context swap 7 years ago
core core: sched: mark sched_run() as used 7 years ago
cpu atmega: use software interrupt for context swap 7 years ago
dist Merge pull request #5784 from PeterKietzmann/tools_update_cc2538-bsl 7 years ago
doc Merge pull request #5397 from OTAkeys/pr/stm32f2xx 7 years ago
drivers drivers: mag3110: fix typo in header description 7 years ago
examples gnrc_border_router: use script as for term target 7 years ago
pkg tiny-asn1: Created new package `tiny-asn1` 7 years ago
sys Merge pull request #5765 from zhuoshuguo/revise_sys_embunit_header_include_guards 7 years ago
tests tiny-asn1: Created new package `tiny-asn1` 7 years ago
.drone.yml drone: added Drone file 9 years ago
.gitattributes git: handle patch files as binary 8 years ago
.gitignore gitignore: add __pycache__ 8 years ago
.travis.yml ci: split up cortex_m4 in even more groups 8 years ago Update 9 years ago
LICENSE * updated LICENSE file from GPL to LPGL 10 years ago
Makefile doxygen: add make targets to build man and latex 8 years ago
Makefile.application tests: make embUnit a normal sys module 9 years ago
Makefile.base make: allow per-file conditional LTO compile 7 years ago
Makefile.bindist make: add bindist targets / Makefiles 8 years ago
Makefile.buildtests make: buildtest: pass GIT_CACHE_DIR to buildtest targets 8 years ago
Makefile.cflags Makefile.cflags: Make LTO a warning instead of info 7 years ago
Makefile.defaultmodules core: make messaging optional 8 years ago
Makefile.dep emb6: remove double inclusion in Makefile.dep 7 years ago
Makefile.docker Makefile.docker: Add tests-% as possible makefile goals 7 years ago
Makefile.include Merge pull request #5248 from cgundogan/pr/make/buildrelpath 7 years ago
Makefile.modules make: treat packages like modules when it comes to linking 7 years ago
Makefile.pseudomodules core: mbox: introduce thread decoupled message queues 7 years ago
Makefile.scan-build make: enable `assert()` in `make scan-build` 8 years ago
Makefile.vars make: allow per-file conditional LTO compile 7 years ago Merge pull request #5547 from OlegHahm/gcc6_readme_note 7 years ago
Vagrantfile vagrant: use ubuntu 16.04 LTS 7 years ago
doc.txt doc: enable helper macros for doxygen 9 years ago
release-notes.txt RELEASE 2016.07 7 years ago
uncrustify-riot.cfg Merge pull request #4481 from authmillenon/uncrustify/enh/ignore-return-parens 8 years ago

                 ZZZZZZZ     ZZZZZZ
                ZZZZZZ        ZZZZZ
                ZZZZZ          ZZZZ
                ZZZZ           ZZZZZ
                ZZZZ           ZZZZ
                ZZZZ          ZZZZZ
                ZZZZ        ZZZZZZ
                ZZZZ     ZZZZZZZZ       777        7777       7777777777
          ZZ    ZZZZ   ZZZZZZZZ         777      77777777    77777777777
      ZZZZZZZ   ZZZZ  ZZZZZZZ           777     7777  7777       777
    ZZZZZZZZZ   ZZZZ    Z               777     777    777       777
   ZZZZZZ       ZZZZ                    777     777    777       777
  ZZZZZ         ZZZZ                    777     777    777       777
 ZZZZZ          ZZZZZ    ZZZZ           777     777    777       777
 ZZZZ           ZZZZZ    ZZZZZ          777     777    777       777
 ZZZZ           ZZZZZ     ZZZZZ         777     777    777       777
 ZZZZ           ZZZZ       ZZZZZ        777     777    777       777
 ZZZZZ         ZZZZZ        ZZZZZ       777     777    777       777
  ZZZZZZ     ZZZZZZ          ZZZZZ      777     7777777777       777
   ZZZZZZZZZZZZZZZ            ZZZZ      777      77777777        777
     ZZZZZZZZZZZ               Z

The friendly Operating System for IoT!

RIOT is a real-time multi-threading operating system that supports a range of devices that are typically found in the Internet of Things (IoT): 8-bit, 16-bit and 32-bit microcontrollers.

RIOT is based on the following design principles: energy-efficiency, real-time capabilities, small memory footprint, modularity, and uniform API access, independent of the underlying hardware (this API offers partial POSIX compliance).

RIOT is developed by an international open source community which is independent of specific vendors (e.g. similarly to the Linux community). RIOT is licensed with LGPLv2.1, a copyleft license which fosters indirect business models around the free open-source software platform provided by RIOT, e.g. it is possible to link closed-source code with the LGPL code.


RIOT is based on a microkernel architecture, and provides features including, but not limited to:

  • a preemptive, tickless scheduler with priorities
  • flexible memory management
  • high resolution, long-term timers
  • support for AVR, MSP430, ARM7, and ARM Cortex-M on over 50 boards
  • the native port allows to run RIOT as-is on Linux, BSD, and MacOS. Multiple instances of RIOT running on a single machine can also be interconnected via a simple virtual Ethernet bridge
  • IPv6
  • 6LoWPAN (RFC4944, RFC6282, and RFC6775)
  • UDP
  • RPL (storing mode, P2P mode)
  • CoAP
  • CCN-Lite



  • With latest GCC version (>= 6) platforms based on some ARM platforms will raise some warnings, leading to a failing build (see As a workaround, you can compile with warnings not being treated as errors: WERROR=0 make


If you compile RIOT for the native cpu and include the netdev2_tap module, you can specify a network interface like this: PORT=tap0 make term


There is a shellscript in RIOT/dist/tools/tapsetup called tapsetup which you can use to create a network of tap interfaces.

USAGE To create a bridge and two (or count at your option) tap interfaces:

./dist/tools/tapsetup/tapsetup [-c [<count>]]


To contribute something to RIOT, please refer to the development procedures and read all notes for best practice.



  • Most of the code developed by the RIOT community is licensed under the GNU Lesser General Public License (LGPL) version 2.1 as published by the Free Software Foundation.
  • Some external sources, especially files developed by SICS are published under a separate license.

All code files contain licensing information.

For more information, see the RIOT website: