PinyCore is a generic, reusable control framework for embedded robot systems, and is not limited to RoboMaster. It provides the common infrastructure shared by different units, including SoC/BSP hardware abstraction, FreeRTOS-based task scheduling and communication, logging and fault handling, state-machine support, and Kconfig-driven build configuration. The project is intended to separate application logic from the underlying hardware and provide stable interfaces for building concrete unit implementations.
PinyCore does not implement any specific unit type or application-specific behavior. The repository provides only the core framework; concrete robot implementations should live in the application layer or in a separate project that depends on PinyCore.
To keep PinyCore reusable and compatible across different projects, only generic code should be submitted to this repository. Application-specific modules, board-specific configuration, and logic tied to a particular unit should be kept outside the core. PRs to PinyCore are intended to be opened only when:
- an application-layer module has been implemented and stabilized, and its generic portion can be reused without breaking compatibility with existing code; or
- changes are being collected during a specific integration phase, such as a final form review.
The following parts are not provided as ready-to-use implementations and must be completed by the user:
- Application layer — unit-specific control logic, task organization, state transitions, and high-level behavior.
- Command-input logic configuration — input mapping, filtering, mode handling, and command dispatch for the application's control sources.
- cmake >= 3.24
- ninja >= 1.1
- arm-none-eabi-toolchains >= 10.3.1 or llvm (experimental)
- python >= 3.2 (maybe also need python-is-python3 in ubuntu)
- kconfiglib
we also suggest to install following software:
- clangd >= 20.0
- clang-format >= 20.0
- commitizen
- ccache
Build
cmake -B build -G NinjaCompile
ninja -C buildSupport configuring projects based on Kconfig
cmake --build ./build --target menuconfigSupport building projects directly based on pre-configured files (which should exist in the root directory, with the file name "yourconfig" in this example)
cmake -B build -G Ninja -DCONFIG_NAME=yourconfig- openocd >= 0.12.0
- cortex-debug / codelldb (vscode-plugin)
- Ozone 3.24
- FreeMASTER/FreeMASTER Lite >= 3.1.3 (Lite supports Linux and requires the installation of the prerequisite JRE)
- systemview
- It is dangerous to call HAL library functions before the main function is executed! Please avoid making class objects that call HAL library constructors global variables (you can create global pointers, or use the tools in ./Src/Utils/Lazy and construct them during the initialization phase);
- During the initial build, this project will automatically pull third-party libraries from GitHub. Please ensure that the network is available.
Contributions are always welcome!
See CONTRIBUTING for ways to get started.
Please adhere to this project's CODE_OF_CONDUCT.

