A modular, hardware-agnostic framework for CubeSat flight software using C++20 coroutines and libhal.
- Lightweight: Optimized for resource-constrained CubeSats
- Hardware-Agnostic: Complete hardware independence through libhal abstractions
- Coroutine-Based: Efficient multitasking without a heavy RTOS
- Modular: Plug-and-play application architecture
- Message-Driven: Publish/subscribe communication between components
- Software Bus: Coroutine-based message passing system
- Scheduler: Efficient task scheduling using C++20 coroutines
- Executive Services: Application lifecycle management
- Time Service: Hardware-agnostic timing utilities
Before using mini-cFS, follow the libhal Getting Started guide.
For ARM MCU profiles:
conan config install -sf conan/profiles/v1 -tf profiles https://github.com/libhal/libhal-arm-mcu.gitmicromod profiles:
conan config install -sf conan/profiles/v1 -tf profiles https://github.com/libhal/libhal-micromod.gitconan build . -pr <target_name> -pr <compiler>For example, for the lpc4078:
conan build . -pr lpc4078 -pr arm-gcc-12.3For the STM32F103 MicroMod V4:
conan build . -pr mod-stm32f1-v4 -pr arm-gcc-12.3The framework includes a complete CubeSat application in the demos/applications directory that demonstrates a full satellite software system with the following subsystems:
- Housekeeping
- Command & Data Handling
- Power Management
- Thermal Control
- Attitude Determination and Control
- Telemetry
Build and run:
conan build . -pr <target_name> -pr <compiler>- lpc4078
- lpc4074
- stm32f103c8
- micromod
- lpc4078 MicroMod V5
- stm32f103c8 MicroMod V4
mini-cFS applications are C++ classes that inherit from the hal::mini_cfs::Application base class:
class MyApplication : public hal::mini_cfs::Application {
public:
MyApplication(const std::string& name, hal::mini_cfs::AppId id, hal::mini_cfs::ResourceList resources)
: Application(name, id, std::move(resources)) {}
hal::mini_cfs::Task initialize() override {
// Initialize application
co_return;
}
hal::mini_cfs::Task execute() override {
// Main application logic
co_await delay(1000); // Example non-blocking delay
}
hal::mini_cfs::Task cleanup() override {
// Clean up resources
co_return;
}
};mini-cFS uses libhal to abstract hardware details:
- Create a platform-specific initialization file in
platforms/ - Initialize hardware resources using libhal drivers
- Applications access hardware through libhal interfaces
See platforms/lpc4078.cpp for an example.
See ARCHITECTURE.md for detailed information about:
- Core components and their relationships
- How C++20 coroutines are leveraged
- Message passing system design
- Hardware abstraction approach
- Application lifecycle management
Licensed under the Apache License, Version 2.0.