stateos/StateOS
소개
Free real-time operating system (RTOS) for microcontrollers with advanced c++ wrapper and support for std::thread
시스템 및 인프라What you can do
- kernel can operate in preemptive or cooperative mode
- kernel can operate with 16, 32 or 64-bit timer counter
- kernel can operate in tick-less mode
- implemented basic protection using MPU (use nullptr, stack overflow)
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalStateOS
Free, extremely simple and very fast real-time operating system (RTOS) designed for deeply embedded applications. Target: ARM Cortex-M, STM8, x86_64. It was inspired by the concept of a state machine. Procedure executed by the task (task state) doesn't have to be noreturn-type. It will be executed into an infinite loop. There's a dedicated function for immediate change the task state.
Documentation
The API is documented in the header files, the documentation generated with doxygen is available on GitHub Pages. How to port the system to another processor, compiler or device is described in Porting StateOS.
Getting started
Clone the repository with the submodule common (kernel, ports, startup code, CMSIS, build scripts):
git clone --recursive https://github.com/stateos/StateOS.git
include/osconfig.h: configuration of the kernelsrc/main.cpp: the application (src/main.cin C)examples: complete programs that show the use of every object, in C and C++stdc++: examples of the C++ thread support librarytest: unit tests of the kernel
The project is built for the STM32F4-Discovery board:
- make:
make -f makefile.gnucc(ormakefile.clang,makefile.armcc,makefile.iarcc,makefile.csmcc) - CMake:
cmake -S . -B build -G Ninjaandcmake --build build
Another board is selected in the makefile (include $(COMMON)/stateos/make/<board>/makefile.<compiler>) or in CMakeLists.txt (CMAKE_TOOLCHAIN_FILE);
the supported boards are in common/stateos/make and common/stateos/cmake.
Features
- kernel can operate in preemptive or cooperative mode
- kernel can operate with 16, 32 or 64-bit timer counter
- kernel can operate in tick-less mode
- implemented basic protection using MPU (use nullptr, stack overflow)
- implemented functions for asynchronous communication with unmasked interrupt handlers
- spin locks
- once flags
- events
- signals with protection mask
- flags (any, all, new)
- barriers
- semaphores (binary, limited, counting)
- mutexes with configurable type, protocol and robustness
- condition variables
- read/write locks
- memory pools
- raw buffers
- message queues
- mailbox queues
- event queues
- job queues
- timers (one-shot, periodic)
- hierarchical state machine
- c++ wrapper
- support for std::thread
- API documentation generated with doxygen from the header files
- examples and templates are in separate repositories on GitHub
- archival releases on sourceforge
Supported stdc++ features
- std::thread, std::jthread, std::stop_callback, std::this_thread, ...
- std::mutex, std::shared_mutex, std::condition_variable, ...
- std::binary_semaphore, std::counting_semaphore, ...
- std::lock_guard, std::unique_lock, std::shared_lock, ...
- std::future, std::promise, std::async, ...
- std::barrier, std::latch, ...
- std::chrono, ...
- thread local storage (thread_local)
- and more ...
Targets
- ARM Cortex-M0(+), M3, M4(F), M7: compilers armcc, clang, csmcc, gnucc, iarcc
- STM8: compilers csmc, iarc, sdcc
- x86_64 (PC: Linux, Windows): compiler gcc, for testing purposes; preemptive mode on Linux and Windows 11
License
This project is licensed under the terms of the MIT License (MIT).
관련 프로젝트 살펴보기
불러오는 중…