Generic_MCU_Software_Infrastructure logo

Generic_MCU_Software_Infrastructure

Free

Provide necessary software infrastructure, service, macros to support some high level abstract concept or paradigm, such as OOPC, FSM, delegate (event-driven) and etc.

FreeFree tier
Type
Open Source

About Generic_MCU_Software_Infrastructure

Generic_MCU_Software_Infrastructure (GMSI) provides necessary software infrastructures, services, and macros for embedded microcontroller development. It supports high-level abstractions such as OOPC (Object-Oriented Programming in C), FSM (Finite State Machines), and delegate (event-driven) paradigms. Currently, GMSI offers services including epool (common pool infrastructure), block (block-based buffer), block_queue (queue of blocks), stream2block (stream interface for block devices), es_simple_frame (communication frame encoding/decoding), multiple_delay (delay monitoring), scheduler (non-preemptive FSM scheduler), CRC functions, Xmodem protocol, and a bootloader logic template.

Key Features

epool: common pool infrastructure (abstract class for heap)
block: block-based buffer service supporting dynamic and static memory allocation
block_queue: queue of block_t implemented as a block list
stream2block: stream interface for block devices with double-buffered design
es_simple_frame: communication service with encoding/decoding based on a simple frame (8-bit header, 16-bit length, optional data, 16-bit CRC)
multiple_delay: delay monitoring service for FSMs or RTOS tasks, driven by 1ms timer
scheduler: non-preemptive FSM scheduler
crc: various CRC functions
xmodem: Xmodem communication protocol module
bootloader: bootloader logic template requiring memory access driver and memory descriptions

Pros & Cons

Pros
  • Open source and free to use
  • Modular design with reusable services
  • Supports multiple high-level paradigms (OOPC, FSM, event-driven)
  • Efficient stream handling with double-buffered approach minimizing atomicity impact on interrupts
  • Includes practical examples (e.g., stream2block with USART)
  • Provides a bootloader logic template for quick customization
Cons
  • Requires knowledge of embedded C and MCU programming
  • Not a complete RTOS; focuses on infrastructure services
  • May need adaptation for specific MCU architectures and peripherals
  • Documentation is limited to the README; minimal external resources
  • Some services (e.g., bootloader) are templates requiring significant implementation effort

Best For

Embedded systems development for microcontrollersImplementing Object-Oriented Programming in C (OOPC) on resource-constrained devicesFinite State Machine (FSM) based firmware designEvent-driven (delegate) paradigms in embedded softwareStream-based communication with block devices (e.g., SPI, USART with DMA)Lightweight communication protocol implementation (Xmodem, simple frame)Bootloader development for MCUs

FAQ

What is Generic_MCU_Software_Infrastructure (GMSI)?
GMSI is an open-source collection of software infrastructures, services, and macros for embedded microcontroller development, supporting high-level concepts like OOPC, FSM, and event-driven paradigms.
What services does GMSI provide?
GMSI provides epool (pool infrastructure), block (buffer), block_queue, stream2block, es_simple_frame, multiple_delay, scheduler, CRC functions, Xmodem, and a bootloader logic template.
How does stream2block differ from a simple queue with ISR?
Stream2block uses a double-buffered design: one block is used for queue access while another is used for burst transactions, connected via a list. This reduces atomicity protection frequency, improving real-time response when the stream is frequently accessed.
Is GMSI free to use?
Yes, GMSI is open source and free to use under the license provided in the repository.