All Projects → MannyPeterson → Helios

MannyPeterson / Helios

Licence: gpl-3.0
The free embedded operating system.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Helios

Distortos
object-oriented C++ RTOS for microcontrollers
Stars: ✭ 354 (+58.74%)
Mutual labels:  operating-system, rtos, embedded
Arduinojson
📟 JSON library for Arduino and embedded C++. Simple and efficient.
Stars: ✭ 5,456 (+2346.64%)
Mutual labels:  arduino, arduino-library, embedded
Zephyr
Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
Stars: ✭ 5,335 (+2292.38%)
Mutual labels:  mcu, rtos, embedded
rnk
rnk is a RTOS targeting ARM architecture.
Stars: ✭ 22 (-90.13%)
Mutual labels:  operating-system, mcu, rtos
Incubator Nuttx Apps
Apache NuttX Apps is a collection of tools, shells, network utilities, libraries, interpreters and can be used with the NuttX RTOS
Stars: ✭ 65 (-70.85%)
Mutual labels:  mcu, rtos, embedded
apex
Apex RTOS - A (somewhat) Linux compatible real time operating system
Stars: ✭ 15 (-93.27%)
Mutual labels:  embedded, operating-system, rtos
Platformio Core
PlatformIO is a professional collaborative platform for embedded development 👽 A place where Developers and Teams have true Freedom! No more vendor lock-in!
Stars: ✭ 5,539 (+2383.86%)
Mutual labels:  arduino, avr, embedded
ez-rtos
A micro real-time operating system supporting task switching, delay function, memory allocator and critical section. It is writen on ARM Cortex-M3 assemble language, it runs successfully on STM32F103 MCU.
Stars: ✭ 57 (-74.44%)
Mutual labels:  operating-system, mcu, operating-systems
Easyntpclient
Library to read time from Network Time Protocol (NTP) servers.
Stars: ✭ 20 (-91.03%)
Mutual labels:  arduino, arduino-library, embedded
Awesome Embedded
A curated list of awesome embedded programming.
Stars: ✭ 831 (+272.65%)
Mutual labels:  rtos, operating-systems, embedded
qp-arduino
QP real-time embedded frameworks/RTOS for Arduino (AVR and SAM)
Stars: ✭ 37 (-83.41%)
Mutual labels:  sam, arduino-library, rtos
Qpn
QP-nano real-time embedded framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
Stars: ✭ 107 (-52.02%)
Mutual labels:  arduino, avr, rtos
DemOS
Free, simple, extremely lightweight, stackless, cooperative, co-routine system (OS) for microcontrollers
Stars: ✭ 18 (-91.93%)
Mutual labels:  avr, operating-system, rtos
Tock
A secure embedded operating system for microcontrollers
Stars: ✭ 3,258 (+1360.99%)
Mutual labels:  mcu, operating-system, embedded
Arduino-GPIO
General Purpose Input/Output (GPIO) library for Arduino
Stars: ✭ 43 (-80.72%)
Mutual labels:  avr, sam, arduino-library
Guislice
GUIslice drag & drop embedded GUI in C for touchscreen TFT on Arduino, Raspberry Pi, ARM, ESP8266 / ESP32 / M5stack using Adafruit-GFX / TFT_eSPI / UTFT / SDL
Stars: ✭ 534 (+139.46%)
Mutual labels:  arduino, arduino-library, embedded
Libhydrogen
A lightweight, secure, easy-to-use crypto library suitable for constrained environments.
Stars: ✭ 247 (+10.76%)
Mutual labels:  arduino, avr, embedded
IntrOS
Free cooperative operating system (OS) for microcontrollers
Stars: ✭ 38 (-82.96%)
Mutual labels:  avr, operating-system, rtos
Incubator Nuttx
Apache NuttX is a mature, real-time embedded operating system (RTOS)
Stars: ✭ 591 (+165.02%)
Mutual labels:  mcu, rtos, embedded
Erika3
ERIKA Enterprise v3 RTOS
Stars: ✭ 98 (-56.05%)
Mutual labels:  arduino, avr, rtos

HeliOS

License: GPL v3 GitHub last commit GitHub release (latest by date) arduino-library-badge GitHub stars GitHub watchers

Overview

HeliOS is an embedded operating system that is free for anyone to use. While called an operating system for simplicity, HeliOS is better described as a multitasking kernel for embedded systems. HeliOS is very small. In fact, it is small enough to run on most 8-bit microcontrollers including the popular AVR based Arduino Uno. Written entirely in C, HeliOS runs on a variety of microcontrollers and integrates easily into any project. HeliOS is also easy to learn with an Application Programming Interface (API) consisting of only 21 function calls. HeliOS contains the following key features:

  • Cooperative Multitasking (Run-time Balanced)
  • Event Driven Multitasking
  • Task Notification/Messaging
  • Timers
  • Managed Memory
  • Non-Preemptive (no mutexs! no deadlocks! no race conditions! no headaches!)

As noted in the key features, HeliOS supports two types of multitasking: cooperative and event driven. Cooperative multitasking embedded operating systems and task schedulers often use a round-robin scheduling strategy. However, HeliOS uses a run-time balanced strategy which ensures tasks with shorter run-times are prioritized over tasks with longer run-times. This ensures all running tasks receive approximately equal total run-time without using context switching. The other multitasking option available in HeliOS is event driven multitasking, which uses the wait/notify and timer interfaces. Mixing cooperative and event driven tasks in HeliOS is not a problem.

Why HeliOS

There are already so many great and proven RTOS and scheduler options available, then why HeliOS? That is certainly a valid question. HeliOS was never intended to replace or compete with the other options already available today (if you have not checked out FreeRTOS - you should, it is nothing short of an amazing RTOS for embedded and is more accessible today than ever before through the Arduino Library Manager). HeliOS, however, due to its size and simplicity, is intended to play in the space between RTOS's and task schedulers. HeliOS is tiny (smaller than FreeRTOS), easy to use and a great place to start for enthusiasts, hobbyists and researchers.

What's Happening

HeliOS is continuously being improved. Development is currently occurring in weekly sprints resulting in a new release at the end of each sprint. This schedule will continue until a substantial portion of the development backlog, which includes improvements to the HeliOS Programmer's Guide, code documentation, additional example sketches and testing, is complete. If you are looking to check-out the latest developments in HeliOS, clone the develop branch. But remember that the source code and documentation in the develop branch is under active development and may contain errors. In the meantime, don't forget to star or watch the HeliOS repository and check back frequently.

Getting Started

Arduino

Because HeliOS is compliant with the Arduino 1.5 (rev. 2.2) Library Specification, getting up and running is quick and easy. HeliOS can be installed directly from the Arduino Library Manager or downloaded and installed manually. Both options are described here. You can also refer to the auto-generated instructions from ArduBadge here. Once up and running, check out one of the example sketches or refer to the HeliOS Programmer's Guide in the Documentation section.

Other Microcontrollers

While built-in support currently only exists for the Arduino AVR, SAM and SAMD architectures, HeliOS is easily ported to a variety of other microcontrollers. Because the project is currently focused on supporting the Arduino community, no plans currently exist for adding built-in support for additional microcontrollers and tool-chains.

Linux & Microsoft Windows

Built-in support exists for building and running HeliOS in user-land on Linux and Microsoft Windows. When running in user-land, HeliOS acts like a threading library for applications. To target Linux or Microsoft Windows, (as shown below) simply un-comment the appropriate C preprocessor directive in the header file HeliOS.h and build using GCC or Microsoft Visual C++. The files needed to build HeliOS in user-land on Linux and Microsoft Windows can be found in extras/linux and extras/windows directories respectively.

/*
 * Un-comment to compile on Linux or Microsoft
 * Windows.
 * #define OTHER_ARCH_LINUX
 * #define OTHER_ARCH_WINDOWS
 */

Documentation

The HeliOS Programmer's Guide is a work in progress. What is available today can be found here. If you are interested in contributing to the HeliOS Programmer's Guide, please see the Contributing section for details.

Example

Many embedded projects on microcontrollers implement what is called a "super loop". A super loop is a loop that never exits (i.e while(1){}) and contains most of the code executed by the microcontroller. The problem with super loops is they can grow out of control and become difficult to manage. This becomes especially challenging given the relatively few options for controling timing (e.g. delay()). Unfortunately the use of delay() to control timing also means the microcontroller is unable to perform other operations (at least without the help of an ISR) until delay() returns. Below is an example of how easy it is to leverage the event driven multitasking capabilities within HeliOS.

Arduino "Blink" Example

Below is a copy of the traditional Arduino "Blink" example code.

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

HeliOS "Blink" Example

Below is the Arduino "Blink" example code implemented using HeliOS. In this example, a HeliOS task, which alternates the microcontroller's GPIO pin state between high and low, is added in a "wait" state and a timer is set instructing HeliOS's scheduler to execute the task every 1,000,000 microseconds. That's it!

/*
 * Include the standard HeliOS header for Arduino sketches. This header
 * includes the required HeliOS header files automatically.
 */
#include <HeliOS_Arduino.h>

/*
 * Declare and initialize an int to maintain the state of
 * the built-in LED.
 */
volatile int ledState = 0;

/*
 * The task definition for taskBlink() which will
 * be executed by HeliOS every 1,000,000 microseconds
 * (1 second).
 */
void taskBlink(xTaskId id_) {
  /*
   * If the state is 0 or LOW then set the state to
   * 1 or HIGH. Likewise, if the state is 1 or HIGH
   * then set the state to LOW.
   */
  if (ledState) {
    /*
     * Set the state of the digital GPIO pin associated
     * with the built-in LED to LOW.
     */
    digitalWrite(LED_BUILTIN, LOW);

    /*
     * Update the int containing the state of the build-in
     * LED accordingly.
     */
    ledState = 0;
  } else {
    /*
     * Set the state of the digital GPIO pin associated
     * with the built-in LED to HIGH.
     */
    digitalWrite(LED_BUILTIN, HIGH);

    /*
     * Update the int containing the state of the built-in
     * LED accordingly.
     */
    ledState = 1;
  }
}

void setup() {
  /*
   * Declare an xTaskId to hold the the task id
   * and initialize.
   */
  xTaskId id = 0;

  /*
   * Call xHeliOSSetup() to initialize HeliOS and
   * its data structures. xHeliOSSetup() must be
   * called before any other HeliOS function call.
   */
  xHeliOSSetup();

  /*
   * Set the mode of the digital GPIO pin associated
   * with the built-in LED to OUTPUT only.
   */
  pinMode(LED_BUILTIN, OUTPUT);

  /*
   * Add the task taskBlink() to HeliOS by passing
   * xTaskAdd() the friendly name of the task as well
   * as a callback pointer to the task function.
   */
  id = xTaskAdd("TASKBLINK", &taskBlink);

  /*
   * Call xTaskWait() to place taskBlink() into a wait
   * state by passing xTaskWait() the task id. A task
   * must be in a wait state to respond to timer events.
   */
  xTaskWait(id);

  /*
   * Set the timer interval for taskBlink() to 1,000,000 microseconds
   * (1 second). HeliOS automatically begins incrementing
   * the timer for the task once the timer interval is set.
   */
  xTaskSetTimer(id, 1000000);
}

void loop() {
  /*
   * Momentarily pass control to HeliOS by calling the
   * xHeliOSLoop() function call. xHeliOSLoop() should be
   * the only code inside of the sketch's loop() function.
   */
  xHeliOSLoop();
}

Releases

All releases, including the current release, can be found here.

  • 0.2.6 - added built-in support for ESP8266 and minor internal updates
  • 0.2.5 - numerous internal enhancements including improved time precision and scheduler now gracefully handles overflow of run-time timer
  • 0.2.4 - additional example Arduino sketches and other code improvements
  • 0.2.3 - Improved protection of system state, new examples, improved code documentation and some maintainability enhancements
  • 0.2.2 - Additional function calls, minor fixes and documentation enhancements
  • 0.2.1 - The first official release

Contributing

While all contributions are welcome, contributions are needed most in the following areas:

  • HeliOS Programmer's Guide
  • Code Documentation, Readability and Maintainability
  • Example Sketches
  • Testing

To contribute, simply create a pull request with your changes. Please fork from the develop branch as master is kept even with the current release. Pull requests are typically responded to within 48 hours.

Thank you

No free and open source software project has been successful without the contributions of many. This space is reserved for recognizing people who have made meaningful contributions to HeliOS. All contributors are listed in alphabetical order.

Also, special thanks to Gil Maimon for the great website ArduBadge.

License & Trademarks

HeliOS is copyrighted open source software licensed under the Free Software Foundation's GNU General Public License Version 3. The license can be found here.

Microsoft Windows and Microsoft Visual C++ are registered trademarks of Microsoft Corporation in the United States and/or other countries.

Important

HeliOS is not certified for use in safety-critical applications. The HeliOS source code, whether in full or in part, must never be used in applications where a risk to life exists.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].