Kernel
- Preemptive, priority-based multitasking scheduler (fixed-priority, O(1) selection via CLZ)
- Trusted Execution Environment (TEE) using the Cortex-M7 MPU:
- Handler mode (privileged): full access to protected memory and system resources
- Thread mode (privileged): used by kernel and system tasks — full memory access, unrestricted use of protected instructions (MSR/MRS on BASEPRI, etc.)
- Thread mode (unprivileged): used by user applications — restricted memory access enforced by the MPU;
- Synchronization primitives: mutex (with priority inheritance), semaphore, event flags, mailbox
- Fixed-size memory pools, no variable-size dynamic allocation, eliminating heap fragmentation entirely
- Synchronous and asynchronous callback execution system
- Structured fault handling: HardFault, MemFault, BusFault, UsageFault, stack overflow detection
Dynamic ELF Loader
Mk can load and execute external ".elf" files at runtime, relocated into 64 KB pages of external
SDRAM. Programs reference Mk's own API symbols directly. The full kernel symbol table
is embedded in the firmware at a fixed address, so external applications require no copy of the
kernel API in their own binary. Shared libraries can be added to overcome the 64 KB page limit.
See the sym2srec tool for details on the symbol embedding mechanism.
File System
- FAT32 with multi-partition support
- Concurrent access from multiple tasks (per-volume mutex)
- Full API: open, close, read, write, seek, tell, eof, stat, rename, unlink, chmod, expand, truncate, directory browsing
- Supports SD/MMC cards and USB Mass Storage Class (MSC) devices
USB Stack
- Multitasking USB host stack built on the STM32F7 OTG peripheral
- Supported device classes: HUB, HID (keyboard, mouse, joystick, gamepad), MSC
- Designed for extensibility, new device classes can be added without modifying the core stack
Graphical Engine
- Hardware-accelerated 2D rendering via the Cortex-M7 ChromART (DMA2D) unit
- Drawing primitives: rectangles, circles, lines, ...
- Image rendering: BMP 24-bit and 32-bit
- Full Unicode text rendering: ASCII, UTF-8, UTF-16, UTF-32
- Font manager: native fonts stored in FLASH or QSPI; additional fonts can be loaded at runtime into RAM
- UI object library: buttons, text fields, edit fields, progress bars, 2D graphs, cursors, layers
- Event-driven application model: painting callbacks and input-listening callbacks
- Screenshot capability
Shell
The system includes a built-in interactive shell supporting both native and dynamically loaded commands, allowing users to navigate directories (ls, cd, pwd), list mounted disks (lsdsk), and fully manage external applications (launch, install, uninstall, terminate, getapps).
Architecture
Mk follows a three-layer architecture:
- Foundation: It manages hardware peripherals (STM32F7), handles kernel execution (scheduler, mutexes, etc.), and provides low-level BSP drivers.
- Subsystems: It delivers system-wide services including a custom hardware-accelerated graphics engine, a dynamic ELF loader, a FAT file system, and a USB stack.
- System Platform: It runs high-level applications like the Supervisor (fault management), the Home screen, and the Shell.
Video Demonstration
For a complete overview of the system booting, the shell interaction, and dynamic application loading, watch the full video
EmbSoft3