Skip to main content

Welcome

This documentation covers the environment setup, basic usage and advanced usage of LibXR, CodeGenerator and XRobot. Questions can be filed as issues in the corresponding repository or raised in the QQ group 608182228.

The Three Projects​

LibXR is a cross-platform C++ compatibility layer with peripheral drivers, data structures, communication middleware, OS abstractions, math utilities and the USB stack XRUSB; it can be used on its own in bare-metal, RTOS and Linux projects. CodeGenerator and XRobot are two command-line tools used with LibXR.

Take an STM32 board as an example: once the peripherals are configured in STM32CubeMX, CodeGenerator reads the .ioc file, generates the peripheral objects and the entry function app_main, and adds LibXR to the project's CMake build; XRobot then fetches Modules such as an IMU driver and an attitude estimator, locks each Module to a commit, and generates the main function XRobotMain from the configurations under User/, which constructs the Module instances in order. A project that uses only LibXR needs neither tool; on Linux and other platforms without STM32CubeMX, a BSP needs only XRobot.

ProjectRoleDistributed asCommandDocumentation
LibXRCross-platform C++ libraryGit repository, usually added to a project as a submodulenoneBasic Programming
CodeGeneratorGenerates the peripheral objects, app_main and the CMake integration from an STM32CubeMX projectpip package libxrlibxrCode Generation
XRobotModule management and main function generationpip package xrobotxrobotProject Management

Reading Order​

Quick Start goes from installing the tools to building a first program. After that, read by project type:

The debug interfaces, XRUSB, advanced programming, design concepts and performance tests come after these chapters and are read as needed.

Learning Path and Onboarding​

XRobot Onboarding (Chinese)

XRobot Logo