# mcu_oop_df **Repository Path**: nakioy/embedded_oop_C ## Basic Information - **Project Name**: mcu_oop_df - **Description**: 面向对象驱动框架 OOP_driver_framewrok。 纯 C 实现轻量化 OOP 面向对象 MCU 驱动框架,分层架构、多系统适配、跨平台可调试,打造高复用、易维护的嵌入式标准化开发方案。 - **Primary Language**: C - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 1 - **Created**: 2026-04-01 - **Last Updated**: 2026-06-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: 嵌入式, 跨平台开发, Cortex-M4, 单元测试, 软件架构 ## README ## mcu_oop_df — Lightweight Object-Oriented General Driver Framework for Embedded C Traditional MCU development suffers from tight coupling, poor driver reusability, chaotic architecture and high migration costs between bare-metal systems and RTOS. Based on pure C language, mcu_oop_df implements lightweight Object-Oriented Programming (OOP) concepts. It delivers a layered, decoupled, cross-platform, reusable and easily extensible general driver architecture tailored for Cortex-M series MCUs. This framework abandons fragmented bare-metal coding styles and unifies device models and driver specifications. It natively supports seamless switching between bare-metal timing scheduling, FreeRTOS and RT-Thread. Equipped with OSAL (Operating System Abstraction Layer) and CMSIS standard adaptation, the same driver code can be quickly ported to different MCUs. ### Core Advantages: ##### ✅ OOP Design Implemented in C Centered on a base device framework, it unifies the models of peripherals including GPIO, IIC, keys, RTC, WDT and more. Drivers are layered and decoupled to achieve high cohesion and low coupling. ##### ✅ Dual-Layer Runtime Architecture Supports both native bare-metal task scheduling and mainstream RTOS. RTOS can be enabled or disabled with one click, catering to both low-spec MCUs and high-performance projects. ##### ✅ Comprehensive Project Ecosystem Integrated features: color log output, UART Shell debugging, key state machine, IAP firmware upgrade, MD5 firmware verification, multi-level OLED menus, automatic initialization and registration mechanism, etc. ##### ✅ Cross-Platform Development & Unit Testing Adopts an in-PC cross-platform solution. Combined with Linux virtual machines and the Unity test framework, upper-layer embedded code can be compiled locally and unit-tested, greatly cutting down debugging costs. ##### ✅ Production-Grade Practical Capabilities Supports hierarchical hardware initialization and modular driver splitting. Compatible with Standard Peripheral Library, HAL Library and LL Library. Well adapted to mainstream industrial control MCUs such as STM32F103 and STM32F407. ### Target Users & Application Scenarios Ideal for embedded developers, MCU beginners and industrial control project developers. Break away from the inefficient development pattern of repeatedly copying and modifying driver code. Adopt standardized OOP architecture to build stable, maintainable and iterable embedded projects efficiently. This open-source project is under continuous iteration and update. Feel free to Star, Fork and join us to refine an elegant solution for embedded development.