Real Time Operating Systems (RTOS) for ATmega. An alternative to running on the metal

Similar documents
Microcontrollers and Sensors. Scott Gilliland - zeroping@gmail

Chapter 2: OS Overview

Ways to Use USB in Embedded Systems

Embedded Software Development: Spottbillige Hardware + OSS = Zum Spielen zu Schade!

Mobile Operating Systems Lesson 05 Windows CE Part 1

Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Remote Serial over IP Introduction on serial connections via IP/Ethernet

FLYPORT Wi-Fi G

Going Linux on Massive Multicore

Performance Comparison of RTOS

IRON-HID: Create your own bad USB. Seunghun Han

Kernel comparison of OpenSolaris, Windows Vista and. Linux 2.6

Android, Bluetooth and MIAC

Course Project Documentation

SIP Protocol as a Communication Bus to Control Embedded Devices

Prototyping Connected-Devices for the Internet of Things. Angus Wong

IPv6 Challenges for Embedded Systems István Gyürki

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Data Transfer between Serial Link and TCP/IP Link Using ez80f91 MCU

How to design and implement firmware for embedded systems

REAL TIME OPERATING SYSTEMS. Lesson-10:

Weighted Total Mark. Weighted Exam Mark

Chapter 6, The Operating System Machine Level

Implementation of Wireless Gateway for Smart Home

By GradDip Students: Liam Barrett Mary O Riordan

Arduino Wifi shield And reciever. 5V adapter. Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield:

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

CS414 SP 2007 Assignment 1

TAC XentaTM 555 Embedded Web Server for MicroNet

ANDROID LEVERED DATA MONITORING ROBOT

AT12181: ATWINC1500 Wi-Fi Network Controller - AP Provision Mode. Introduction. Features. Atmel SmartConnect APPLICATION NOTE

Cypress Semiconductor: Arduino Friendly PSoC Shield

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

CGI-based applications for distributed embedded systems for monitoring temperature and humidity

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Atmel AVR4920: ASF - USB Device Stack - Compliance and Performance Figures. Atmel Microcontrollers. Application Note. Features.

Workshop on Android and Applications Development

Smart Thermostat page 1

Design and Development of Suraksha -A Women Safety Device

A New Chapter for System Designs Using NAND Flash Memory

SYSTEM ecos Embedded Configurable Operating System

TOSR0X-D. USB/Wireless Timer Relay Module. User Manual. Tinysine 2013 Version 1.0

Smart Home System Using Android Application

Introduction to Embedded Systems. Software Update Problem

Eight Ways to Increase GPIB System Performance

Open Source building blocks for the Internet of Things. Benjamin Cabé JFokus 2013

MediaQ M310. Quick Start HUAWEI TECHNOLOGIES CO., LTD.

ZigBee Technology Overview

An Embedded Based Web Server Using ARM 9 with SMS Alert System

UG103.8: Application Development Fundamentals: Tools

CGL Architecture Specification

Quectel Wireless Solutions Wireless Module Expert U10 UMTS Module Presentation

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

Wireless Technologies for Automation

S7 for Windows S7-300/400

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22.

Board also Supports MicroBridge

Wireless Microcontrollers for Environment Management, Asset Tracking and Consumer. October 2009

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

Embedded PC The modular Industrial PC for mid-range control. Embedded PC 1

Complete Integrated Development Platform Copyright Atmel Corporation

PikeOS: Multi-Core RTOS for IMA. Dr. Sergey Tverdyshev SYSGO AG , Moscow

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

OPERATING SYSTEMS STRUCTURES

Achieving Real-Time Performance on a Virtualized Industrial Control Platform

securityprobe5es -X20

POSIX. RTOSes Part I. POSIX Versions. POSIX Versions (2)

Simple Cooperative Scheduler for Arduino ARM & AVR. Aka «SCoop»

Survey of software architectures: function-queue-scheduling architecture and real time OS

Android Virtualization from Sierraware. Simply Secure

Priority Inversion Problem and Deadlock Situations

Mobile Devices and Systems Lesson 02 Handheld Pocket Computers and Mobile System Operating Systems

PROFINET the Industrial Ethernet standard. Siemens AG Alle Rechte vorbehalten.

Real-time processing the basis for PC Control

How to Perform Real-Time Processing on the Raspberry Pi. Steven Doran SCALE 13X

Why Threads Are A Bad Idea (for most purposes)

Special FEATURE. By Heinrich Munz

TNT SOFTWARE White Paper Series

Computer and Set of Robots

Hardware/microprocessor Run- time executive (real- time OS, hypervisor, etc.) Web messaging infrastructure

SBC6245 Single Board Computer

Porting ecos to the Analog Devices BLACKfin DSP

The Real-Time Operating System ucos-ii

Virtual Computing and VMWare. Module 4

Tutorial for Programming the LEGO MINDSTORMS NXT

Synapse s SNAP Network Operating System

Eureka Technology. Understanding SD, SDIO and MMC Interface. by Eureka Technology Inc. May 26th, Copyright (C) All Rights Reserved

First-class User Level Threads

UG103.8 APPLICATION DEVELOPMENT FUNDAMENTALS: TOOLS

STLinux Software development environment

Chapter 13 Embedded Operating Systems

What marketing won t tell you about the Internet of Things

Display Message on Notice Board using GSM

A Practical Approach to Education of Embedded Systems Engineering

Virtualization for Cloud Computing

GSM Based Home Automation, Safety and Security System Using Android Mobile Phone

Performance Evaluation of Software Architectures

Building a Basic Communication Network using XBee DigiMesh. Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home

QoS and Communication Performance Management

Transcription:

Real Time Operating Systems (RTOS) for ATmega An alternative to running on the metal

Arduino and the Bootloader Arduino, the ATmega variant with which we are most famliar, lacks an OS Rather, a simple program: Waits for a new incoming sketch over serial. If a new sketch is uploaded, the bootloader loads it into flash memory If no new sketch is received, jumps to memory beyond the bootloader (i.e. the current sketch) and executes it

The Big Loop Once execution moves past the bootloader, the master loop is entered. There is a single thread of execution. Functions that need to be executed in the background can be implemented via ISRs. May be entirely appropriate for certain applications! Ask yourself, Does the app in question need multiple threads of execution? Do I really need a RTOS?

RTOS Advantages Built-in support for threads Though the processor only handles on thing at a time, rapid switching gives the illusion of simultaneous execution Can result in more efficient use of processor time (assuming efficient scheduling) Enables integration of numerous modules. Developers have confidence that threads will be managed efficiently and safely.

RTOS Advantages Threading syntactically more accessible to developers, who may be intimidated / put off by interrupts. Formal prioritization of threading (if present) can ensure high priority threads don t wait on those that are less important

RTOS Disadvantages Memory Footprint The RTOS and application code for managing threads will, undoubtedly consume extra memory Processor Overhead Incurred during thread management, etc. Priority Inversion If the RTOS doesn t have built-in prioritization and a mechanism for enforcing it, a higher-priority thread can find itself waiting for one of lower priority

RTOS Disadvantages Deadlock In any multi-threaded system, the danger of deadlocks arising from resource contention is an issue Complexity Coding and debugging can be more difficult when threads are involved Learning curve In addition the programming language, OS-specific calls and syntax must be learned

Possible RTOS Uses in Chess Game Controller to game piece Whether from controller bots or Android handsets, game pieces could have listener threads that wait for movement commands or status inquiries Game piece to game piece As game pieces autonomously negotiate the game board, they might keep a communication channel thread running in order to converse

Embedded RTOS Examples Femto OS http://www.femtoos.org/ Small footprint Wide Atmel support DuinOS RTOS for Arduino Native to Arduino and meant for use in Arduino programming environment Good Code Example using task loops : http://www.arduino.cc/cgi-bin/yabb2/yabb.pl?num=1256745982

Embedded RTOS Examples FreeRTOS http://www.freertos.org/index.html?http://www.freertos.org/a00098.html Boasts support for numerous devices Support for ATMega seems limited Threading Unlimited # of tasks Unlimited # of priorities and flexible assignment Nut/OS http://www.ethernut.de/en/software/index.html Support for numerous ATMega versions Two relevant implementations EtherNut for wired networking BTNut for wireless communication via Bluetooth

Nut/OS Features Multi-threading Cooperative (i.e. non-preemptive) multi-threading Therefore, priority inversion shouldn t be an issue Idle thread is spawned on initialization. Runs concurrently with main routine of application code (which is itself a thread) New threads spawned by call to NutCreateThread Thread synchronization handled by events. Threads can wait on events or wake up other threads by posting events

Nut/OS Features In most cases, access to shared resources does not require locking. Hence, no deadlocking in most cases? Deterministic interrupt latency Responses must occur within strict deadlines Modular Only those features needed for the application are included through libraries. Footprint is thereby minimized.

Nut/OS Features Driver support for a number of devices, including: Ethernet Multimedia / SD Cards I/R Remote Controls Serial Flash Memory UART Devices Character Displays - Direct hardware access and native interrupts are also possible Advertised support for: ATmega103 ATmega2561 ATmega128 AT90CAN128 Numerous non-atmega micros, and even the Game Boy Advance

Nut / OS Features File Systems UROM Stores files in C arrays that are linked to the application code PHAT Compatible with FAT 12/16/32 file systems UFLASH Optimized for serial flash chips

Nut / OS Features TCP/IP Stack Feature rich, containing support for DHCP DNS FTP HTTP SMTP SNMP SNTP syslog Network communication accomplished through familiar syntax, including fprintf, fscanf, fgetc, etc.

Nut/OS Implementation - Ethernut Ethernut is an Open Source Hardware and Software Project for building tiny Embedded thernet Devices. 4 Hardware versions http://www.ethernut.de/en/hardware/ethernuts.html Overview (including Pros and Cons of Nut/OS) http://www.ethernut.de/en/

Nut/OS Extension-BTNut Extends Nut/OS with Bluetooth stack Bluetooth used for communication between sensors in a sensor array Website: http://www.btnode.ethz.ch/static_docs/doxygen/btnu t/