|
1 | 1 | /* |
2 | | - * CMSIS RTOS2 wrapper for SuperTinyKernel (STK) RTOS. |
| 2 | + * SuperTinyKernel(TM) RTOS: Lightweight High-Performance Deterministic C++ RTOS for Embedded Systems. |
3 | 3 | * |
4 | | - * Maps the CMSIS RTOS2 C API (cmsis_os2.h) onto the STK C++ API. |
| 4 | + * Source: https://github.com/SuperTinyKernel-RTOS |
5 | 5 | * |
6 | | - * Supported: |
7 | | - * - Kernel management (osKernelInitialize / Start / GetState / GetInfo / |
8 | | - * GetTickCount / GetTickFreq / GetSysTimerCount / |
9 | | - * GetSysTimerFreq / Lock / Unlock / RestoreLock) |
10 | | - * - Thread management (osThreadNew / Delete / Yield / Delay / osDelay / |
11 | | - * GetId / GetName / GetState / GetPriority / |
12 | | - * SetPriority / GetStackSize / GetStackSpace / |
13 | | - * GetCount / Terminate / Suspend / Resume, Join, Detach) |
14 | | - * - Thread flags (osThreadFlagsSet / Clear / Get / Wait) |
15 | | - * - Event flags (osEventFlagsNew / Delete / Set / Clear / Get / Wait) |
16 | | - * - Mutex (osMutexNew / Delete / Acquire / Release / GetOwner) |
17 | | - * - Semaphore (osSemaphoreNew / Delete / Acquire / Release / GetCount) |
18 | | - * - Timer (osTimerNew / Delete / Start / Stop / IsRunning) |
19 | | - * - Message Queue (osMessageQueueNew / Delete / Put / Get / |
20 | | - * GetCapacity / GetMsgSize / GetCount / GetSpace / Reset) |
21 | | - * - Memory Pool (osMemoryPoolNew / Delete / Alloc / Free / |
22 | | - * GetCapacity / GetBlockSize / GetCount / GetSpace / |
23 | | - * GetName) |
24 | | - * |
25 | | - * Design notes: |
26 | | - * - All objects are heap-allocated with operator new/delete. |
27 | | - * For a fully static deployment, replace with a static object-pool allocator. |
28 | | - * - The wrapper owns one global Kernel instance (g_StkKernel). |
29 | | - * Call osKernelInitialize() before any other API, then osKernelStart(). |
30 | | - * - The kernel is configured with KERNEL_DYNAMIC | KERNEL_SYNC and |
31 | | - * SwitchStrategyFP32 (32 fixed-priority levels). |
32 | | - * osThread priority values (osPriorityIdle=1 .. osPriorityISR=56) are |
33 | | - * linearly mapped to STK priority levels 0..31. |
34 | | - * - CMSIS osWaitForever (0xFFFFFFFF) is translated to STK WAIT_INFINITE. |
35 | | - * - Timeout values in CMSIS are in ticks; STK Sleep/Delay also take ticks, |
36 | | - * so no conversion is required. |
37 | | - * - Thread flags and event flags are backed by stk::sync::EventFlags, |
38 | | - * STK's native 32-bit multi-flag synchronization primitive. |
39 | | - * - Message queues are backed by stk::sync::MessageQueue, STK's native |
40 | | - * fixed-capacity, fixed-message-size ring-buffer with integrated blocking |
41 | | - * semantics (Put/Get with configurable timeouts, ISR-safe TryPut/TryGet). |
42 | | - * |
43 | | - * Limitations / deviations from the specification: |
44 | | - * - Priority inheritance (osMutexPrioInherit): ignored, always supported. |
45 | | - * - Robust mutex (osMutexRobust): will assert as unsafe code. |
46 | | - * - Recursive mutex (osMutexRecursive): ignored, always recursive by default. |
| 6 | + * Copyright (c) 2022-2026 Neutron Code Limited <stk@neutroncode.com>. All Rights Reserved. |
| 7 | + * License: MIT License, see LICENSE for a full text. |
47 | 8 | */ |
48 | 9 |
|
49 | 10 | #include "stk.h" |
50 | 11 | #include "sync/stk_sync.h" |
51 | 12 | #include "time/stk_time.h" |
52 | 13 | #include "memory/stk_memory.h" |
53 | 14 |
|
| 15 | +// See design notes, API coverage and other details in cmsis_os2.h. |
| 16 | + |
54 | 17 | #include "cmsis_os2.h" |
55 | 18 |
|
56 | 19 | // --------------------------------------------------------------------------- |
|
0 commit comments