OS
v1.7.5
Documentation
|
QuarkTS++ (the C++ port of QuarkTS) is an open-source operating system that is built on top of a RTC cooperative quasistatic scheduler. Its simplified kernel implements a specialized round-robin scheme using a linked-chain approach and an event-queue to provide true FIFO priority scheduling.
Why cooperative?
Rather than having preemption, tasks manage their own life-cycle. This bring significant benefits, fewer re-entrance problems are encountered, because tasks cannot be interrupted arbitrarily by other tasks, but only at positions permitted by the programmer, so you mostly do not need to worry about pitfalls of the concurrent approach(resource sharing, races, deadlocks, etc...).
What is it made for?
The design goal of QuarkTS++ is to achieve its stated functionality using a small, simple, and (most importantly) robust implementation to make it suitable on resource-constrained microcontrollers, where a full-preemptive RTOS is an overkill and their inclusion adds unnecessary complexity to the firmware development. In addition with a Finite State Machines (FSM) support, Co-Routines, time control and the inter-task communication primitives, QuarkTS++ provides a modern environment to build stable and predictable event-driven multitasking embedded software. Their modularity and reliability make this OS a great choice to develop efficiently a wide range of applications in low-cost devices, including automotive controls, monitoring and Internet of Things
Why should I choose it?
QuarkTS++ is not intended to replace o compete with other great and proven RTOS options already available today, for example, FreeRTOS, Zephyr or MicroC/OS-II, in fact, you should check these options first. However, due to its size and features, is intended to play in the space between RTOSes and bare metal. QuarkTS++ was written for embedded developers who want more functionality than what existing task schedulers offer, but want to avoid the space and complexity of a full RTOS, while keeping the taste of a robust and safe one.
QuarkTS++ is licensed under the MIT License. You may copy, distribute and modify the software without any restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the OS, and to permit persons to whom the OS is furnished to do so. This OS is provided as is in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
For more details, see the MIT License line by line.
QuarkTS++ has no direct hardware dependencies, so it is portable to many platforms and C compilers.
The following cores have been powered with QuarkTS++ successfully:
QuarkTS is developed using a formal and rigorous process framed in compliance of the MISRA C++ 2008 and SEI CERT coding standard guidelines and complemented with multiple static-analysis checks targeted to safe critical applications.
Simply using QuarkTS++ in an application, does not mean developers can make a claim related to the development process and compliance of the OS to any requirements or product specification, without first, following a recognized system-wide conformance verification process. Conformance evidence must then be presented, audited and accepted by a recognized and relevant independent assessment organization. Without undergoing this process of due diligence, no claim can be made as to the suitability of QuarkTS++ to be used in any safety or otherwise commercially critical application.
Besides the previous information, the OS sets the following clarifications regarding coding policies and naming conventions:
stdint.h
with typedefs that indicate size and signedness in place of the basic types.char
and char*
types are only permitted to hold ASCII characters and strings respectively._t
suffix is used to denote a type definition (i.e base_t
, signal_t
, cycles_t
, ...).bool
, where a true
- 1u
value indicates a successful procedure and false
- 0u
, the failure of the procedureAs a quasi-static scheduler is implemented here, dynamic scheduling is not required and the assignment of tasks must be done before program execution begins. The kernel is designed to allow unlimited tasks and kernel objects, but of course, the whole application will be constrained by the memory specifications of the embedded system.
The kernel's memory footprint can be scaled down to contain only the features required for your application, typically 3.7Kb
of code space and less than 1Kb
of data space.
Functionality | Size(bytes) |
---|---|
Kernel, scheduler and task management | 2637 |
A task node qOS::task | 68 |
Finite State machines(FSM) handling and related APIs | 314 |
A FSM object qOS::stateMachine | 100 |
A state object qOS::sm::state | 36 |
Timers handling and related APIs | 258 |
A Timer object qOS::timer | 8 |
Queues handling and related APIs | 544 |
A queue object qOS::queue | 28 |
Memory management | 407 |
A memory pool | 28 |
The AT Command Line Interface | 1724 |
An AT-CLI instance qOS::commandLineInterface | 112 |
An AT-CLI command instance qOS::cli::command | 24 |
Remaining utilities | 2980 |