GithubHelp home page GithubHelp logo

tenok-rtos / tenok Goto Github PK

View Code? Open in Web Editor NEW
91.0 4.0 12.0 17.14 MB

A Linux-like real-time operating system for Robotics and the Internet of Things (IoT)

Home Page: https://tenok-rtos.github.io

License: BSD 2-Clause "Simplified" License

Makefile 0.12% C 97.85% Assembly 0.85% HTML 0.92% GDB 0.01% Shell 0.02% Python 0.24%
arm-cortex-m embedded-systems rtos real-time-operating-system

tenok's Introduction

Tenok

The Tenok project is a real-time operating system (RTOS) designed for robotic applications and the Internet of Things (IoT). The name originated from the language of an indigenous tribe called Amis in Taiwan, where "tenok" means "kernel" in their language. It resembles various designs from Linux and maintains a small code footprint for ARM Cortex-M processors. In contrast to NuttX, Tenok does not implement a set of low-level hardware drivers as a part of the system. Instead, it adopts an approach similar to FreeRTOS by treating the RTOS as a third-party library. Users can choose their preferred library for the hardware abstraction layer (HAL).

Tenok also integrates the MAVLink communication protocol and provides several utilities for robotics, including a debug visualization tool and a facility tool for supporting software-in-the-loop simulation with the Gazebo simulator.

Key Features

  • POSIX compliant RTOS
  • Linux-like designs: Wait queue, kthread, tasklet, kfifo, printk, and more
  • Task and Thread (Task resembles UNIX process as a group of threads)
  • Synchronization: Mutex (supports priority inheritance), Semaphore, and Spinlock
  • Inter-Process Communication (IPC): FIFO (Named pipe), Message Queue, and Signals
  • Kernel-space memory allocation: Buddy system and Slab allocator
  • User-space memory allocation: Dynamic allocation (First-Fit Free List) and Memory pool
  • Software timer and clock
  • Built-in Shell with command completion and history saving
  • Root and ROM file systems
  • Real-time plotting and customizable debug messaging with a metalanguage
  • Integrated with MAVLink communication protocol
  • Software-in-the-loop (SIL) simulation with the Gazebo simulator

Tools

  • mkromfs: Import files to the firmware binary with Tenok's romfs format
  • msggen: Convert user-defined metalanguage messages into C codes and YAML files
  • rtplot: For on-board data real-time plotting, where the message definitions are loaded from the auto-generated YAML files
  • gazebo_bridge: Message forwarding between Tenok (serial) and Gazebo simulator (TCP/IP)

Benchmarking

Tenok currently supports Dhrystone and CoreMark for basic benchmarking. Please refer to benchmarks.mk for details.

Getting Started

Resources

License

Tenok is released under the BSD 2-Clause License. For detailed information please read the LICENSE.

Related Projects

Tenok is heavily influenced by the following projects during its development:

  1. rtenv / rtenv+
  2. mini-arm-os
  3. Piko/RT
  4. linenoise

tenok's People

Contributors

shengwen-tw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tenok's Issues

POSIX signals support state

Functions:

  • sigemptyset
  • sigfillset
  • sigaddset
  • sigdelset
  • sigismember
  • sigaction
  • sigprocmask
  • sigpending
  • sigsuspend
  • sigpause
  • sigwait
  • sigwaitinfo
  • sigtimedwait
  • sigqueue
  • kill
  • raise
  • pause

POSIX clock and timer support state

Functions:

  • clock_gettime
  • clock_settime
  • clock_getres
  • timer_create
  • timer_delete
  • timer_getoverrun
  • timer_gettime
  • timer_settime
  • gettimeofday
  • settimeofday

printf family support state

Functions:

  • printf
  • fprintf
  • dprintf
  • sprintf
  • snprintf
  • vprintf
  • vfprintf
  • vdprintf
  • vsprintf
  • vsnprintf

Formatting:

  • %l...
  • %ll...
  • %s
  • %c
  • %x
  • %d
  • %u
  • %o
  • %p
  • %f
  • %%

Platform and hardware support state

Architectures:

  • ARM Cortex-M0 - STM32F0
  • ARM Cortex-M3 - STM32F1
  • ARM Cortex-M4(F) - STM32F4
  • ARM Cortex-M7 - STM32F7, STM32H7

For historical reasons, many M3 and M4 projects adopted STM32 Standard Peripheral Library (SPL).
Therefore, Tenok selects SPL for M3 and M4 architectures, while others are planned to be based on STM32 Low Level (LL) library.

Advanced Peripherals:

  • USB
  • SDIO (Further enhancement on the file system is also required. exFAT is an ideal candidate but may be out of current scope. FatFs may be considered to use for now.)

The support for these peripherals can be done by porting external libraries from STMicroelectronics.

Special devices:

  • MPU-6500 Inertial Measurement Unit (IMU)
  • IST-8310 magnetometer
  • u-blox M8N GPS receiver

The purpose of supporting these sensors is to showcase Tenok in Robotic applications. A demo project on INS algorithm (Inertial Navigation System) is planned.

POSIX thread support state

Functions:

  • pthread_attr_destroy
  • pthread_attr_getdetachstate
  • pthread_attr_getschedparam
  • pthread_attr_getschedpolicy
  • pthread_attr_getstackaddr
  • pthread_attr_getstacksize
  • pthread_attr_init
  • pthread_attr_setdetachstate
  • pthread_attr_setschedparam
  • pthread_attr_setschedpolicy
  • pthread_attr_setstackaddr
  • pthread_attr_setstacksize
  • pthread_cond_broadcast
  • pthread_cond_destroy
  • pthread_cond_init
  • pthread_cond_signal
  • pthread_cond_timedwait
  • pthread_cond_wait
  • pthread_condattr_destroy
  • pthread_condattr_init
  • pthread_create
  • pthread_equal
  • pthread_exit
  • pthread_getschedparam
  • pthread_setschedparam
  • pthread_join
  • pthread_kill
  • pthread_mutex_destroy
  • pthread_mutex_init
  • pthread_mutex_lock
  • pthread_mutex_trylock
  • pthread_mutex_unlock
  • pthread_mutexattr_destroy
  • pthread_mutexattr_init
  • pthread_mutexattr_setprotocol
  • pthread_mutexattr_getprotocol
  • pthread_self
  • pthread_yield
  • pthread_once
  • pthread_cancel

Macros:

  • PTHREAD_MUTEX_INITIALIZER
  • PTHREAD_COND_INITIALIZER

Mutex Protocols:

  • Priority Inheritance Protocol (PIP)

POSIX file control and I/O support state

Functions:

  • mount
  • open
  • close
  • dup
  • dup2
  • read
  • write
  • ioctl
  • lseek
  • fstat
  • opendir
  • readdir
  • mknod
  • mkfifo
  • poll
  • fopen
  • fclose
  • fread
  • fwrite
  • fseek
  • fileno
  • flock
  • getcwd
  • chdir
  • mkdir
  • rmdir
  • rename
  • unlink

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.