Skip to main content
  • Products
  • Evaluate our Software
  • Downloads
  • Free Utilities
  • Purchase
  • Support
  • About Us
  • Blog
  • Forum
  • Search
    • Contact Us
    • Forum
    • Wiki
    • Web Shop
    • Newsletter
    • RSS
  •   Jobs
  •   Videos
  •   Blog
  •   Sustainability
  • embOS
  • embOS sample application
  • Editions
  • Technology
  • Supported Cores / Compiler
  • Tools
SEGGER - RTOS embOS Product Icon

embOS — Sample application & ease of use

The following example shows the ease of use of embOS.

Easy usage

The two tasks are activated and execute until they run into the delay, then suspend for the specified time and eventually continue execution.
You can write programs just as you always did, the only difference being that multiple programs run quasi-simultaneously.

#include "RTOS.h"

static OS_STACKPTR int StackHP[128], StackLP[128];  // Task stacks
static OS_TASK         TCBHP, TCBLP;                // Task-control-blocks

static void HPTask(void) {
  while (1) {
    OS_TASK_Delay(50);
  }
}

static void LPTask(void) {
  while (1) {
    OS_TASK_Delay(200);
  }
}

int main(void) {
  OS_Init();    // Initialize OS
  OS_InitHW();  // Initialize Hardware for OS
  OS_TASK_CREATE(&TCBHP, "HP Task", 100, HPTask, StackHP);
  OS_TASK_CREATE(&TCBLP, "LP Task",  50, LPTask, StackLP);
  OS_Start();   // Start multitasking
  return 0;
}

More Information

Purchase

  • Pricing

Editions

  • embOS
  • embOS-Ultra
  • embOS-MPU
  • embOS-Safe

Technology

  • embOS sample application
  • Resource usage
  • Performance
  • Zero Interrupt Latency
  • Tickless Support
  • Cycle Precise System Time
  • Arm TrustZone

Supported Cores / Compiler

  • embOS Ports overview

Tools

  • SystemView
  • embOSView
  • Simulation

About us

  • The Company
  • Partners
  • Job Offers
  • Media
  • Contact us

Support

  • Technical Support
  • Blog
  • Forum
  • Wiki

Downloads

  • Application Notes
  • Embedded Studio
  • embOS
  • emCompress
  • emCrypt
  • emFile
  • emLib
  • emLoad
  • emModbus
  • emNet
  • emPower
  • emSecure
  • emSSH
  • emSSL
  • emUSB-Device
  • emUSB-Host
  • emVNC
  • emWin
  • Flasher
  • Free Utilities
  • IoT
  • J-Link / J-Trace
  • Linux Studio
  • SystemView
  • CE / REACH

Social Media

Headquarters

SEGGER Microcontroller GmbH

Ecolab-Allee 5
40789 Monheim am Rhein, Germany
info@segger.com
Tel.: +49-2173-99312-0
Fax: +49-2173-99312-28

Locations

USA: SEGGER Microcontroller Systems LLC

Boston area
101 Suffolk Lane
Gardner, MA 01440, USA
us-east@segger.com
Tel.: +1-978-874-0299
Fax: +1-978-874-0599

Silicon Valley
Milpitas, CA 95035, USA
us-west@segger.com
Tel.: +1-408-767-4068

China: SEGGER Microcontroller China Co., Ltd.

Room 218, Block A, Dahongqiaoguoji
No. 133 Xiulian Road
Minhang District, Shanghai 201199, China
china@segger.com
Tel.: +86-133-619-907-60

ISO 9001 certified

ISO 9001

30+ years of experience

First-class embedded software tools since 1992
  • Imprint
  • Disclaimer
  • Privacy Policy

© 2022 SEGGER - All rights reserved.