Convert Figma logo to code with AI

tinyos logotinyos-main

Main development repository for TinyOS (an OS for embedded, wireless devices).

1,400
516
1,400
108

Top Related Projects

Contiki-NG: The OS for Next Generation IoT Devices

4,911

RIOT - The friendly OS for IoT

10,675

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.

'Classic' FreeRTOS distribution. Started as Git clone of FreeRTOS SourceForge SVN repo. Submodules the kernel.

Quick Overview

TinyOS is an open-source operating system designed for low-power wireless devices, such as sensor networks, wearables, and Internet of Things (IoT) applications. It provides a component-based architecture, a C-based programming language, and a rich set of libraries and tools for developing embedded systems.

Pros

  • Lightweight and Efficient: TinyOS is designed to be highly efficient, with a small memory footprint and low power consumption, making it suitable for resource-constrained devices.
  • Component-based Architecture: TinyOS follows a component-based design, allowing developers to easily compose and reuse software modules, improving code maintainability and flexibility.
  • Extensive Ecosystem: The TinyOS community has developed a wide range of libraries and tools, providing a rich ecosystem for developers to build upon.
  • Cross-platform Compatibility: TinyOS supports multiple hardware platforms, including popular microcontrollers and wireless chips, enabling code portability.

Cons

  • Steep Learning Curve: Developing with TinyOS can have a steep learning curve, especially for developers unfamiliar with its component-based programming model and the NesC language.
  • Limited Documentation: The documentation for TinyOS can be sparse in some areas, making it challenging for new users to get started and troubleshoot issues.
  • Declining Community Activity: The TinyOS project has seen a decline in community activity and contributions in recent years, which may impact its long-term sustainability and support.
  • Limited Commercial Adoption: Compared to other embedded operating systems, TinyOS has not gained widespread commercial adoption, which could limit its ecosystem growth and industry support.

Code Examples

N/A (TinyOS is not a code library)

Getting Started

N/A (TinyOS is not a code library)

Competitor Comparisons

Contiki-NG: The OS for Next Generation IoT Devices

Pros of Contiki-NG

  • Improved Networking Capabilities: Contiki-NG offers enhanced networking features, including support for IPv6, 6LoWPAN, and RPL, making it more suitable for modern IoT and low-power wireless applications.
  • Active Community and Development: Contiki-NG has an active community of contributors and developers, ensuring regular updates, bug fixes, and feature enhancements.
  • Modular Design: Contiki-NG's modular design allows for easier customization and integration of specific components, enabling developers to tailor the system to their needs.

Cons of Contiki-NG

  • Steeper Learning Curve: Contiki-NG may have a slightly steeper learning curve compared to TinyOS, especially for developers new to embedded systems and low-power wireless programming.
  • Limited Hardware Support: While Contiki-NG supports a wide range of hardware platforms, the TinyOS ecosystem may offer a broader selection of supported devices.
  • Potential Compatibility Issues: Transitioning from TinyOS to Contiki-NG may require more effort in terms of porting existing applications and ensuring compatibility.

Code Comparison

Here's a brief comparison of the code structure and syntax between TinyOS and Contiki-NG:

TinyOS (tinyos/tinyos-main):

module BlinkC {
  uses interface Timer<TMilli> as Timer0;
  uses interface Leds;

  event void Timer0.fired() {
    call Leds.led0Toggle();
  }
}

Contiki-NG (contiki-ng/contiki-ng):

PROCESS(blink_process, "Blink Process");
AUTOSTART_PROCESSES(&blink_process);

PROCESS_THREAD(blink_process, ev, data)
{
  PROCESS_BEGIN();

  while(1) {
    PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
    leds_toggle(LEDS_ALL);
    etimer_reset(&et);
  }

  PROCESS_END();
}

The key differences are the use of modules and interfaces in TinyOS, compared to the process-based approach in Contiki-NG. Both examples demonstrate the basic functionality of toggling an LED, but the underlying implementation and event handling mechanisms differ between the two frameworks.

4,911

RIOT - The friendly OS for IoT

Pros of RIOT-OS/RIOT

  • Modular Design: RIOT-OS/RIOT has a highly modular design, allowing developers to easily customize and extend the operating system to fit their specific needs.
  • Cross-Platform Compatibility: RIOT-OS/RIOT supports a wide range of hardware platforms, including 8-bit, 16-bit, and 32-bit microcontrollers, making it a versatile choice for IoT and embedded systems.
  • Real-Time Capabilities: RIOT-OS/RIOT provides real-time capabilities, making it suitable for applications that require deterministic and low-latency performance.

Cons of RIOT-OS/RIOT

  • Smaller Community: Compared to tinyos/tinyos-main, RIOT-OS/RIOT has a smaller community, which may result in fewer available resources and a slower pace of development.
  • Limited Documentation: The documentation for RIOT-OS/RIOT, while improving, may not be as comprehensive as the documentation for tinyos/tinyos-main.
  • Fewer Supported Platforms: While RIOT-OS/RIOT supports a wide range of platforms, it may not have the same level of support for legacy or niche hardware as tinyos/tinyos-main.

Code Comparison

Here's a brief code comparison between the two repositories:

tinyos/tinyos-main

module BlinkC {
  uses interface Timer<TMilli> as Timer0;
  uses interface Leds;
}

implementation {
  event void Timer0.fired() {
    call Leds.led0Toggle();
  }

  event void Boot.booted() {
    call Timer0.startPeriodic(1000);
  }
}

RIOT-OS/RIOT

#include "board.h"
#include "periph/gpio.h"

int main(void)
{
    gpio_init(LED0_PIN, GPIO_OUT);

    while (1) {
        gpio_toggle(LED0_PIN);
        xtimer_sleep(1);
    }

    return 0;
}

Both code snippets demonstrate a simple LED blinking application, but the RIOT-OS/RIOT version uses a more low-level approach, directly interacting with the GPIO peripheral, while the tinyos/tinyos-main version utilizes the Timer and Leds interfaces provided by the TinyOS framework.

10,675

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.

Pros of Zephyr

  • Broader Hardware Support: Zephyr supports a wide range of hardware platforms, including ARM, x86, RISC-V, and more, making it a more versatile choice for embedded development.
  • Active Community and Development: Zephyr has a large and active community, with regular updates and contributions from a diverse group of developers.
  • Comprehensive Documentation: Zephyr's documentation is extensive and well-maintained, providing detailed guidance for developers.

Cons of Zephyr

  • Steeper Learning Curve: Zephyr's feature-rich nature and complex architecture can make it more challenging for beginners to get started compared to TinyOS.
  • Larger Codebase: Zephyr's codebase is significantly larger than TinyOS, which may result in a higher memory footprint for some embedded systems.
  • Limited Support for Legacy Hardware: Zephyr may not provide the same level of support for older or legacy hardware platforms as TinyOS.

Code Comparison

Here's a brief comparison of the code structure between the two projects:

TinyOS (tinyos/tinyos-main):

configuration MainC {
  provides interface Boot;
}
implementation {
  components PlatformC, LedsC, MainC;
  Boot = MainC;
  MainC.PlatformInit -> PlatformC.PlatformInit;
  MainC.SoftwareInit -> LedsC;
}

Zephyr (zephyrproject-rtos/zephyr):

#include <zephyr.h>
#include <device.h>
#include <drivers/gpio.h>

void main(void) {
  const struct device *dev;
  dev = device_get_binding(DT_LABEL(DT_NODELABEL(led0)));
  gpio_pin_configure(dev, 0, GPIO_OUTPUT_ACTIVE | GPIO_PULL_UP);
  while (1) {
    gpio_pin_toggle(dev, 0);
    k_msleep(500);
  }
}

'Classic' FreeRTOS distribution. Started as Git clone of FreeRTOS SourceForge SVN repo. Submodules the kernel.

Pros of FreeRTOS

  • FreeRTOS is a widely-used, mature, and well-documented real-time operating system (RTOS) that is suitable for a wide range of embedded systems.
  • It has a large and active community, with extensive support and resources available.
  • FreeRTOS is highly configurable and can be tailored to the specific requirements of a project.

Cons of FreeRTOS

  • FreeRTOS is primarily focused on real-time applications, which may not be the primary concern for some embedded systems.
  • The learning curve for FreeRTOS can be steeper than that of TinyOS, especially for developers new to RTOS concepts.
  • FreeRTOS is a commercial product, and while a free version is available, some advanced features may require a paid license.

Code Comparison

TinyOS (tinyos/tinyos-main):

void main() {
  call Boot.booted();
  while (1) {
    call Timer.startPeriodic(TIMER_PERIOD_MILLI);
    call Leds.led0Toggle();
    call Leds.led1Toggle();
    call Leds.led2Toggle();
    wait_for_interrupt();
  }
}

FreeRTOS (FreeRTOS/FreeRTOS):

void vApplicationIdleHook( void )
{
    /* vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set
    to 1 in FreeRTOSConfig.h. It will be called on each iteration of the idle
    task. It is essential that code added to this hook function never attempts
    to block in any way (for example, call xQueueReceive() with a block time
    specified, or perform a wait on a semaphore). If the application makes
    use of the vTaskDelete() API function (as this demo application does)
    then it is also important that vApplicationIdleHook() is permitted to return
    to its calling function, because it is the responsibility of the idle task
    to clean up memory allocated by the scheduler to any tasks that have since
    been deleted. */
}

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README


HI! Hey, now that I've got your attention. Active development is occurring at https://github.com/tp-freeforall/prod aka gh:tp-freeforall/prod.

We are transitioning the tinyprod/tp-freeforall code into a mainline tinyos/tinyos-<something> repository. The plan is to archive the current tinyos-main tree as tinyos-archive. The new repo will be available under the tinyos organization with a tinyos-* repository name.

SO. If you are actively using tinyos-main please let me know. I do not want to yank things out from underneath you or annoy anyone unnecessarily.

(cire831@gmail.com)

Transition plan: (approximate plan)

  • Advance gh:tp-freeforall/prod from its upstream tracking repo gh:tinyos/tinyos-main

  • Clean up current gh:tp-freeforall/prod repository. Inactive platforms will be deprecated. These are platforms that have been added to the tp-freeforall/prod repo but are no longer active. This will clean up the tp-freeforall/prod mainline.

  • The cleaned up tp-freeforall/prod repository will REPLACE the tinyprod/prod repository outright. This will establish the proposed replacement for the existing tinyos/tinyos-main repository. If you want to get a taste of what the replacement will look like BEFORE the swap actually takes place, this is the place to do it.

  • Verify proposed repository. (new tinyprod/prod)

  • Move existing tinyos/tinyos-main to tinyos/tinyos-archive.

  • Install tinyprod/prod as new tinyos/tinyos-cur. (note the name tinyos/tinyos-main is being deprecated to avoid old references hitting the new repository).

  • Establish updated release repository from tinyos/tinyos-cur. tinyos/tinyos-rel.

  • Establish new working development repository, tinyos/tinyos-dev that is forked from tinyos/tinyos-cur.


TinyOS

TinyOS is an open source, BSD-licensed operating system designed for low-power wireless devices, such as those used in sensor networks, ubiquitous computing, personal area networks, smart buildings, and smart meters.


  • TinyProd

The main Tinyos-Main tree has seen less activity over the years. That doesn't mean TinyOS is dead, rather most new work has been concentrated on the tinyprod repository. See tinyprod/prod and its working development repository tp-freeforall/prod

  • Make 3

The main TinyOS trees have been converted to using the new Make3 build system. See the (Make Version 3) section below.


Where to Begin

  • doc/00a_Getting_Started_w_Git: Overview of getting started using git, github.

  • doc/00c_Setting_Up_Debian_Development: Setting up development on Debian based Linux machines. Debian and Ubuntu.

  • doc/00d_MacOSX_Development: Setting up development on Mac OS X.

TinyOS Wiki

Much information about how to setup and use TinyOS can be found on the wiki. It is also editable by the community if you have information to add or update.

About tinyos-main

Long ago (well not that long ago), in a galaxy not too distant, tinyos development was hosted on Google Code as a subversion repository. This repository was writeable by a select group of core developers.

TinyOS development has moved to a fully distributed model to encourage more participation by switching to the git distributed version control system.

The Github tinyos-main repository will still be writeable by those same core developers. Pull requests are welcome and will be reviewed by the core developer most familiar with the relevant code.

Repo Structure

Currently there is a single mainline, master. gh:tinyos/tinyos-main(master). This is equivalent to the tip of the svn trunk.

Branches are very inexpensive and are encouraged for any significant development. Typically, a feature will be implemented on a topic branch, ie. -int. where stands for integration.

For the immediate future, branching should be done in private user repositories. until the community gets used to how they work.

The general form for a repository/branch reference is: <github_context>/(branch) ie. gh:tinyos/tinyos-main(master) is the master branch in the tinyos/tinyos-main repository. Note that github repositories have a specific default branch controlled by github repository settings. gh:tinyos/tinyos-main refers to the repository but if that repository is pulled it will reference the default branch.

Local repositories are referenced using local(branch).

(Make Version 3)

TinyOS development repositories (tinyos/tinyos-main, tinyprod/prod) use the Version 3 make build system (issue #190). (see below).

Releases 2.1.2 and prior uses pre-version 3 tools and requires tinyos-tools-14. The development tree (tinyos-main, tinyprod) requires the new version 3 compatible tools, tinyos-tools-devel.

TinyOS releases after 2.1.2 will use tinyos-tools that are compatabile with the version 3 make system.

Version 3 Make system and tinyos-tools

The TinyOS make system has been upgraded to version 3. This brings many new improvements, see support/make/README.md for details.

The simplest way to obtain the tools is the install from the main tinyprod repository (see doc/00c_Setting_Up_Debian_Development). See the repository Readme at http://tinyprod.net/repos/debian/README.html).

sudo -s
apt update
apt purge tinyos-tools              # remove earlier incompatible version
apt install tinyos-tools-devel

Alternatively, one can build the tools manually:

cd tools
./Bootstrap
./configure
make
sudo make install